In my last post, we worked through digital inputs using push-buttons, and we also started looking at interrupts. This time we'll start looking at how to interface an analog sensor. These sensors can be range-finders (I have a Sharp GP2D12), potentiometers (adjustable resistors) and environmental sensors (temperature, humidity, force, accelerometer, gyros, et cetera.)
Now that we know what we're dealing with, let's get down to business...
meisjohn's Projects
My projects, electronics and software, most likely...
Thursday, February 3, 2011
Wednesday, January 26, 2011
Let's Add Sensors, Part 1
Now that we can act on the physical realm, let's add sensors to observe it. There's all sorts of sensors out there, but there three basic interfaces to those sensors, digital, analog or via some sort of higher-level communications protocol (i2c, serial, parallel, et cetera).
I've got some of each of these, so we'll go through and try them each out one-by-one. Let's pick the digital inputs first.
I've got some of each of these, so we'll go through and try them each out one-by-one. Let's pick the digital inputs first.
Saturday, January 22, 2011
Up Next: Servo and Serial
Okay, we've got the computer and the arduino board working together. Let's start doing something interesting, like driving a Servo. Again, I did a little research on the Arduino website, and started with one of the sample sketches.
This has me thinking back to college where I spent many hours getting a Motorola HC12 to drive a servo. You had to enable the right pins, configure your PWM channels to make sure your duty cycles matched the servo specifications, break out the old monster of an oscilloscope to figure out what you're actually sending, when it doesn't work-- all in assembly code.
So, how do you do it with Arduino?
This has me thinking back to college where I spent many hours getting a Motorola HC12 to drive a servo. You had to enable the right pins, configure your PWM channels to make sure your duty cycles matched the servo specifications, break out the old monster of an oscilloscope to figure out what you're actually sending, when it doesn't work-- all in assembly code.
So, how do you do it with Arduino?
Connecting to Arduino & My First Sketch
I just received my first Arduino board (the Uno) as part of my spoils from the SparkFun Electronics free day.
My goal? Toy around, clearly. But seriously, I'd like to build some sort of autonomous robot eventually. I'd love to get my kids involved at some level, but they're still very young. We'll see how that works out eventually.
First things first, though... let's get a blinky app going.
My goal? Toy around, clearly. But seriously, I'd like to build some sort of autonomous robot eventually. I'd love to get my kids involved at some level, but they're still very young. We'll see how that works out eventually.
First things first, though... let's get a blinky app going.
Subscribe to:
Posts (Atom)