Page 141 - The Unofficial Guide to Lego Mindstorms Robots
P. 141
130
Note that we've specified the value in hexadecimal (-1066) but the display always shows decimal (-4198).
pbFORTH provides two words that show or hide individual display segments, basically everything except the numbers:
LCD_SH OW (segment - - )
LCD _HI DE (segment -- )
T hese words show or hide the given display segment. Valid values are shown in Table 6-7. The values that are flagged as a
sequence can be repeatedly called to update the display automatically. For example, the datalog indicator (3018) consists of
fo ur quarters of a circle. The first time you show 3018, you'll see one quarter. Show 3018 again, and a second quarter lights up.
Do this three more times, and the th ird quarter lights up, the fourth quarter lights up, and then all the quarters go blank and the
sequence begins again.
T able 6-7. LCD Segment Numbers
S egment Number (Hex) Sequence? Description
3 006 no Standing figure
3 007 no Walking figure
3 008 no Input 1 selected
3 009 no Input 1 active
3 00A no Input 2 selected
3 00B no Input 2 active
3 00C no Input 3 selected
3 00D no Input 3 active
3 00E no Output A selected
30 0F no Output A backward
3010 no Output A forward
3011 no Output B selected
3012 no Output B backward
3013 no Output B forward
3014 no Output C selected
3015 no Output C backward
3016 no Output C forward
3 018 yes (4) Datalog indicator segments
3019 yes (5) Data transfer segments (ascending)
301A yes (5) Data transfer segments (descending)
301B no Low battery indicator
301C no Short range download indicator
(table continued on next page)