18-05-2016, 18:35
jest prosta metoda tylko nie wiem czy o coś takiego ci chodzi
Kod:
int q1,q2,q3;
void setup() {
Serial.begin(9600);
}
void loop() {
q1 = analogRead(A0);
q2 = analogRead(A1);
q3 = analogRead(A2);
przelicz(q1,q2,q3);
Serial.print(q1);
Serial.print(" / ");
Serial.print(q2);
Serial.print(" / ");
Serial.println(q3);
}
void przelicz(int a , int b ,int c){
q1 = map(a, 0, 1023, 0, 100);
q2 = map(b, 1023, 0, 0, 100);
q3 = c/4;
return;
}
Ważne aby robić co się lubi albo lubić co się robi .
Arduino UNO, TINY, PRO MINI
Pomoc nagradzamy punktami reputacji
Arduino UNO, TINY, PRO MINI
Pomoc nagradzamy punktami reputacji