Verify jumper wire connection between TX and RX pins.
Tests that a physical jumper wire correctly connects the TX and RX pins by setting TX HIGH/LOW and verifying RX reads the same values.
7 {
8 FL_WARN(
"Verifying jumper wire connection between GPIO " << pin_tx <<
" and GPIO " << pin_rx <<
"...");
9
12
13
17
18
22
23 if (rx_high != HIGH || rx_low != LOW) {
24 FL_ERROR(
"Jumper wire sanity check FAILED!");
25 FL_ERROR(
" digitalWrite(TX=" << pin_tx <<
", HIGH) → digitalRead(RX=" << pin_rx <<
") = " << rx_high <<
" (expected HIGH=1)");
26 FL_ERROR(
" digitalWrite(TX=" << pin_tx <<
", LOW) → digitalRead(RX=" << pin_rx <<
") = " << rx_low <<
" (expected LOW=0)");
28 FL_ERROR(
"REQUIRED: Physically connect GPIO " << pin_tx <<
" to GPIO " << pin_rx <<
" with a jumper wire!");
29 return false;
30 }
31
32 FL_WARN(
"✓ Jumper wire verified: GPIO " << pin_tx <<
" → GPIO " << pin_rx <<
" signal path working");
33 return true;
34}
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
void pinMode(int pin, PinMode mode)
Set pin mode (input, output, pull-up, pull-down)
PinValue digitalRead(int pin)
Read digital value from pin.
void digitalWrite(int pin, PinValue val)
Write digital value to pin.