this display is now my go-to display of choice for small jobs.
Hi LW
I'd love to get an url to the display and maybe a Datasheet .. please
And also the display library , i guess arduino.
TIA
Bbingo
ebay and amazon have lots of these. go to amazon, for example, and search on 'oled 128x64' and find the ones that use i2c (4 pins like mine). that will be easy to use on the arduino. you won't need datasheets if you use the u8glib library (search on that name).
I will post my sample code to github shortly, so that can be an example, but there are many online.
for the display I have (which may not always be what you get; you have to try variations):
to start off, you do this:
#include "Arduino.h"
#include <Wire.h>
#include <U8glib.h>
// create an instance of the OLED display class
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK
there, the 'u8g' instance is created and you have to use it.
inside setup:
// use largest font we have
u8g.setFont(u8g_font_courB18);
and inside loop:
oled_draw_loop();
that function is like this:
void
oled_draw_loop (void)
{
u8g.firstPage();
do {
draw_my_stuff();
} while (u8g.nextPage());
return;
}
and finally, the thing YOU write to draw YOUR app stuff:
void
draw_my_stuff(void)
{
// audio graphic icon
u8g.drawXBMP(0, 0, speaker_width, speaker_height, speaker_icon_bits);
// the number value
sprintf(str_buf, "-%d dB", db_val);
u8g.drawStr(63, 10, str_buf); // print at 63,10
return;
}
that's the general idea. see the u8glib site for the full info.
Thanx for the intro
Just ordered a few of these disp's
/Bingo
2nd build today; mostly the same as the first one but with a small round button, smaller display and blue instead of white. also, no nano module; I went pure DIY with a simple 328 chip and resonator:
the back of the board, in case anyone's curious
many pins are not even soldered down; I only soldered ones I needed to connect to. no socket on the chip and in the unlikely event I have to remove that chip, it will be less of a hassle this way.
arduino-from-scratch, to be sure
not even a software download port (ftdi or isp). the chip is loaded and it does what it does. yes, I did test the chip in breadboard before I soldered it down.
I don't think I have any wires on the other side. they are all here. just easier that way, given the display and button are on the other side.
more home-automation ideas; yet another take on an arduino home thermostat.
multi-zone capable and wireless.
still a breadboard idea; but might move it forward as an add-on to my remote and to replace my current dumb wall thermostat. I've always wanted to be able to get and set the value from anywhere in the house, and I plan to allow control from either the wallplate version or the handheld remote.
more home-automation ideas; yet another take on an arduino home thermostat.
Keep in mind that the OLED display is rated 10000 hours to half original brightness. That's only about 14 months of constant on operation. For something like a thermostat, that's expected to last quite a few years, you'd probably only want the display to come on when someone is actually looking at it. You'd need a pushbutton, proximity detector, etc., to only turn on the display when necessary.
agreed; I am working on some timeout method so that it does not say on all the time.
or, worst case, allow replacement easily every year
for those that want to just leave it on all the time.
if its socketed and only $10, its not the worst maintenance cost I could imagine. but if I can avoid it wearing out, I will try to do something creative.
If your not stuck on having a blue colour, I think the white ones are rated for longer life. One datasheet I've looked at said between 15000 hours and 50000 hours, depending one the brightness you run it at.
now I have a bargraph routine working:
I kept the display very sparse and left the bitmaps out. speed matters, here, and this is still the slow i2c version of the display. this draw loop needs to be fast since the remote is now a listener on the xbee 'bus' as well as a talker. it can talk and send a change-vol command to the preamp (background, led display) but if you grab the preamp's knob and turn it, the oled remote needs to stay in sync, so when its not talking, its listening for 'events' or asynch events from the managed object (eg, the preamp). and if you turn that rotary encoder very fast, you want the display on the other end of the rf link to feel quick and not laggy. keeping the screen redraws very simple and light keeps the response time snappy. the bar graph is just a rounded frame and an inner box, with some pixels apart for effect.
there was no bargraph routine in u8glib so I had to write one, if you call it 'writing one' (2 lines of code). it helps that I didn't have to scale; there is 100db of range in the vol control system and there are more than 100 pixels in the display x-axis, so a 1:1 mapping made great sense.
made the brick into something a bit thinner. just reorganized the insides, went with a smaller battery and an alternate charger board. reduced the thickness from 1.25" down to 0.6"
its now more like a regular remote. in fact, its thinner than my old sony dvd IR remote, its lighter and shorter, too.
v1 was a good learning exercise. v2 is much better. maybe v3 will be a real board someday
how can i get the code for this "it now checks for unread email "?
PM me.
but the code is not very good, I'll warn you. it was using the AT commands on the ESP module, which, uhmmm, kinda suck.
if I did it again, I'd use the esp12e or similar and skip the arduino chip entirely. it would all be native C and not those stupid unreliable AT commands.
Hi, where can I get the code?
I did PM, I am just not sure how to view message on this website
I did PM, I am just not sure how to view message on this website
It should just arrive! Check that you have set appropriate permissions in your profile.
Profile => Modify Profile => Personal Messaging
The middle step may not be required - depending on how you view the forum. The personal messaging section allows you to determine who and which messages get through.
had this little oled 128x64 $10 display sitting around and figured I'd put it to good use.
I wrote some arduino code today (took me ALL day) that does a bunch of calendar calculations and formats a 'cal' unix style display, but graphically. there's JUST enough room on this display, with those fonts, to display a 6 line calendar (some odd months have 6 weeks in them, sort of; like the one this month, in fact!).
will upload the source soon as I run a bunch more tests on it.
nice little 5v device. using the (very large, sigh) u8glib library (takes a long time to build, even on a pretty fast i3 system): http://code.google.com/p/u8glib/
device is known as 'sh1106'.
amazon has it:
http://www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00JM88A94
note, that's just one of many vendors that have it.
I might integrate this display and logic with a clock project later on.
Can I get the code and a schematic for it?
Can I get the code and a schematic for it?
I had a 0.96 inch display on my homebrew radio but had it bolted down to rigidly to the case of the radio so broke when my radio fell from my bench,i swapped the original display for a 1.3 inch one,thats the one i broke,do 2.5 inch displays exist with the same controller,are there bigger ssd1306 displays on the market that are ic2?,i want a bigger one on my radio if they even exist?,TIA.
do 2.5 inch displays exist with the same controller,are there bigger ssd1306 displays on the market that are ic2?
You can get 2.42" 128x64 OLED modules based on the SSD1309 controller. The SSD1309 is almost fully compatible with the SSD1306, needing only a slightly different initialisation sequence.