Saturday 23 October 2010




It works, but I'll check it with Brock and John before recommending anyone else to use it! I used Fritzing to generate the images, very useful.

http://fritzing.org/ and fun, if you are a hopeless geek that is.


Simple Arduino code:
/*Read and print data from 2 pots and one button i.e 2 analogue, 1 digital input */
void setup(){ Serial.begin(9600);}
void loop(){
//send this data through the serial port:
Serial.print(digitalRead(7)); //button
Serial.print(","); // separate with comma
Serial.print(analogRead(0)); //pot 1
Serial.print(","); // separate with comma
Serial.print(analogRead(1)); // pot2
Serial.print(","); // separate with comma
Serial.println("");
delay(20);}

No comments:

Post a Comment