Tags:
view all tags
%DASHBOARD{ section="dashboard_start" }% %DASHBOARD{ section="banner" image="%PUBURLPATH%/MecrispCube/OledDisplay/oled-mecrisp-cube-header.jpg" title="!CharlieWing Plex LED Display" titlestyle="color:#F00000;" }% %DASHBOARD{ section="box_start" title="Intro" width="485" height="250"}% ---+ Intro Adafruit 15x7 [[https://learn.adafruit.com/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing][CharliePlex]] LED Matrix Display. Driver !IS31FL3731 [[https://www.issi.com/WW/pdf/31FL3731.pdf][datasheet]] [[https://en.wikipedia.org/wiki/Code_page_850][Code page 850]] <img src="%ATTACHURLPATH%/Codepage-850.png" alt="Code page 850, 9x14" /> %DASHBOARD{ section="box_end" }% %DASHBOARD{ section="box_start" title="Contents" width="460" height="250"}% %TOC% %DASHBOARD{ section="box_end" }% %DASHBOARD{ section="box_start" width="992" height="400" }% ---+ Plex and !I2C Words =plex-emit= works like the standard word =emit=. It blocks the calling thread, as long as the character is not written to the Plex display (less than 300 us for a 6x8 character and 400 kHz !I2C). Horizontal (x) position is in pixel (0 to 15). <pre> plex-emit ( Char -- ) Emits a character (writes a character to the Plex display) plex-emit? ( -- Flag ) Plex 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 plexpwm ( n -- ) default PWM 1 .. 255 (brightness) plexshutdown ( n -- ) 1 activate Plex dispaly, 0 shutdown display plexcolumn! ( col leds pwm -- ) plexcolumn@ ( col -- leds ) plexpixel! ( col row pwm -- ) plexpixel@ ( col row -- u ) plexframe! ( n -- ) plexframe@ ( -- n ) plexdisplay! ( n -- ) plexdisplay@ ( -- n ) 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 </pre> %DASHBOARD{ section="box_end" }% %DASHBOARD{ section="box_start" width="992" height="500" }% ---+ Usage It is easy to redirect the terminal output to the Plex display, to use the string formatting words. <pre> : 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!" ; </pre> ---++ Marquee %DASHBOARD{ section="box_end" }% %DASHBOARD{ section="dashboard_end" }% -- %USERSIG{PeterSchmid - 2020-12-29}% <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work by <a xmlns:cc="http://creativecommons.org/ns#" href="http://spyr.ch" property="cc:attributionName" rel="cc:attributionURL">Peter Schmid</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>. <img src="%ATTACHURLPATH%/feather_3138_iso_demo.jpg" alt="feather_3138_iso_demo.jpg" width="1024" height="787" />
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
jpg
feather_3138_iso_demo.jpg
r1
manage
758.0 K
2021-04-23 - 20:09
PeterSchmid
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r11
|
r7
<
r6
<
r5
<
r4
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r5 - 2021-05-02
-
PeterSchmid
Home
Site map
Cosmac web
MRR web
MecrispCube web
SuperRandonnee web
TWiki web
Ursula web
Velo web
MecrispCube Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Edit
Attach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback