Difference between revisions of "Esp32 - Blinky"
Jump to navigation
Jump to search
(11 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Übersicht == | == Übersicht == | ||
* Einfaches Beispiel zur Programmierung und zum Test eines Esp32-MicroControllers. | * Einfaches Beispiel zur Programmierung und zum Test eines Esp32-MicroControllers. | ||
* Typische Hardware: Esp32UnoBoard mit | * Typische Hardware: Esp32UnoBoard mit integrierter LedSystem. | ||
* Funktion: nach dem Reset | * Funktion: nach dem Reset schaltet der Esp32 alle Sekunde für 500ms die LedSystem ON und danach für 500ms die LedSystem OFF. | ||
== Vorgabe == | == Vorgabe == | ||
* Im Arduino-Projekt [[Esp32 - | * Im Arduino-Projekt [[Esp32 - Blinky|Esp32 - Blinky]] enthält die System-Konstante '''PERIOD_LEDSYSTEM''' die Vorgabezeit der An- / Aus-Zeit der LedSystem. | ||
== Quelltext == | == Quelltext == | ||
Line 50: | Line 50: | ||
== Hardware == | == Hardware == | ||
* [[Esp32UnoBoard|Esp32UnoBoard]], allgemein jedes Esp32Board mit | * [[Esp32UnoBoard|Esp32UnoBoard]], allgemein jedes Esp32Board mit integrierter LedSystem. | ||
* Usb-Verbindungskabel muss korrekt PC und [[Esp32UnoBoard|Esp32UnoBoard]] verbinden. | |||
[[file:2110141127_Esp32UnoBoard.png | 2110141127_Esp32UnoBoard | 350px]] | [[file:2110141127_Esp32UnoBoard.png | 2110141127_Esp32UnoBoard | 350px]] | ||
Line 57: | Line 58: | ||
Wahlweise | Wahlweise | ||
* [[ArduinoIDE | ArduinoIDE]] (Compiler-Benutzeroberfläche (Homepage: [https://www.arduino.cc Arduino])) | * [[ArduinoIDE | ArduinoIDE]] (Compiler-Benutzeroberfläche (Homepage: [https://www.arduino.cc Arduino])) | ||
oder | oder | ||
* [[VisualStudioCode|VisualStudioCode]] (Compiler-Benutzeroberfläche (Homepage: [https://www.code.visualstudio.com VisualStudioCode | * [[VisualStudioCode|VisualStudioCode]] (Compiler-Benutzeroberfläche (Homepage: [https://www.code.visualstudio.com VisualStudioCode])). | ||
== Download == | == Download == | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 88: | Line 72: | ||
|- | |- | ||
|211014 | |211014 | ||
| | |1745 | ||
| | |ArduinoIDE(C-Code): Esp32ArdBlinky | ||
| | |01V01 | ||
|'''[[:File: | |'''[[:File:2110141745_Esp32ArdBlinky_01V01.zip | 2110141745_Esp32ArdBlinky_01V01.zip]]''' | ||
|- | |||
|21mmdd | |||
|hhmm | |||
|ArduinoIDE(Cpp-Code): Esp32ArdBlinky | |||
|01V02 | |||
|'''[[:File:21xxxxxxxx_Esp32ArdBlinky_01V02.zip | 21xxxxxxxx_Esp32ArdBlinky_01V02.zip]]''' | |||
|- | |||
|21mmdd | |||
|hhmm | |||
|VSCode(C-Code): Esp32VscBlinky | |||
|02V01 | |||
|'''[[:File:21xxxxxxxx_Esp32VscBlinky_02V01.zip | 21xxxxxxxx_Esp32VscBlinky_02V01.zip]]''' | |||
|- | |||
|21mmdd | |||
|hhmm | |||
|VSCode(Cpp-Code): Esp32VscBlinky | |||
|02V02 | |||
|'''[[:File:21xxxxxxxx_Esp32VscBlinky_02V02.zip | 21xxxxxxxx_Esp32VscBlinky_02V02.zip]]''' | |||
|- | |- | ||
|} | |} |
Latest revision as of 21:18, 14 October 2021
WebSite: OH&SW || MediaWiki: - Software - Hardware - Elektronik - Mechanik - Anhang
Übersicht[edit]
- Einfaches Beispiel zur Programmierung und zum Test eines Esp32-MicroControllers.
- Typische Hardware: Esp32UnoBoard mit integrierter LedSystem.
- Funktion: nach dem Reset schaltet der Esp32 alle Sekunde für 500ms die LedSystem ON und danach für 500ms die LedSystem OFF.
Vorgabe[edit]
- Im Arduino-Projekt Esp32 - Blinky enthält die System-Konstante PERIOD_LEDSYSTEM die Vorgabezeit der An- / Aus-Zeit der LedSystem.
Quelltext[edit]
//-----------------------------------------
// Application: Esp32Blinky
// Version....: 01V01
// DateTime...: 2110141741
// Author.....: OMdevelop
//-----------------------------------------
//
//-----------------------------------------
// Definition
//-----------------------------------------
const int PIN_LEDSYSTEM = 2;
//
const int PERIOD_LEDSYSTEM = 1000; // [ms]
//
//
//-----------------------------------------
// Main - Setup
//-----------------------------------------
void setup()
{ // Configuration LedSystem
pinMode(PIN_LEDSYSTEM, OUTPUT);
}
//
//-----------------------------------------
// Main - Loop
//-----------------------------------------
void loop()
{ // LedSytem ON
digitalWrite(PIN_LEDSYSTEM, HIGH);
delay(PERIOD_LEDSYSTEM >> 1);
// LedSytem OFF
digitalWrite(PIN_LEDSYSTEM, LOW);
delay(PERIOD_LEDSYSTEM >> 1);
}
Hardware[edit]
- Esp32UnoBoard, allgemein jedes Esp32Board mit integrierter LedSystem.
- Usb-Verbindungskabel muss korrekt PC und Esp32UnoBoard verbinden.
Software[edit]
Wahlweise
- ArduinoIDE (Compiler-Benutzeroberfläche (Homepage: Arduino))
oder
- VisualStudioCode (Compiler-Benutzeroberfläche (Homepage: VisualStudioCode)).
Download[edit]
Datum | Uhrzeit | Projekt | Version | Download |
211014 | 1745 | ArduinoIDE(C-Code): Esp32ArdBlinky | 01V01 | 2110141745_Esp32ArdBlinky_01V01.zip |
21mmdd | hhmm | ArduinoIDE(Cpp-Code): Esp32ArdBlinky | 01V02 | 21xxxxxxxx_Esp32ArdBlinky_01V02.zip |
21mmdd | hhmm | VSCode(C-Code): Esp32VscBlinky | 02V01 | 21xxxxxxxx_Esp32VscBlinky_02V01.zip |
21mmdd | hhmm | VSCode(Cpp-Code): Esp32VscBlinky | 02V02 | 21xxxxxxxx_Esp32VscBlinky_02V02.zip |
WebSite:OH&SW || MediaWiki - Software - Hardware - Elektronik - Mechanik - Anhang || Datenschutz - Impressum