OLED 128x64 Twig trouble

I’m participating in the toy hacking contest, and I’m having some trouble with the OLED twig.

First, the display itself is not well connected to the PCB, when I received it, it was flopping around and I had to secure it with tape. I am now a little concerned that this has damaged some of the connections, but it is difficult to tell.

I had a bunch of other components hooked up to the stem (PIR motion sensor, chainable RGB LED, Piezo buzzer, 4-channel cap touch controller). I got some basic software working with each of those devices, then I tried using the OLED. I tried loading the OLED example program referenced on the wiki page (demo code - garden.seeedstudio.com/index.php … 8*64_v0.9b), however, nothing appeared to happen on the display after I had the source compile and everything.

First, I checked the voltage on the twig, both the 5V input and the 12V boost converter output, and it looked like the converter was having trouble maintaining the 12V (which would appear for a while, and then go away). My hunch was that the other components were requiring too much current, and that there was not enough left at 5V to drive the boost converter completely. I removed the other components, and that enabled the OLED boost converter to provide a steady 12V. I looked around, but was not able to find any documentation about the power consumption of this OLED Twig. Do you have information about that available?

With the power running, I still did not observe anything on the display, and my next hunch was that there was a RAM problem, since I’m running this on a Seeeduino with an ATmega168, which only has 1KB of RAM, and since the data files in the demo program involved rather large arrays for font and logo data.

I tried stripping out the largest chunks, and at one point, I observed a bunch of gobbledygook on the display, a random spray of active pixels. I was unable to get this redisplayed, however.

At some point, somehow, I jacked up the bootloader on the seeeduino (which in my research I discovered seems to be correlated with running out of RAM while running a program). I soldered a header onto the broken out FTDI pins, and using these instructions (geocities.jp/arduino_diecimi … ex_en.html), I was able to restore the bootloader.

After this, I tried running the simplest possible program, turning the display on and off and turning all of the pixels on and off, but I was not able to get any meaningful response from the device.

The display is a critical part of my project, and so I need to get these issues sorted out as soon as I can. Can you help me figure out how to determine whether the display is any good? I know some I2C devices have a device ID register or other handshake thing to verify communications, but I didn’t see anything like that in the driver IC documentation.

If you use ATmega168, it will be not enough RAM. You can delete the following lines in the demo code:

extern unsigned char logo[];

extern unsigned char ip[];

for(int i=0;i<1288;i++)// write a 128 64 picture
{
SendChar(logo[i]);
// delay(1);
}

And delete the unsigned char logo [] and unsigned char ip [] Arrays in the data.c file
Power consumption of this OLED Twig is around 120 mW, you can see the information in garden.seeedstudio.com/images/c/ … 128064.pdf.

I never succeeded in getting the OLED example code to work, either on the 168 (by removing the variables as suggested) or unaltered on a 328.

I think I can confirm the display is not busted, though, because I was able to send it basic commands using a Bus Pirate. I’m trying to debug the most basic of I2C interfaces using the Seeeduino as the controller, even with the same simple commands that I used on the BP, I cannot get it to show anything (or even come on). I’ll double-check the power, too, that might not be working for some reason.

Once I double-checked the tape, and really secured the display, the example code worked fine on my ATmega328 (Ardweeny), logo and all.

I think it was just a bad connection caused by the display coming loose. I’m starting to worry that this won’t be sturdy enough to be part of a toy for a 2-year old, however.

Thanks for your advice. We will work on this too.