Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
%DASHBOARD{ section="banner" | ||||||||
Line: 44 to 44 | ||||||||
I2Cget ( c-addr u -- ) c-addr buffer address for the message to receive I2Cputget ( a1 u1 a2 u2 -- ) a1 buffer address for the message to send, a2 buffer address for the message to receive | ||||||||
Added: | ||||||||
> > | >oled ( -- addr1 addr2 ) redirect to oled >term ( addr1 addr2 -- ) terminate redirection | |||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
UsageIt is easy to redirect the terminal output to the OLED display, to use the string formatting words. | ||||||||
Line: 62 to 64 | ||||||||
; | ||||||||
Added: | ||||||||
> > | or even simpler
: oled-hallo ( -- ) >oled \ redirect terminal to oled-emit ." Hallo Velo! " cr ." ciao" >term \ terminate redirection ;or on a command line >oled .( Hallo Velo!) >termshow date and time on OLED (see CmsisRtos#How_to_use_Tasks for a background task). | |||||||
: clock ( -- ) oledclr | ||||||||
Line: 70 to 88 | ||||||||
begin wait-alarm \ wait a second 0 0 oledpos! | ||||||||
Changed: | ||||||||
< < | hook-emit @ \ save emit hook ['] oled-emit hook-emit ! \ redirect terminal to oled-emit .time hook-emit ! \ restore old hook | |||||||
> > | >oled .time >term | |||||||
key? until key drop ; |