Jumperless/Jumperless Wokwi Bridge App/JumperlessWokwiBridge/WokwiSketch/WokwiSketch.ino

37 lines
748 B
Arduino
Raw Normal View History

2024-01-15 01:37:16 +01:00
void setup() {
2023-12-31 01:46:53 +01:00
2024-01-15 01:37:16 +01:00
pinMode(LED_BUILTIN, OUTPUT);
pinMode(10, INPUT_PULLUP);
delay(1600);
Serial.begin(115200);
delay(600);
2023-12-31 01:46:53 +01:00
}
2024-01-15 01:37:16 +01:00
int count = 2;
void loop() {
2024-01-15 01:37:16 +01:00
digitalWrite(LED_BUILTIN, HIGH);
delay(1230);
digitalWrite(LED_BUILTIN, LOW);
delay(10);
if (digitalRead(10) == 0) {
delay(3000);
}
Serial.write("f 105-"); //5V
Serial.print(count);
Serial.write(",116-70,117-71,"); //these 2 connections reconnect the UART lines so it's ready to send the next connection
// Serial.write("::bridgelist["); //5V
// Serial.print(count);
// Serial.write("-105,116-70,117-71,]"); //these 2 connections reconnect the UART lines so it's ready to send the next connection
2023-12-31 01:46:53 +01:00
2024-01-15 01:37:16 +01:00
count++;
if (count > 29) {
count = 3;
}
}