Difference between revisions of "Esp32 - Blinky"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (Created page with " ...")  | 
				|||
| (15 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
'''WebSite:''' ''[http://openhardsoftware.de OH&SW]'' || '''MediaWiki''': '' -[[Software | Software]] -[[Hardware | Hardware]] -[[Projekte - Elektronik | Elektronik]] -[[Projekte - Mechanik | Mechanik]] -[[Anhang | Anhang]]''  | |||
...  | == Übersicht ==  | ||
* 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 ==  | |||
* Im Arduino-Projekt [[Esp32 - Blinky|Esp32 - Blinky]] enthält die System-Konstante '''PERIOD_LEDSYSTEM''' die Vorgabezeit der An- / Aus-Zeit der LedSystem.  | |||
== Quelltext ==  | |||
<syntaxhighlight lang="c++" line>  | |||
//-----------------------------------------  | |||
//  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);  | |||
}  | |||
</syntaxhighlight>  | |||
== Hardware ==  | |||
* [[Esp32UnoBoard|Esp32UnoBoard]], allgemein jedes Esp32Board mit integrierter LedSystem.  | |||
* Usb-Verbindungskabel muss korrekt PC und [[Esp32UnoBoard|Esp32UnoBoard]] verbinden.  | |||
[[file:2110141127_Esp32UnoBoard.png | 2110141127_Esp32UnoBoard | 350px]]  | |||
== Software ==   | |||
Wahlweise   | |||
* [[ArduinoIDE | ArduinoIDE]] (Compiler-Benutzeroberfläche (Homepage: [https://www.arduino.cc Arduino]))   | |||
oder   | |||
* [[VisualStudioCode|VisualStudioCode]] (Compiler-Benutzeroberfläche (Homepage: [https://www.code.visualstudio.com VisualStudioCode])).  | |||
== Download ==  | |||
{| class="wikitable"  | |||
|-  | |||
|Datum    | |||
|Uhrzeit   | |||
|Projekt               | |||
|Version   | |||
|Download  | |||
|-  | |||
|211014  | |||
|1745  | |||
|ArduinoIDE(C-Code): Esp32ArdBlinky  | |||
|01V01  | |||
|'''[[: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]]'''  | |||
|-  | |||
|}  | |||
<hr>  | |||
WebSite:''[http://openhardsoftware.de OH&SW]'' || MediaWiki '' -[[Software | Software]] -[[Hardware | Hardware]] -[[Projekte - Elektronik | Elektronik]] -[[Projekte - Mechanik | Mechanik]] -[[Anhang | Anhang]] || [http://www.openhardsoftware.de/websites/Datenschutz.html Datenschutz] - [http://www.openhardsoftware.de/websites/Impressum.html Impressum]''  | |||
Latest revision as of 20: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