Skip to main content

Sprinkler Control 3: Status on LCD

Loading...

This project expands on the previous application by adding status messages displayed on the LCD. For this to work, you must have the TPS2L(G2) device -- only this model has the LCD (and keypad).

LCD messages are printed using the LCD Print block. The application prints two messages: "WATERING (SPRINKLERS ON)" and "IDLE". Click on either block to see the list of available properties:

AppBlocks logic flow with an LCD Print block displaying 'WATERING (SPRINKLERS ON)' followed by a variable update setting sprinkler_ON_when_0 to 0. The properties panel shows font, color, alignment, orientation, and spacing settings for the LCD output.

LCD messages are printed within the bounds of a rectangle formed by the X Position, Y Position, Width, and Height parameters. The Text Alignment property defines the text alignment within this rectangle, while Text Orientation allows you to print the text normally, upside down, or vertically.

Diagram showing text alignment within a 320x240 display area. The print rectangle is defined by X and Y position, width, and height. Text is aligned to 'Middle Center' within the rectangle.

For example, to print the "IDLE" message in the middle of the screen, use X Position = 0, Y Position = 0, Width = 320, Height = 240, and Text Alignment = Middle Center.

Note

The numbers 320 and 240 come from the TPS screen resolution, which is 320 x 240 pixels.