Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int tiempo = 0;
- int uno = A0;
- int dos = A1;
- int tres = A2;
- void setup () {
- pinMode(uno, INPUT);
- pinMode(dos, INPUT);
- pinMode(tres, INPUT);
- Serial.begin(9600);
- }
- void loop() {
- /*Valor Del tiempo Obtenido por el puerto serie*/
- if(Serial.available()>0)
- tiempo=Serial.parseInt();
- /*Lee los voltajes de los pines A0, A1, y A2.Son guardados en tres variables locales.*/
- int un = analogRead(uno);
- int d = analogRead(dos);
- int t = analogRead(tres);
- char nom[83]="text";
- sprintf(nom, "Eje 1: %4d Eje 2: %4d K: %4d ", un,d,t);
- Serial.println(nom);
- delay(tiempo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement