practice1 — ESP32 simulation

An interactive ESP32 circuit simulation you can run free in your browser on Velxio, by ajakriak82.

Components

Sketch code

#define RX_PIN 16
#define TX_PIN 17

void setup() {
  Serial.begin(115200);

  // UART2
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN);

  Serial.println("Sink Node Started");
  Serial.println("Waiting for sensor data...");
}

void loop() {

  if (Serial2.available()) {

    String packet = Serial2.readStringUntil('\n');

    Serial.print("Received: ");
    Serial.println(packet);
  }
}

More projects by ajakriak82