Sunday, April 23, 2017

ESP-32S Wifi Bluetooth Module - control GPIO to blink LED, using Arduino core for the ESP32

This example show how to modify the most basic Blink example, run on ESP-32S Wifi Bluetooth Module using Arduino core for the ESP32, control GPIO to toggle external LED.

The GPIO 21 is used in this example.

(Fritzing part of Node32s is used here)

int LED = 21;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);                       // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(100);                       // wait for a second

No comments:

Post a Comment