Ref. de youtube:
/*
//What is an analogical read: http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/References from youtube, ECG with Arduino:
//https://www.youtube.com/watch?reload=9&v=9Si4efa434U
//https://www.youtube.com/watch?v=xySBTU_9vGo
int L0Mas =11;
int L0Menos = 10;
int Senal =A0;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(L0Mas, INPUT);
pinMode(L0Menos,INPUT);
}
// the loop routine runs over and over again forever:
void loop() {
if ((digitalRead(L0Mas)==1) || (digitalRead(L0Menos)==1)){
Serial.println('!');
}
else{
Serial.println(analogRead(A0));
// read the input on analog pin 0:
//int sensorValue = analogRead(A0);
// print out the value you read:
// int sensorValue1 = digitalRead(11);
// int sensorValue2 = digitalRead(12);
//Serial.println(sensorValue+sensorValue1+sensorValue2);
// delay(1); // delay in between reads for stability
//https://www.youtube.com/watch?reload=9&v=9Si4efa434U
//Serial.println(1024/2);
}
delay(1);
}
///
No hay comentarios:
Publicar un comentario
Si gustas puedes dejar un comentario.