Esp32

Aus Info-Theke
Zur Navigation springen Zur Suche springen

Links[Bearbeiten]

Beispiel[Bearbeiten]

#include <Arduino.h>

// Set LED_BUILTIN if it is not defined by Arduino framework
#ifndef LED_BUILTIN
    #define LED_BUILTIN 2
#endif

void setup()
{
  Serial.begin(9600);
  Serial.println("=== start");
  // initialize LED digital pin as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
  // turn the LED on (HIGH is the voltage level)
  Serial.print("On");
  digitalWrite(LED_BUILTIN, HIGH);
  // wait for a second
  delay(1000);
   Serial.println("Off");
  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);
   // wait for a second
  delay(1000);
}
[env:nodemcu-32s]
platform = espressif32
board = nodemcu-32s
framework = arduino

monitor_speed=9600
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino

monitor_speed=9600
  • com3 - USB-SERIAL CH340 (COM3)