Usage Example for Arduino-Jumper-Triggered Signal Transmission

This article offers a comprehensive guide on using Arduino for jumper-triggered signal transmission, detailing the necessary hardware and software, connection setup, sample code, and the expected results when employing wireless switches for efficient signal communication.

  • This sample is mainly used for demonstration: the transmitter is powered by the battery and the radio frequency signal is sent out by the jumper short circuit
  • Take Arduino as an example, the other main controllers use the same principle, only need to connect to the corresponding digital port.
  • Take inching mode in the receiver as an example, the principles of other modes are the same

Hardware Preparation

Software Preparation

Connection

The transmitting end:

Receiving end:

Sample code

#define Button_D2 2//Arduino
//#define Button_D2 D2 //ESP32

void setup() {
    Serial.begin(115200);
    pinMode(Button_D2, INPUT);
}
void loop() {
    if (digitalRead(Button_D2)) {
        Serial.println("Pressed:D2");
        delay(1000);
    }
}

Result

1. Connect the power first, then use the lead/jumper cap to short-circuit the red and green pins of the transmitting D0 port, the transmitter will emit a signal, and the corresponding pin of the receiver will receive the signal at the same time

2. Use the lead wire/jumper cap to short-circuit the red and green pins of the transmitting end D0 port, and supply power to the transmitter through a controllable power supply(Power supply time>60ms). The transmitter port connected to the wire will send a signal at the moment of powering on, and the corresponding pin of the receiver will receive the signal at the same time. If the power supply continues to supply power, the transmitter will always be in the transmitting state.

Was this article helpful?

TOP