Shop OBEX P1 Docs P2 Docs Learn Events
4-bit GUI (testing) Now with WS2812B RGB LED test example - Page 5 — Parallax Forums

4-bit GUI (testing) Now with WS2812B RGB LED test example

1235»

Comments

  • RaymanRayman Posts: 14,641
    Updated to garryj's 0.8c USB code and fixed up some things.
    Added user long to each object so that common code can handle multiple similar items.

    Anyway, this one does something mildly amusing... Shows the state of several of the I/O pins that are tied to green LEDs on P123.

    1632 x 1224 - 692K
  • RaymanRayman Posts: 14,641
    Used the GUI to construct a basic serial terminal.
    It is very limited, but think it will work for something I need...

    Uses 8 cogs now, not all very efficiently...
    Added one each for serial transmit and receive.
    Last one processes incoming characters and turns into text array.
    1632 x 1224 - 535K
  • cgraceycgracey Posts: 14,152
    Rayman wrote: »
    Used the GUI to construct a basic serial terminal.
    It is very limited, but think it will work for something I need...

    Uses 8 cogs now, not all very efficiently...
    Added one each for serial transmit and receive.
    Last one processes incoming characters and turns into text array.

    Very nice! I bet you could get it down to two cogs: one for video and one for serial I/O and screen updating. And, if you had to... one cog, where you'd handle the video and serial on interrupts.
  • RaymanRayman Posts: 14,641
    It'd be a lot more efficient with a text based display driver instead of a graphical one...
    In that case, I bet one or two cogs would be enough...
  • potatoheadpotatohead Posts: 10,261
    edited 2017-01-21 23:45
    If you rearranged your draw code to something like the original P1 graphics.spin, you would have to store a tile map to reproduce your current bitmap, but it's not that big.

    What you get in return is optional character mode windows and partial buffering. The mouse would have to get processed last and added in as a single sprite. Being only one, that may be pretty easy. Do it last, in blank, just before live pixels.

    Users could choose. Bitmap draw everything, or redirect tiles, character mode style.

    P1 TV text is an example of this.


  • RaymanRayman Posts: 14,641
    P1 text graphics is incredibly efficient, but it has to be...

    A text window is a bad example for a graphical GUI.
    But, I just happened to need one and this was the easiest way for me...
  • Oh, no worries. You mentioned efficiency and it just made sense to mention the tile map as bit map idea.

  • RaymanRayman Posts: 14,641
    Here's a test example that's more fun: WS2812B RGB Controller

    You can use the mouse to push buttons or click on color in the bitmap.

    My USB test board happened to have a servo connector that made it easy to hook up the WS2812B RGB Led.

    1632 x 1224 - 793K
    1632 x 1224 - 632K
Sign In or Register to comment.