Arduino Forum

Community => Gigs and Collaborations => Topic started by: zaylenek on Nov 08, 2018, 05:53 pm

Title: Looking for text display on OLED (will pay)
Post by: zaylenek on Nov 08, 2018, 05:53 pm
Hey guys,

I'm looking for someone to assist me with a project with the following:
- A function to take in a string of text and have that displayed starting from any point within the screen. Something like; print_text(0,0,"Hello world"); Note - the 0,0 refers to the x,y pixel starting position on the screen.

The OLED I'm using is uncommon and does not have a library.
Title: Re: GIG (will pay) - Looking for help with bitmap and text display on OLED
Post by: wvmarle on Nov 08, 2018, 06:24 pm
128 * 36 * 3 = 13,824 bytes for a single image. That's a lot to store in an Arduino's tiny memory. Now if you'd use an ESP8266 it'd be a lot easier. You'd get up to 3 MB worth of flash for images if you use an ESP-12, or you can roll your own to make it smaller.

And what you mean, no library for that display (https://github.com/telstra/TIC2018/blob/master/TELSTRA%20-%20RELEASE%20LIBRARIES%20AND%20EXAMPLES%2005.04.2018/TEL-IOT5%20-%20Arduino%20PRE-RELEASE%20LIBRARIES%20AND%20EXAMPLES%2005.04.2018/Telstra%20Examples/5.%20Mikrobus%20test/OLED.h)? That was a <1 minute search.
Title: Re: GIG (will pay) - Looking for help with bitmap and text display on OLED
Post by: IndianaTux on Nov 08, 2018, 07:14 pm
Yeah was about to write the same that a 328p only has 32K of flash (minus 512 bytes for the bootloader). So your going to eat up almost half of your flash for a single image...
Title: Re: GIG (will pay) - Looking for help with bitmap and text display on OLED
Post by: zaylenek on Nov 08, 2018, 07:58 pm
Thanks for the feedback! I do plan to use another microcontroller because of the memory issue but for the moment I want just want prototype with what I have.


Also, the libraries I found online are not compatible with the OLED driver.
Title: Re: Looking for help with bitmap and text display on OLED (will pay)
Post by: IndianaTux on Nov 08, 2018, 08:32 pm
Did you test your code with the said Oled screen/driver ? Does it work ?
Title: Re: Looking for help with bitmap and text display on OLED (will pay)
Post by: zaylenek on Nov 08, 2018, 08:45 pm
Did you test your code with the said Oled screen/driver ? Does it work ?

I did and it displays the bitmaps perfectly. But it reads the bitmaps directly from the SD card and I want them to be read from flash with needing an SD card.
Title: Re: Looking for help with bitmap and text display on OLED (will pay)
Post by: IndianaTux on Nov 08, 2018, 10:38 pm
Just put the image you have on the SD card in hex format in an array like this:


Code: [Select]
prog_char my_image[] PROGMEM =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x18, 0xf1, 0xee, 0xab, 0xff, 0xcc, 0xff, 0xee, 0xff,
0xef, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xee, 0xff, 0xcf, 0xff, 0xab, 0xff, 0x6a,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xf6, 0xc3, 0xfe,
0x6a, 0xff, 0xaa, 0xff, 0xcd, 0xff, 0xcc, 0xff, 0xcd, 0xff, 0xed, 0xff, 0xee
};



And read from there instead of from the file.

Here is a post that does this exactly: http://forum.freetronics.com.au/viewtopic.php?t=5959
Title: Re: Looking for help with bitmap and text display on OLED (will pay)
Post by: wvmarle on Nov 09, 2018, 04:26 am
You can store at most two images in local flash - that is, if your code fits in the other 6k flash. That's not much to work with.

You could try to prototype but it doesn't make much sense as the moment you switch to say the ESP8266 you're going to need a different way again to read the images, as you'll be using the SPIFFS file system instead. That means you basically can do a "blink" type sketch showing one then the other image.

You got your display to work, and display images, that's about as far as you can prototype on the ATmega328p. It's just not suitable a processor for this application. So just get yourself a NodeMCU or WeMOS mini - they're cheap and readily available all over the world, so no doubt also in your locality - and prototype on something that actually can do what you want it to do.