I recently acquired a rotary encoder to use as an input device for my hardware project. Knowing that such encoders make use of Gray code, I cracked open my Digital Design textbook and began coding a sketch for my Arduino. It wasn't as straightforward as I had hoped.
Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts
Thursday, March 31, 2011
Monday, February 28, 2011
AnyPWM Revisited
In my original post, I presented an Arduino sketch that could output PWM on any digital pin. It occurred to me spontaneously that the code was horribly inefficient, both in size and execution. So I've refactored the code a bit, and now it appears to work at least as well as the built in PWM functions.
Saturday, February 26, 2011
PWM on Any Digital Pin on Arduino
I recently got an Arduino to play around with. It's been a few years since I've done some electronics hacking, and I wanted to get back into the hobby. There are tons of low cost embedded microcontrollers to play with these days, compared to when I was back in college, so I decided to give the Arduino a try. My first experiment was to emit PWM signals on any of the digital output pins.
Subscribe to:
Posts (Atom)