Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | Feather Charlie Wing | |||||||
> > | ||||||||
Adafruit 15x7 CharliePlex LED Matrix Display. | ||||||||
Changed: | ||||||||
< < | IS31FL3731 https://www.issi.com/WW/pdf/31FL3731.pdf | |||||||
> > | Driver IS31FL3731 datasheet
Code page 850
Contents
| |||||||
Changed: | ||||||||
< < | I2C Address 0x74 | |||||||
> > | oled-emit works like the standard word emit . It blocks the calling thread, as long as the character is not written to the OLED display (less than 300 us for a 6x8 character and 400 kHz I2C). Horizontal (x) position is in pixel (0 to 127), vertical position (y) is in lines, a line consists of 8 pixels. Larger fonts takes more than one line. | |||||||
| ||||||||
Changed: | ||||||||
< < | \ buffer for I2C 20 buffer: i2c-buf | |||||||
> > | plex-emit ( Char -- ) Emits a character (writes a character to the OLED display) plex-emit? ( -- Flag ) OLED ready to get a character (I2C not busy) hook-emit ( -- a-addr ) Hooks for redirecting terminal IO on the fly hook-emit? ( -- a-addr ) plexpos! ( x -- ) Set Plex cursor position, x horizontal position, for 6x8 font max. (15 / 6) -1, depends on the font's x size plexpos@ ( -- x ) Get the current Plex cursor position plexclr ( -- ) Clears the Plex display, sets the cursor to 0 plexfont ( u -- ) Select the font, u: 0 6x8, 1 8x8 I2Cdev ( u -- ) Sets the 7-bit I2C address I2Cput ( c-addr u -- ) c-addr buffer address for the message with lengh u to send 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 | |||||||
Changed: | ||||||||
< < | \ set I2C address $74 I2dev | |||||||
> > | It is easy to redirect the terminal output to the Plex display, to use the string formatting words. | |||||||
Changed: | ||||||||
< < | \ select frame 1 $000000FD i2c-buf ! i2c-buf 2 I2Cput \ switch on first 8 LEDs (first column?) $0000FF00 i2c-buf ! i2c-buf 2 I2Cput \ pwm first LED $00007F24 i2c-buf ! i2c-buf 2 I2Cput \ pwm second LED $00007F25 i2c-buf ! i2c-buf 2 I2Cput | |||||||
> > | : count-down ( -- ) plexclr hook-emit @ \ save emit hook -1 -1 -1 alarm! \ an alarm every second wait-alarm 10 0 do ['] plex-emit hook-emit ! \ redirect terminal to plex-emit i 25 * plexpwm 0 plexpos! 10 i - . wait-alarm loop 0 . hook-emit ! \ restore old hook cr ." 0 Launch!" ; | |||||||
Added: | ||||||||
> > | Marquee-- Peter Schmid - 2020-12-29This work by Peter Schmid is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. | |||||||