Arduino Duemilanove
/*
motor:
motor pin - too ground
resistor pin 1 and diode pin + to motor pin +
pwmout pin 10 too diode - and resistor pin 2.
control wheel:
pin 1 to 5v+
pin 2 to analog 0
pin 3 to GND
*/
int vresistor=0;
void setup(){
Serial.begin(9600);
}
void loop(){
vresistor=analogRead(0);
vresistor=map(vresistor,0,1023,0,255);
Serial.println(vresistor,DEC);
analogWrite(10,vresistor);
}
I'ts queen:"I want it all"
transistorbaluba 4 months ago