Skip to main content
CART

Example — Jdy-40 Arduino

void loop() { if (jdy.available()) { char c = jdy.read(); digitalWrite(ledPin, (c == '1') ? HIGH : LOW); } }

#include <SoftwareSerial.h> SoftwareSerial jdy(2, 3); // RX = pin 2, TX = pin 3 const int ledPin = 5; void setup() { pinMode(ledPin, OUTPUT); jdy.begin(9600); } jdy-40 arduino example

void setup() { pinMode(buttonPin, INPUT_PULLUP); jdy.begin(9600); // Match JDY-40 baud rate } void loop() { if (jdy

#include <SoftwareSerial.h> SoftwareSerial jdy(2, 3); // RX = pin 2, TX = pin 3 const int buttonPin = 4; int lastState = LOW; } } #include &lt

void loop() { int currentState = !digitalRead(buttonPin); // active LOW if (currentState != lastState) { jdy.write(currentState ? '1' : '0'); lastState = currentState; } delay(50); }

Contact

  • ANATOLIS 9-15, N. IONIA, 14231

  • +30 (210) 2792444

  • +30 (210) 2798444

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Newsletter

Design & development by Web Intelligence