DualMCU
ESP32
SKU: UE0002
3) In the text editor space start writing the following code:
#define LED_R 4
#define LED_G 26
#define LED_B 25
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_G, OUTPUT);
Serial.begin(115200);
}
void loop() {
Serial.println(
“
Hello World! This is the ESP32 MCU from DualMCU -
Blinking a LED
”
);
digitalWrite(LED_G, LOW);
// turn the BLUE LED on
delay(1000);
// wait for a second
digitalWrite(LED_G, HIGH);
// turn the BLUE LED off
delay(1000);
// wait for a second
}
4) Save the sketch as “Hello World” in the “
File
” menu and select: “
Save
”. Then click
the upload button or press “CTRL + U” from keyboard to compile and upload the
code to the ESP32 MCU:
33
Unit Electronics ® DualMCU ESP32
Modified: 26/06/2023