OLED 128 display with Uno/Ethermega 2560
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
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!
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!
-
- Freetronics Staff
- Posts:853
- Joined:Tue Apr 09, 2013 11:19 pm
- Location:Melbourne, Australia
- Contact:
Re: OLED 128 display with Uno/Ethermega 2560
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
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
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
Re: OLED 128 display with Uno/Ethermega 2560
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... 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. I did notice the Ethermega is getting very hot very quickly too.
Any suggestions?
Sorry I forgot to mention I have it working on the Uno but also have the Ethermega. So I wired up the Ethermega... 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. I did notice the Ethermega is getting very hot very quickly too.
Any suggestions?
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
Re: OLED 128 display with Uno/Ethermega 2560
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?
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?
-
- Freetronics Staff
- Posts:853
- Joined:Tue Apr 09, 2013 11:19 pm
- Location:Melbourne, Australia
- Contact:
Re: OLED 128 display with Uno/Ethermega 2560
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
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
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
Re: OLED 128 display with Uno/Ethermega 2560
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!)
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!)
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
-
- Freetronics Staff
- Posts:853
- Joined:Tue Apr 09, 2013 11:19 pm
- Location:Melbourne, Australia
- Contact:
Re: OLED 128 display with Uno/Ethermega 2560
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
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
-
- Posts:6
- Joined:Fri Jun 24, 2016 6:47 pm
Re: OLED 128 display with SD card and video
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!
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!
-
- Freetronics Staff
- Posts:853
- Joined:Tue Apr 09, 2013 11:19 pm
- Location:Melbourne, Australia
- Contact:
Re: OLED 128 display with Uno/Ethermega 2560
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
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