Oversikt innlegg
Logg inn
Daily Archives: 18/10/2010
Schematics of Circuit and arduino code for the Lue project
int bend1, bend2, temp;
void setup() {
//Serial.begin(9600); //debug
}
void loop() {
bend1= analogRead(1);
bend1= map(bend1, 0, 1023, 0, 255);
analogWrite(9, bend1);
bend2= analogRead(2);
bend2= map(bend2, 0, 1023, 0, 255);
analogWrite(10, bend2);
temp= analogRead(3);
temp= map(temp, 0, 1023, 0, 255);
//Serial.println(temp); //debug
temp= map(constrain(temp, 119, 132), 132, 119, 0, 255); //callibration here
analogWrite(11, temp);
}
Publisert i Uncategorized