tty2oled Soft&Hardware Add-On (Shows Core based Pictures on a Display)

Showcase builds, discuss cases, embedding MiSTer into existing computer cases.
Reg
Posts: 118
Joined: Mon Mar 22, 2021 11:38 am
Has thanked: 60 times
Been thanked: 31 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Reg »

venice wrote: Sun May 30, 2021 6:04 am
Reg wrote: Sat May 29, 2021 3:43 pm Hi Venice,
Here is a couple of pictures…
Nice clock btw, selfmade?
Nah sadly not - it came from here https://lametric.com/en-US but I got it much cheaper on Amazon on a sale.

Was my Xmas present to myself ! :)
User avatar
WiteWulf
Posts: 42
Joined: Tue Feb 09, 2021 3:09 pm
Has thanked: 13 times
Been thanked: 10 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by WiteWulf »

venice wrote: Fri May 28, 2021 3:09 pm

Great, another quick build :D
Can use the picture for the gallery?
Thanks and sorry for missing this earlier, of course, feel free to.
hitm4n
Posts: 104
Joined: Sat Jan 30, 2021 9:20 am
Has thanked: 2 times
Been thanked: 16 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by hitm4n »

Mellified wrote: Fri May 28, 2021 3:47 pm As I posted upthread I was trying to build a solution without requiring soldering. That failed because of the screens I purchased originally, which are not 4SPI out of the box. I found where I can order the screens pre-configured for 4SPI thankfully. Now I'm waiting on them to arrive from China.
AliExpress ? Have you got a link to the one you bought please ?

I am hoping to place an order today for esp, screen, some other port extensions and a case today, probably all from Ali. I'm in the UK.
Cheers.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Fri May 28, 2021 3:47 pm As I posted upthread I was trying to build a solution without requiring soldering. ...
I am sorry to slow you down a bit but this ESP Breakout is for the "Devkitc V4" ESP32 which I can't get to work with the tty2oled Arduino Program and my Controller. We must wait until "Mellified" get all his parts and we can start to test or I get new hardware for testing.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

hitm4n wrote: Mon May 31, 2021 10:12 am
Mellified wrote: Fri May 28, 2021 3:47 pm As I posted upthread I was trying to build a solution without requiring soldering. That failed because of the screens I purchased originally, which are not 4SPI out of the box. I found where I can order the screens pre-configured for 4SPI thankfully. Now I'm waiting on them to arrive from China.
AliExpress ? Have you got a link to the one you bought please ?

I am hoping to place an order today for esp, screen, some other port extensions and a case today, probably all from Ali. I'm in the UK.
Cheers.
Here're links to what I ordered. I'm still waiting on the screens so I haven't done anything other than mount the boards onto the terminal breakout.

viewtopic.php?p=26016#p26016
User avatar
gojira54
Posts: 29
Joined: Sun May 24, 2020 7:02 pm
Has thanked: 16 times
Been thanked: 8 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by gojira54 »

RX-78 core =]

UNzR3M4.png
You do not have the required permissions to view the files attached to this post.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

gojira54 wrote: Fri Jun 04, 2021 6:22 pm RX-78 core =]
Added to the Repo and ready for „the Updater".
Many Thanks :)

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Thu May 27, 2021 10:57 pm Does that mean the Devkitc v4 is no longer supported?
Good News for the Devkitc V4 "Users" :D .
RealLarry has successfully tested an new Devkitc V4 Board (from AZ Delivery).
He send it to me for testing and I can confirm that it works.
It looks like we had tested some Devkitc V4 Kit's (also from AZ Delivery) which doesn't work as they should do :o

Devkitc_V4_small.jpg

If you choose "WEMOS LOLIN32" as Board within the Arduino IDE it should work.
See here https://github.com/venice1200/MiSTer_tt ... os-lolin32 for the Arduino settings
and here https://github.com/venice1200/MiSTer_tt ... nd-ssd1322 for the Eletrical Part.

The only (small) disadvantage of the Devkitc V4 board is that you have to press the boot button to load the Arduino Program (on Windows).
You do not have the required permissions to view the files attached to this post.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
RealLarry
Top Contributor
Posts: 767
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 85 times
Been thanked: 328 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

venice wrote: Sat Jun 05, 2021 3:35 pmThe only (small) disadvantage of the Devkitc V4 board is that you have to press the boot button to load the Arduino Program (on Windows).
Same on Linux side. At least sometimes. Weired behaviour.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Update (USB-Version)
The USB-Version of the Arduino Program got an new functionality to show text without using the tty2oled scripts.
Means, if the serial interface on the host is correctly configured (Baudrate etc.), you can send text from command line or other programs/tools
to the ESP/Display.

The Format is "xxx,yy,s,[Text]"

Code: Select all

xxx = 3 Digits X-Position 000..255
yy  = 2 Digits Y-Position 00..63 
s   = Text Size (0= 8 Pixel Font (u8g2_font_luBS08_tf), 1=10 , 2=14, 3=18, 4=24)
Example with the needed command order using /dev/ttyUSB0:

Code: Select all

1: echo "att" > /dev/ttyUSB0                # Is needed
2: echo "TEXTOUTXY" > /dev/ttyUSB0          # Enable TEXTOUTXY Mode
3: echo "010,10,1,Text Out" > /dev/ttyUSB0  # Show "Text Out" in Size 1 at Position 10,10.
Tip: Use the command "cls" to clear the screen => echo "cls" > /dev/ttyUSB0

If you don't need this functionality you don't need to update your ESP.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

I received my screens today. Got the DevkitC v4, breakout, and screen wired up using the wiki wiring diagram.

When I programmed it as a Wemos Lolin32 it showed up in the MiSTer on ttyUSB0. Nothing at all showed on the screen, even running "/usr/bin/tty2oled /dev/ttyUSB0 USB 921600".

I programmed the DevkitC v4 with as an ESP32 board and see it connected to the MiSTer as well. I get random noise displayed on the screen, even when testing from the MiSTer commandline.
MiSTer-tty.jpg
Clearly I have power to the screen. I assume the issue is my wiring of the datalines? Or is this something with the DevkitC programming?
You do not have the required permissions to view the files attached to this post.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Mon Jun 14, 2021 7:11 pm
Clearly I have power to the screen. I assume the issue is my wiring of the datalines? Or is this something with the DevkitC programming?
Please make some more pictures that we can the connections of ESP and Display more detailed.
And a picture of the back side of the display to see the settings.

Wiring as Devkitc should be Ok.
And choose Wemos Lolin32 as Device in the Arduino IDE.

I have this combination running here.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Mon Jun 14, 2021 9:14 pm Please make some more pictures that we can the connections of ESP and Display more detailed.
And a picture of the back side of the display to see the settings.
I used the colors in the wiring diagram, except the light blue / cyan is white and dark grey is black (ground).
Mister-tty1.jpg
Mister-tty2.jpg
Mister-tty3.jpg
Mister-tty4.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

How old is the Arduino Programm you have downloaded?
If it's relatively new it should contain the Lines

Code: Select all

// WEMOS LOLIN32 Display Constructor HW-SPI & Adafruit SD_MMC Adapter 180° Rotation => U8G2_R2
...
#ifdef ARDUINO_LOLIN32
U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 5, /* dc=*/ 16, /* reset=*/ 17);  // Better because original SPI SS = 5
#endif
If that's the case change the cables at the terminals 5 + 17 (Blue +White) or the two cables at the Display side. The others are looking good.

Code: Select all

Terminal 5  = Display Pin 16
Terminal 17 = Display Pin 15
Set the Arduino IDE to "Wemos Lolin32" and upload the program.

If the Program and the ESP are OK you should see at least "MiSTer FPGA by Sorgelig" after Power on.

//Edit
I think we have to change the electrical's for Devkitc and Lolin32.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
RealLarry
Top Contributor
Posts: 767
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 85 times
Been thanked: 328 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

venice wrote: Tue Jun 15, 2021 7:32 am I think we have to change the electrical's for Devkitc and Lolin32.
That was my mistake by accident (wrong/outdated template). Mea culpa. Need more coffe over the day and more drinks at night :ugeek:
Fix is on it's way...
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Tue Jun 15, 2021 7:32 am How old is the Arduino Programm you have downloaded?
I downloaded it again today to be sure. Confirmed the lines you mentioned are present.
venice wrote: Tue Jun 15, 2021 7:32 am If that's the case change the cables at the terminals 5 + 17 (Blue +White) or the two cables at the Display side. The others are looking good.

Code: Select all

Terminal 5  = Display Pin 16
Terminal 17 = Display Pin 15
Set the Arduino IDE to "Wemos Lolin32" and upload the program.

If the Program and the ESP are OK you should see at least "MiSTer FPGA by Sorgelig" after Power on.

//Edit
I think we have to change the electrical's for Devkitc and Lolin32.
Yup! Once I switched the blue and cyan/white wires on the screen it worked immediately.

So here is a test solderless option for the lazy/incompetent! :lol:
User avatar
RealLarry
Top Contributor
Posts: 767
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 85 times
Been thanked: 328 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

Mellified wrote: Tue Jun 15, 2021 2:36 pm
venice wrote: Tue Jun 15, 2021 7:32 am I think we have to change the electrical's for Devkitc and Lolin32.
Yup! Once I switched the blue and cyan/white wires on the screen it worked immediately.
So here is a test solderless option for the lazy/incompetent! :lol:
Fix to git commited. Again, sorry for any confusion.
I like your terminal solution. Seems to make life easier if replugging wires a thousend times.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

RealLarry wrote: Tue Jun 15, 2021 2:58 pm I like your terminal solution. Seems to make life easier if replugging wires a thousend times.
Yeah, it make this fix a 2 second thing rather than having to re-solder.

@venice - So now that I have a working display I'm looking to add support for the tty2oled to MiSTer_SAM. The arbitrary text support should make it really easy to display the game/MRA name rather than the core name. A few issues I'm seeing though that may be easy to fix?
1. It would be better to have a fixed width font so I know how many characters can be displayed. Right now I can get 12 "W" on screen or up to ~18 narrower characters.
2. A two line display option would be interesting - show the core name on one and the game name on the other.
3. When text overflows the display the text is centered and truncated. Would it be possible to automatically scroll the text across the display? Even moving one character over each second might be sufficient.
4. Using 'echo "This is a fun game" > /dev/ttyUSB0' works - but the tty2oled daemon will overwrite when it notices /tmp/CORENAME has changed. I can run "/etc/init.d/S60tty2oled stop" when MiSTer_SAM runs, of course, but that could fail to restart if SAM doesn't exit cleanly. Is there a way to disable CORENAME monitoring temporarily? Or send arbitrary strings to the display with tty2oled? I tried '/usr/bin/tty2oled /dev/ttyUSB0 USB 921600 > "Donkey Kong"' for example.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Another working tty2oled, great :D
Mellified wrote: Tue Jun 15, 2021 3:34 pm @venice - So now that I have a working display I'm looking to add support for the tty2oled to MiSTer_SAM. The arbitrary text support should make it really easy to display the game/MRA name rather than the core name. A few issues I'm seeing though that may be easy to fix?
1. It would be better to have a fixed width font so I know how many characters can be displayed. Right now I can get 12 "W" on screen or up to ~18 narrower characters.
2. A two line display option would be interesting - show the core name on one and the game name on the other.
3. When text overflows the display the text is centered and truncated. Would it be possible to automatically scroll the text across the display? Even moving one character over each second might be sufficient.
4. Using 'echo "This is a fun game" > /dev/ttyUSB0' works - but the tty2oled daemon will overwrite when it notices /tmp/CORENAME has changed. I can run "/etc/init.d/S60tty2oled stop" when MiSTer_SAM runs, of course, but that could fail to restart if SAM doesn't exit cleanly. Is there a way to disable CORENAME monitoring temporarily? Or send arbitrary strings to the display with tty2oled? I tried '/usr/bin/tty2oled /dev/ttyUSB0 USB 921600 > "Donkey Kong"' for example.
Related to 1+2:
Did you try the new TEXTOUTXY Function from above?
See: viewtopic.php?p=27974&sid=f7599536876c9 ... 0d8#p27974

But this recommends an stopped tty2oled daemon
or usage after/between core change(s)
and the actual version of the Arduino Program.

The „standard“ Text output via the tty2oled daemon is just for showing the corename if no picture is available.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Tue Jun 15, 2021 2:36 pm
So here is a test solderless option for the lazy/incompetent! :lol:
Could you make a picture for the gallery of your hardware setup showing something on the display.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Tue Jun 15, 2021 4:27 pm Did you try the new TEXTOUTXY Function from above?
I saw it but didn't register the text sizing. I will disable the daemon and give that a shot!
venice wrote: Tue Jun 15, 2021 5:03 pm Could you make a picture for the gallery of your hardware setup showing something on the display.
Here you are!
MiSTer_SAM_tty2oled.png
You do not have the required permissions to view the files attached to this post.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Tue Jun 15, 2021 4:27 pm Did you try the new TEXTOUTXY Function from above?
This is what I got so far. The animated GIF is low quality to get the file size down and the converter changed the text from blue to yellow for some reason, but hopefully it gets the idea across!
IMG_1029.gif
You do not have the required permissions to view the files attached to this post.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Tue Jun 15, 2021 8:25 pm This is what I got so far...
Looks good to me :)
Is this this something you can work with?

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

I had a bit of trouble with the spacing at first. The text starts at the bottom left of the pixel grid coordinates - not the top left as I’d assumed. Once I understood that it was pretty easy.

Overwriting existing text with more text could unlock some interesting visuals. I wasn’t creative enough to come up with any myself though.

It would be nice to have a way to blank only part of the screen. I tried overwriting text with spaces but that had no effect.

Note I am disabling the daemon. Nothing to do with tty2oled but SAM lacks a consistent exit code block currently so I’ll need to refactor to ensure the daemon is re-enabled in all code paths.

Other than that the code is “done” after a few hours. I’d like to get some more testing from other tty2oled users. I’ll post when it’s ready.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

OK, tty2oled support has been added to Super Attract Mode! You can download the files here:
https://github.com/mrchrisster/MiSTer_SAM

You will need to enable support in the MiSTer_SAM.ini - it is not on by default. Of course, tty2oled will display the corename as usual if you don't enable this support.

Please post any issues to the SAM thread here:
viewtopic.php?f=29&t=2493
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Wed Jun 16, 2021 1:54 pm OK, tty2oled support has been added to Super Attract Mode!
Great, I will try later.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified wrote: Wed Jun 16, 2021 1:06 pm I had a bit of trouble with the spacing at first. The text starts at the bottom left of the pixel grid coordinates - not the top left as I’d assumed. Once I understood that it was pretty easy.
Jepp, that's my standard setting.
Mellified wrote: Wed Jun 16, 2021 1:06 pm Overwriting existing text with more text could unlock some interesting visuals. I wasn’t creative enough to come up with any myself though.

It would be nice to have a way to blank only part of the screen. I tried overwriting text with spaces but that had no effect.
It looks to me the fonts I added are "transparent" fonts and don't overwrite the background.
The used font are u8g2_font_luBS08_tf, ..10, 14, 18 & u8g2_font_luBS24_tf.
Take a look here https://github.com/olikraus/u8g2/wiki/fntlistall for an list of fonts.
"Transparent" fonts have an "t" in the font name like "u8g2_font_u8glib_4_tf".
I can add some fonts for you if you like, we have enough space in the ESP.
Mellified wrote: Wed Jun 16, 2021 1:06 pm Note I am disabling the daemon. Nothing to do with tty2oled but SAM lacks a consistent exit code block currently so I’ll need to refactor to ensure the daemon is re-enabled in all code paths.
Ok

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Wed Jun 16, 2021 2:48 pm I can add some fonts for you if you like, we have enough space in the ESP.
That'd be nice. If you have the space put the non-transparent equivalent of each of the existing ones on perhaps? That'll allow all sorts of special effects for whatever sizes.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Mellified post wrote:Thu Jun 17, 2021 4:54 am That'd be nice. If you have the space put the non-transparent equivalent of each of the existing ones on perhaps? That'll allow all sorts of special effects for whatever sizes.
I haven't found the same Font as Non-Transparent but I added 4 new Non-Transparent Fonts which have a smaller width and one "Icon" Font .

See here https://github.com/olikraus/u8g2/wiki/fntlistall for how they look like.

Code: Select all

0:  u8g2_font_luBS08_tf    (20x12, 8 Pixel A, Transparent)
1:  u8g2_font_luBS10_tf    (26x15, 10 Pixel A, Transparent)
2:  u8g2_font_luBS14_tf    (35x22, 14 Pixel A, Transparent)
3:  u8g2_font_luBS18_tf    (44x28, 18 Pixel A, Transparent)
4:  u8g2_font_luBS24_tf    (61x40, 24 Pixel A, Transparent)
5:  u8g2_font_profont12_mf (6x12, 8 Pixel A, Non-Transparent)
6:  u8g2_font_profont17_mf (9x17, 11 Pixel A, Non-Transparent)
7:  u8g2_font_profont22_mf (12x22, 14 Pixel A, Non-Transparent)
8:  u8g2_font_profont29_mf (16x29, 19 Pixel A, Non-Transparent)
9:  u8g2_font_open_iconic_all_2x_t (16x16 Icons, Transparent)
Font Size Values are Width x Height and the Height for Character A

Fonts 0-4 are the original Transparent Fonts, 5-8 are 4 new Non-Transparent Fonts, 9 is an 16x16 Pixel Icon Font.

The Format is "xxx,yy,f,[Text]" (f instead of s ;) )

Code: Select all

xxx = 3 Digits X-Position 000..255
yy  = 2 Digits Y-Position 00..63 
f   = Font Type, see list above
If we need more fonts I have to change "f" from 1 to 2 digits.

Example

Code: Select all

1: echo "att" > /dev/ttyUSB0                # Is needed
2: echo "TEXTOUTXY" > /dev/ttyUSB0          # Enable TEXTOUTXY Mode
3: echo "010,20,5,Text Out" > /dev/ttyUSB0  # Show "Text Out" with Font 5 at Position X=10,Y=20.
I hope this helps :D

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: tty2oled Software Add-On with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Mellified »

venice wrote: Thu Jun 17, 2021 1:36 pm I hope this helps :D
Unfortunately the new fonts don't overwrite existing ones it seems. I also tried using the symbolic font, but those didn't overwrite either. Not the end of the world - the support as-is works well. The new fonts are a little more stylized, which gives a different aesthetic. May be nice for some use cases!
Post Reply