0.96 oled with 4 pins wont work?

I bought an OLED like the picture below. I connected SDA to pin A4 via a voltage dividing circuit to drop it down to 3.3v and SCL to pin A5 also with a voltage divider. VCC to 3.3v and ground to ground. I downloaded the addafruit SSD1306 library with the addafruit GFX library and uploaded the code to my arduino uno. The OLED doesn't even light up? Why is this?

Not enough current available at 3.3V? Onboard regulator from Uno is only good for 150mA. How much does the display need?

Have a look at this. I have just realised microcontroller and programing is to advanced for me. I will never understand this
http://forum.arduino.cc/index.php?topic=219419.0

I don't mess with displays. Too much programming to come up with content to show.

Seeing stuff like that totally demotivated me. I cannot get it into my head how people can understand that? Are they fed c code from when they were born? It makes me very sad and depressed to know that I will never be able to do something like that. It's horrible, it just destroyed my whole day and I wasted R200 on this retarded screen I can do nothing with

I also bought 433mhz transmitters and receivers. I hope I'm not going to have the same problem with the.:cry: I also bought NRF24L01 wireless units. They probably also a nightmare to operate. I'm so bumed right now

433 MHz units are much easier to use. See the Virtualwire library.
http://www.airspayce.com/mikem/arduino/VirtualWire/index.html
which looks like is migrating to something fancier.
The basic transmit & receive functions still work.
Tx

// transmitter.pde//
// Simple example of how to use VirtualWire to transmit messages
// Implements a simplex (one-way) transmitter with an TX-C1 module//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@airspayce.com)
// Copyright (C) 2008 Mike McCauley
// $Id: transmitter.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $
#include <VirtualWire.h>
void setup(){   
 Serial.begin(9600);   // Debugging only    
Serial.println("setup");    
// Initialise the IO and ISR    
// vw_set_ptt_inverted(true); // Required for DR3100    NOT NEEDED FOR MOST TX UNITS
vw_setup(2000);      // Bits per sec}
void loop(){    
const char *msg = "hello";    
digitalWrite(13, true); // Flash a light to show transmitting   
 vw_send((uint8_t *)msg, strlen(msg));    
vw_wait_tx(); // Wait until the whole message is gone    
digitalWrite(13, false);    
delay(200);
}

Rx

// receiver.pde//
// Simple example of how to use VirtualWire to receive messages
// Implements a simplex (one-way) receiver with an Rx-B1 module//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@airspayce.com)// Copyright (C) 2008 Mike McCauley
// $Id: receiver.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $
#include <VirtualWire.h>
void setup(){    
Serial.begin(9600); // Debugging only    
Serial.println("setup");    
// Initialise the IO and ISR    
// vw_set_ptt_inverted(true); // Required for DR3100    NPOT NEEDED FOR MOST RX UNITS
vw_setup(2000);      // Bits per sec    
vw_rx_start();       // Start the receiver PLL running
}
void loop(){    
uint8_t buf[VW_MAX_MESSAGE_LEN];   
 uint8_t buflen = VW_MAX_MESSAGE_LEN;   
 if (vw_get_message(buf, &buflen)) // Non-blocking    
{        
int i;        
digitalWrite(13, true); // Flash a light to show received good message        
// Message with a good checksum received, dump it.        
Serial.print("Got: ");                
for (i = 0; i < buflen; i++)        
{            
Serial.print(buf[i], HEX);            
Serial.print(" ");       
 }        
Serial.println("");        
digitalWrite(13, false);    
}
}

Units need to be on separate Arduinos, 17cm antena wire on each (can be 30 gage wirewire wire)

nfrl2401/nrfl2401+ need a little more effort as they are SPI controlled.
Try here to start
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo

Coding for Arduino - just takes practice. Write sketches, screw up, fix them, gets better with time. Hang in there.
Having had some programming classes in college 2+ decades ago has also been a help.

"R200" what currency is that, where are you located? You should update your profile to show that for geographically closer help.

It's 200 rand. It's south africa currency. I get internet cap tomorow so I will update my profile on the laptop. Thanx for the words of encouragement. Will hopefully get the wireless stuff to work

Boffin1, JimboZA are also South Africa, so you've got some local (time zone, anyway) shoulders to cry on too :wink:
No idea how spread out you guys are:
https://www.cia.gov/library/publications/the-world-factbook/geos/sf.html

There's quite a few folks here within 25 miles of me I've never met personally.

calvingloster:
I bought an OLED like the picture below. I connected SDA to pin A4 via a voltage dividing circuit to drop it down to 3.3v and SCL to pin A5 also with a voltage divider. VCC to 3.3v and ground to ground. I downloaded the addafruit SSD1306 library with the addafruit GFX library and uploaded the code to my arduino uno. The OLED doesn't even light up? Why is this?

Which Arduino board do you have?
Not all of them use A5 and A5 for the i2c pins.
A4 and A5 are the mega328 based boards.

Normally a level shifter is used along with pullup resistors.
What type of voltage divider did you use and
how exactly did you hook up the i2c pins with your voltage divider?

Some of these oled display modules work at 5v.
Do you have a link to which one you bought?

--- bill

CrossRoads:
Boffin1, JimboZA are also South Africa, so you've got some local (time zone, anyway) shoulders to cry on too :wink:
No idea how spread out you guys are:
https://www.cia.gov/library/publications/the-world-factbook/geos/sf.html

There's quite a few folks here within 25 miles of me I've never met personally.

Haha ya thanx for the headsup on that one, I've been searching for people in my country that share the same interests. I'll be sure to send them a pm. I'm prom pretoria on that map.

bperrybap:

calvingloster:
I bought an OLED like the picture below. I connected SDA to pin A4 via a voltage dividing circuit to drop it down to 3.3v and SCL to pin A5 also with a voltage divider. VCC to 3.3v and ground to ground. I downloaded the addafruit SSD1306 library with the addafruit GFX library and uploaded the code to my arduino uno. The OLED doesn't even light up? Why is this?

Which Arduino board do you have?
Not all of them use A5 and A5 for the i2c pins.
A4 and A5 are the mega328 based boards.

Normally a level shifter is used along with pullup resistors.
What type of voltage divider did you use and
how exactly did you hook up the i2c pins with your voltage divider?

Some of these oled display modules work at 5v.
Do you have a link to which one you bought?

--- bill

Hi, I am using an UNO. If you look at the third post of this topic, there is a link I added for exactly the same oled display I'm using.

I used a 560 ohm and 280ohm resister in series. The signal pin on the 280 and the 560 on ground. Then a wire going from the middle of the voltage dividing circuit to the display pins. I measures the voltage from A4 and A5 and it was outputting 3.4volts so I connected them directly to the display. The link I provided in the third post also does it like that

calvingloster:
Hi, I am using an UNO. If you look at the third post of this topic, there is a link I added for exactly the same oled display I'm using.

I used a 560 ohm and 280ohm resister in series. The signal pin on the 280 and the 560 on ground. Then a wire going from the middle of the voltage dividing circuit to the display pins. I measures the voltage from A4 and A5 and it was outputting 3.4volts so I connected them directly to the display. The link I provided in the third post also does it like that

In that thread linked to in the 3rd post, I didn't seen any sort of voltage divider being used.
I saw the display being hooked up directly to 5v.
I looked at all the responses on all the pages and only saw a few places where 4.7k pullups were
being used. But all the photos seemed to be directly using 5v.
Maybe I missed something.
Can you provide a specific link to the post where there is a voltage divider being used?

I don't think you can get away with that type of a simple voltage divider
on the i2c bus.

With your voltage divider, it will divide the voltage down for a 5v output
but isn't the i2c bus open drain?, so I'm not sure if the clock or data line is ever driven high
since the pullup is what creates the highs.

Also what about the needed pullup on the bus?

--- bill

Hi.

Your photograph is huge and way too unfocused to see what board it actually is.
Can you post a link to the product you bought, or a very clear picture of both front and back of the board ?
The display i used, was connected through a small 5 to 3 volt converter board (so not by resistors).
I'm not sure that was necessary, but it didn't harm and worked.
The connector to Arduino has direct traces from data pins to glass, so no resistors or anything in it.
That board is powered from 5 volts and has an on board power supply that creates the actual voltage the display needs.

The board you are using might have a level shifter and power supply on board .
We can't tell but we might be able to do so if we have some pictures.

Here are more pictures from front and back. I bought the screen over a telephone conversation. The guy claimed there are many great libraries to drive it. But I found out he hasn't even tried it him self

bperrybap:

calvingloster:
Hi, I am using an UNO. If you look at the third post of this topic, there is a link I added for exactly the same oled display I'm using.

I used a 560 ohm and 280ohm resister in series. The signal pin on the 280 and the 560 on ground. Then a wire going from the middle of the voltage dividing circuit to the display pins. I measures the voltage from A4 and A5 and it was outputting 3.4volts so I connected them directly to the display. The link I provided in the third post also does it like that

In that thread linked to in the 3rd post, I didn't seen any sort of voltage divider being used.
I saw the display being hooked up directly to 5v.
I looked at all the responses on all the pages and only saw a few places where 4.7k pullups were
being used. But all the photos seemed to be directly using 5v.
Maybe I missed something.
Can you provide a specific link to the post where there is a voltage divider being used?

I don't think you can get away with that type of a simple voltage divider
on the i2c bus.

With your voltage divider, it will divide the voltage down for a 5v output
but isn't the i2c bus open drain?, so I'm not sure if the clock or data line is ever driven high
since the pullup is what creates the highs.

Also what about the needed pullup on the bus?

--- bill

I meant to say the link connects the pins directly.

calvingloster:
I meant to say the link connects the pins directly.

???? What does that mean?

I never saw any of the posts in the links you provided that used a voltage divider on SDA or SCL.

I'm still not completely clear how you have wired up the display SDA and SCL lines,
but more than likely that it is the problem as the i2c bus is open drain and so a voltage divider on the
SDA and SCK lines won't work since those lines are never driven high.

You should wire up your device as shown here:
(Your device only has VCC, GND, SCL, SDA)
http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter
The SDA and SCL lines will run directly to the UNO.
Then add the pullups as shown in the diagram.

The adafruit SSD1306 library code works so it isn't a s/w issue.
I've used it on a display nearly identical to the one you have.

You will need to check the i2c address in the example sketch to make sure it matches your display.
From your photo the i2c address is 0x78 (same as is was on mine).
That address is the the full address.
The Arduino Wire library uses a 7 bit address with bit 0 being the read/write bit
so the i2c address used with arduino will be half of the 0x78 or 0x3c
The sketch you will use is ssd1306_128x64_i2c.ino
The address in that sketch was 0x3d which does not match the one on your display
So you will need to modify the sketch use i2c address 0x3c
You must edit the file and change this:

display.begin(SSD1306_SWITCHCAPVCC, 0x3D);

to this:

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);

That should get the example sketch up and working on your device.

--- bill

Ok let me try again. The link that I provided in the 3rd post of this thread, shows a whole bunch of people discussing this oled. Now in their discussion they posted pictures and in those pictures you can see that they do NOT use voltage dividers and they connect the pins of the arduino directly to the oled. I never said anyone used voltage dividers. I used them, and I tried without them.

Thanx for the info I will try what u say the weekend.

I am one of those people, and i explained in this thread that i did use a level shifter module (no resistors for that).

There are at least 2 versions of the panel.
One (mine) has 30 wires, the other has 31 wires and they are not pin-compatible.
That was the reason i asked for a clear picture of the back of the module.
In such clear picture, the traces on the PCB are visible.
There aren't very much other components, so a clear picture will help in "reverse engineering" the module to see what is connected to what, and how.
Besides that, those pictures also show the brand of the module.
That might help also, people with the exact same module might pop up and tell you something about it.

I'm very busy with my daytime job at the moment.
But i will try one of my modules while connected directly to the 5 volts signals soon.
I think bperrybap's comments are your best guess at the moment, so try that.

calvingloster:
I never said anyone used voltage dividers. I used them, and I tried without them.

It sounded like you said others were using a voltage divider, at least to me.
This what was in your response #11

I used a 560 ohm and 280ohm resister in series. The signal pin on the 280 and the 560 on ground. Then a wire going from the middle of the voltage dividing circuit to the display pins. I measures the voltage from A4 and A5 and it was outputting 3.4volts so I connected them directly to the display. The link I provided in the third post also does it like that

I took that last sentence "also does it like that" to mean
that others in that link in the 3rd post were doing it like you just mentioned with a voltage divider
which is why I kept looking for others using a voltage divider, but I never saw it.

Anyway, pullups are required since it is an open drain bus.
The pullups are what create the highs/1's on the signals.
The voltage output of the Arduino pins doesn't really matter since
with i2c they will never drive the signals high. They will only drive the
signals low and ground is ground.

--- bill