back to normal output

This commit is contained in:
interfisch 2022-01-15 13:20:49 +01:00
parent d0f78ab0d8
commit b5a00b9926
1 changed files with 5 additions and 6 deletions

View File

@ -10,8 +10,7 @@ uint16_t countedLow[INPUTS]; //count the times input was below threshold (touche
// Inputdelay is given by: COUNTEDLOWTHRESHOLD*ADCREADINTERVAL
unsigned long last_adcmicros=0;
//#define ADCREADINTERVAL 2000 //in microseconds. interval to read all adc values
#define ADCREADINTERVAL 20000 //in microseconds. interval to read all adc values
#define ADCREADINTERVAL 2000 //in microseconds. interval to read all adc values
unsigned long last_send=0;
#define MINIMUMSENDDELAY 10 //in milliseconds. minimum delay between serial sends
@ -50,11 +49,11 @@ void loop() {
//Serial.print(analogRead(A1));
//Serial.print(": ");
//Serial.println(micros()-mic);
Serial.print(rawIn[1]);
/*
Serial.print(rawIn[0]);
Serial.print(", ");
Serial.print(rawIn[1]);
Serial.println();
Serial.println();*/
for (uint8_t i=0;i<INPUTS;i++){ //for all inputs
if (rawIn[i]<=TOUCHTHRESHOLD) { //touch detected (input low at this sample)
@ -89,7 +88,7 @@ void loop() {
touchOut=newTouch; //update
last_send=loopmillis;
//Serial.println(touchOut, BIN); //Debug output
//Serial.write(touchOut); //Send byte
Serial.write(touchOut); //Send byte
}
}