Way back in December, some of us in the IDEO London studio started talking in a pub about some of the ideas arising out of OpenIDEO and its challenges for social good. We wondered: How could we help the digital community build out more of these winning tech and design solutions? What would happen if [...]
Timer1 is an AVR and Arduino compatible software library for the ATmega168 microcontroller. It provides a user friendly interface for taking advantage of two commonly used features of an on-chip hardware timer:
- pulse width modulated analog voltage
- timer overflow interrupt handling.
Initially this library was built to address the fact that Arduino’s analogWrite() function does not provide a mechanism to change the period or frequency of any of the timers which drive hardware based pulse width modulation, but it has since grown to accommodate the interrupt handling features as they are related and just downright useful.
Some of the things we have used the library for on projects in house include:
- CPU independent servo control
- Frequency generation in the audible range (digital synthesis)
- Integrated hardware / software PWM control for independently variable analog voltages on 12 pins simultaneously (4x RGB leds)
You can download the library and learn much more about the project by visiting our page on the Arduino Playground at: http://www.arduino.cc/playground/Code/Timer1