Another ProMini 3.3V timing isue and the solution
-
At the moment I'm developing an IntervaloMeter. It's not going to be a MySensors project, well indirectly it is. It's a device that can send a shutter trigger signal to my Nokia D90 digital camera on a interval basis. I'm developing this device, so that I can make a time lapse of the MySensors wake-up light I've developed. So that you guys can see the different color changes. Since I don't own an original WakeUp light, I could use your opinion.
For the intervaloMeter I'm using a ProMini 3.3V with a Nokia 5110 display.
Since the AdaFruit library for that LCD display uses pin 3, I couldn't use pin 3 for hooking the Ir transmitter led to the Arduino. So I couldn't use IRremote.h which I think is part of MySensors.After having a hard time getting the Ir to work on the ProMini 3.3V, I realized I had three options:
- Use a ProMini 5V because that has a 16Mhz processor for which most of the libraries are optimized. But I wanted this to be a 2 AA battery project. I kept that as the last resource.
- Look for another LCD display that doesn't use pin 3 and that also only needs 3.3V. This wasn't the first option I wanted to go for. I had spent 24 hours developing a User Interface that is optimized for the best User Experience I could come up with for the Nokia 5110 lcd display. Yeah I know, I should have sorted out how to control the Ir led with a ProMini 3.3V first, but I didn't
- Look for a way to free Pin 3. This was the first one I wanted to explore.
After some research I came across this pdf from AdaFruit https://learn.adafruit.com/downloads/pdf/nokia-5110-3310-monochrome-lcd.pdf
I hooked up the Nokia 5110 reset pin to the RST pin of the ProMini and bingo!!! It works so now I have pin three available. The PDF contains more tips, about how you can hook up the LCD with only 3 pins, which also might mean, that I'll be able to use the Nokia 5110 in a MySensor project ;-).
I was now able to use the IRremote.h library by Ken Shirriff's. It uses the Arduino internal PWM timers which is really accurate when it comes to timing. My D90 responds to each IR command triggered by my Arduino. I'm really happy that I didn't spend 24 hours developing a user interface , that I had to throw away. But even if I would have, on the positive side I learned a great deal on designing a pretty good User Interface with the Arduino and the Nokia 5110 (I'll post a video on this topic in the future).
Apologies for this long story, especially since it's not about MySensors. But maybe I helped someone with sharing my findings.
p.s. Maybe we can keep track of all 8Mhz friendly libraries. Because as much as I like the ProMini 3.3V. I found out, that I spend a lot of time finding the right libraries for 8Mhz processors.
-
Cool solution, thanks for sharing!
-
@mfalkvidd Thank you.
I just remembered I would have had a 4th option. Using a ATtiny85 to transmit the IR-code. But I haven't really digged into the ATtiny85 it's still on my wishlist. I could have programmed the ATtiny85 to listen to a digital input and let it fire the IR code on an interrupt, let's say if the pin is lowering (should work in theory if you use an internal pullup)