Among my several fun toys from Sparkfun's Free Day is an Arduino Duemilanove. Everyone else seems to be having fun with them as an easy-to-use microprocessor development environment for projects, so I figured I might as well jump on the bandwagon to see what all the fuss is about. I received my Sparkfun freebies today, as noted elsewhere on the Cemetech forum, so I started setting up the Arduino and seeing what programming it is like. The development environment seems pretty intuitive so far, and I like the C++ish syntax. I began by trying to interface the Thumb Slide Joystick from Sparkfun, but unfortunately the product info they had on the pinout of the device incorrect. I did some searching and debugging, and discovered the correct pinout. With the nub up and facing you, and the pins on the bottom away from you and pointing towards your chest, from left (pin 1) to right (pin 4):
1) x-axis output
2) +5V
3) y-axis output
4) gnd
Just to make sure I'm clear, my pin 4 is the one closest to the two screw/mounting holes. When connected to an Arduino, I get a range of about 128 to 775 on each axis, with enough consistency to check if it's at -x, center-x, +x, and -y, center-y, and +y. It has a fairly large range of "nominal" values when centered, but this isn't a problem for me since my application doesn't involve reading a range of values. Here's a random picture of the (very simple) testbed:
More Arduino fun coming soon.
Edit: I pulled out the control board and hardware stack for the VUFan rig out of my closet, hooked it up to the Arduino, coded a 2-minute binary counter, and voila!
Edit #2: After several hours of coding and debugging, I wrote a C++ program to read DiscoLitez-generated information off of the network and pipe it to a serial port, then an Arduino program to read in the serial data and control the fans accordingly. Video follows:
For those who missed the VUfan project the first time, here's how the very first iteration looked:
1) x-axis output
2) +5V
3) y-axis output
4) gnd
Just to make sure I'm clear, my pin 4 is the one closest to the two screw/mounting holes. When connected to an Arduino, I get a range of about 128 to 775 on each axis, with enough consistency to check if it's at -x, center-x, +x, and -y, center-y, and +y. It has a fairly large range of "nominal" values when centered, but this isn't a problem for me since my application doesn't involve reading a range of values. Here's a random picture of the (very simple) testbed:
More Arduino fun coming soon.
Edit: I pulled out the control board and hardware stack for the VUFan rig out of my closet, hooked it up to the Arduino, coded a 2-minute binary counter, and voila!
Edit #2: After several hours of coding and debugging, I wrote a C++ program to read DiscoLitez-generated information off of the network and pipe it to a serial port, then an Arduino program to read in the serial data and control the fans accordingly. Video follows:
For those who missed the VUfan project the first time, here's how the very first iteration looked: