You are here: Forum Home → ANT Developers Forums → ANT General Questions → Thread
while (digitalRead( CTS_PIN ) == HIGH) {};
attachInterrupt(digitalPinToInterrupt(CTS_PIN), wait, FALLING);
.
.
void wait(void)
{
while (digitalRead(CTS_PIN) != HIGH) {}
}
if (mySerial.available())
{
Serial.print(mySerial.read(), HEX);
Serial.print(" ");
}
return;
pinMode(LL_ENABLE, OUTPUT); // pull HIGH to enable logic level translator
pinMode(RESET_PIN, OUTPUT);
pinMode(CTS_PIN, INPUT_PULLUP);
digitalWrite(RESET_PIN, HIGH);
digitalWrite(LL_ENABLE, HIGH); //toggle the logic level shifter on
Serial.begin(BAUD_RATE);
mySerial.begin(BAUD_RATE);
// issue reset
digitalWrite(RESET_PIN, LOW);
delayMicroseconds(1);
digitalWrite(RESET_PIN, HIGH);
delay(500);
if (mySerial.available())
{
Serial.print(mySerial.read(), HEX);
Serial.print(" ");
}
return;
pinMode(LL_ENABLE, OUTPUT); // pull HIGH to enable logic level translator
pinMode(RESET_PIN, OUTPUT);
pinMode(CTS_PIN, INPUT_PULLUP);
digitalWrite(RESET_PIN, HIGH);
digitalWrite(LL_ENABLE, HIGH); //toggle the logic level shifter on
Serial.begin(BAUD_RATE);
mySerial.begin(BAUD_RATE);
// issue reset
digitalWrite(RESET_PIN, LOW);
delayMicroseconds(1);
digitalWrite(RESET_PIN, HIGH);
delay(500);