OLED 128 display with Uno/Ethermega 2560

128x128 pixel 1.5" full colour OLED display with MicroSD card slot. [Product page]
Post Reply
Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

OLED 128 display with Uno/Ethermega 2560

Post by Synaesthesia » Sat Jun 25, 2016 3:37 am

I'm struggling to get the OLED128 working with moving images. Following the OLED128 quick start guide and advice on this forum, by shortening cables 20cm->10cm I have gotten the example sketch “all_drawing_operations” working, but when I try to use the SD card and the example sketches "demo logo SD card test" and "flames" both show the "SD card not found" error.

I've used a Mac OSX Yosemite to format a 16GB micro SD card (smallest I could get where I am) to MS-DOS (FAT). I see a lot of people here have had various luck with different types of SD cards but does anyone have the details of a card size and brand that has worked for this pairing of OLED 128 to Arduino uno, or a Freetronics Ethermega 2560?

My next idea is to use the SD slot on the Freetronics Ethermega to hopefully remove the possibility of the cables being too long for the SD card, but could anyone recommend some code to test this? Is it possible to use the code here with an Arduino Uno or Ethermega to test the SD card I have?

Thanks for the patience, I'm pretty new at this!

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: OLED 128 display with Uno/Ethermega 2560

Post by angusgr » Mon Jun 27, 2016 12:32 am

Hi Synaethesia,

Sorry to hear it's not quite working correctly. Moving to the internal MicroSD slot is a good idea. The EtherMega uses digital pin 4 as the MicroSD "CS" pin - which is already the same pin number used in the example sketches, so you shouldn't need to change anything - just move the card to the other slot and see what happens.

If that's not enough, there's an example sketch called CardInfo included with the built-in SD library (you can find it under File -> Examples -> SD). If you run this sketch then it will try to talk to the SD card and print information about what it finds on the serial port. This can be a good way to debug SD card issues.


Angus

Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

Re: OLED 128 display with Uno/Ethermega 2560

Post by Synaesthesia » Wed Jun 29, 2016 4:07 pm

Thanks Angus.
Sorry I forgot to mention I have it working on the Uno but also have the Ethermega. So I wired up the Ethermega...
Screen Shot 2016-06-29 at 11.05.46 am.png
and started by testing the example sketch “all_drawing_operations” but this doesn't work (it was actually why I switched to the Uno in the first place) so I'm not able to get to testing the SD card yet. I've used the same code as previously, and there's no error message.
Screen Shot 2016-06-29 at 10.58.17 am.png
I did notice the Ethermega is getting very hot very quickly too.
Any suggestions?

Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

Re: OLED 128 display with Uno/Ethermega 2560

Post by Synaesthesia » Wed Jun 29, 2016 10:47 pm

Also the sketch "Blink without delay" works on the Ethermega.
But I'm thinking maybe I have damaged the board because I don't know how to change the power source mode and I've needed to alternate between 9V and USB. I know the change is manual from the info here http://www.freetronics.com.au/pages/eth ... 3PpAZMrLEb but I'm assuming that means including something in the code?

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: OLED 128 display with Uno/Ethermega 2560

Post by angusgr » Thu Jun 30, 2016 6:33 am

Hi Synaesthesia,

Thanks for the update. You don't need to change anything in your code to change power sources, just move the jumper on the board. The microcontroller runs at 5V in both cases, it just gets the 5V via a different path.

Is it possible for you to post a photo of the wiring configuration you have?


Angus

Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

Re: OLED 128 display with Uno/Ethermega 2560

Post by Synaesthesia » Thu Jun 30, 2016 4:51 pm

Sure - hopefully these cover it. For the sketch “all_drawing_operations” I had disconnected pins 3 and 5 on the OLED 128.
I just checked all connections and tried again, same thing, nothing on screen, and no errors.
(Oh and I found the power select thanks, I was taking top left corner too literally!)
Attachments
IMG_6573.jpg
IMG_6572.jpg
IMG_6571.jpg

Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

Re: OLED 128 display with Uno/Ethermega 2560

Post by Synaesthesia » Thu Jun 30, 2016 4:52 pm

Additional photos...
Attachments
Screen Shot 2016-06-30 at 11.31.08 am.png
IMG_6574.jpg

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: OLED 128 display with Uno/Ethermega 2560

Post by angusgr » Mon Jul 04, 2016 5:40 am

Hi Synaesthesia,

Thanks for posting the pics. It looks to me like the white & yellow leads might be connected to digital pins 50 & 51 instead of 51 & 52 (the bottom pair of pins is GND, the row above is 52 & 53, and the row above that is 50 & 51.) Can you please check and confirm?

Angus

Synaesthesia
Posts: 6
Joined: Fri Jun 24, 2016 6:47 pm

Re: OLED 128 display with SD card and video

Post by Synaesthesia » Tue Jul 05, 2016 4:32 pm

You're right! I had double checked the wiring but didn't pick that up. Now everything works including the "flames" sketch from the FTOLED library. Next to attack the code for playing video from the SD card - I've looked around for examples of using video on OLED's but haven't found much although some people have got them to work with avi files and an spi. I'll post back here if I find anything but if anyone knows of any examples with code that would be helpful!

Also I've seen it suggested that an Arduino Due ARM-based board is better for video (which has high refresh rates across the whole screen), do you have any other freetronics hardware recommendations for moving to video?

Thanks!

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: OLED 128 display with Uno/Ethermega 2560

Post by angusgr » Tue Jul 05, 2016 10:43 pm

Hi Synaesthesia,

I haven't experimented with video files. I think on an 8-bit AVR based Arduino this would be a stretch, even the "flames" example - just loading BMP frames - is really stretching it.

The Arduino EtherDue is our Freetronics Due-compatible 32-bit product. It has a lot more grunt for these kind of operations, but I'm not aware of anyone playing video files with it or whether that would be possible.


Angus

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest