Wednesday, May 13, 2009

150 miles

I am better. I still have some hematoma formations in my pelvis, chin, and knee. They feel like weak bruises but also make my skin stick out a bit... oh well, I am back to riding to work which feels awesome.

I got the oled screen to work.

ok, thats all... see ya.

... you want pictures?

If you don't recall, this is a OLED carrier board from sparkfun, you can get one here. Though, they have moved from my version of v.01 to v.22, I hope I don't have a bomb waiting to happen? I am talking to it from my ardunio.

This was the goal of that level shifting board I made and failed to make work a while back, the problem stems from the ardunio being a 5 volt native board and this oled guy a 3.3 volt board. arg. So my first idea was to have a small level shifting board so I can get bidirectional comm between the two. But after almost giving up and buying a 3.3volt ardunio (again from sparkfun) I decided to try it again with a more caveman approach. As much as it pains me, this is how I am making 5 volts turn into 3.3:

5 Volt output
3k resistor
|------- 3.3 volt input
2k resistor

For each output. you can see on the top pictures on the brown/tan board. I also had to supply the OLED screen with a 3.3 volt source so you can also see the voltage regulator up there.

After that I stole some code from the sparkfun site, it links to here. This code is for AVR, but really ardunio is just c++ with some funny copying, so it took little work to make it do the magic dance on my ardunio.

One thing I changed: I am talking to the OLED board via the serial interface. So I had to write a cheesy serial out function for data and commands. It goes much slower than the parallel version, but I can live with it for now until I figure out what I want to do with this.

If you would like my sketch, email me and I can send it to you...

Oh, and my hoya flowered after almost 7 years.