This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include "lmic.h" | |
#include <hal/hal.h> | |
#include <SPI.h> | |
#include <SSD1306.h> | |
#define LEDPIN 25 | |
#define OLED_I2C_ADDR 0x3C | |
#define OLED_SDA 21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* ShopOfThings.ch | |
* | |
* Beispiel für DHT22 mit ESP32 DEVKITV1 Entwicklungsboard | |
* | |
* Pinverbindung: | |
* | |
* + > 3V3 | |
* - > GND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
(c) 2019 by shopofthings.ch | |
Beispiel zum Verbinden des GPS Modules mit | |
einem ESP32 Modul | |
Pinverbindung: | |
ESP 3.3V > GPS VCC | |
ESP GND > GPS GND | |
ESP RX > GPS TX | |
ESP TX > GPS RX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int channel = 0; | |
int resolution = 8; | |
void setup() { | |
Serial.begin(115200); | |
ledcSetup(channel, 2000, resolution); | |
ledcAttachPin(12, channel); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <Encoder.h> | |
#include <WiFiClient.h> | |
#include <ArduinoJson.h> // Achtung! Nur Version 5 installieren; V6 gibt Fehler | |
/* Verknüpfung von D? mit GPIO# */ | |
static const uint8_t D0 = 16; | |
static const uint8_t D1 = 5; | |
static const uint8_t D2 = 4; | |
static const uint8_t D3 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <ArduinoJson.h> | |
#include <SSD1306Brzo.h> | |
#include <WiFiUdp.h> | |
#include <ArduinoOTA.h> | |
#include <WiFiClientSecure.h> | |
// SHA1 Fingerprint von Bitstamp.net | |
const char* fingerprint = "D0 26 AB 06 64 07 BC 88 56 6D 83 BE 0A 29 00 B5 10 E5 27 D2"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void start() { | |
// Verbindung mit WLAN | |
// ...... | |
// andere Programmteile die beim start() aufgerufen werden sollen | |
// ...... | |
// OTA Code | |
ArduinoOTA.onStart([]() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
// Mit oder ohne Verschlüsselung wählen (Zeile ausklammern die nicht gebraucht wird) | |
// Für Verbindungen über Port 80 | |
#include <WiFiClient.h> | |
// Für Verbindung über Verschlüsselten (SSL) Port z.B. 443 | |
//#include <WiFiClientSecure.h> | |
// den Fingerprint (SHA1) kann man im Browser der entsprechenden Webseite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dieses Programm macht aus Deinem ESP8266 einen Webserver | |
// mit dem Du Dich via W-Lan über Dein Heimnetz verbinden kannst. | |
// Wenn Du dann mit dem Browser auf die Seite der zugewiesenen IP in Deinem Netz gehst | |
// spuckt sie einen Text aus und die LED blinkt | |
#include <ESP8266WiFi.h> // Brauchst Du, sobald du die W-Lan Funktionen benutzen willst | |
#include <WiFiClient.h> // Damit wird Deine ESP8266 zu einem Client von Deinem Heimnetz | |
#include <ESP8266WebServer.h> // Damit Du selber ein Webserver erstellen kannst | |
#include <ESP8266mDNS.h> // damit kannst Du deine ESP8266 einen Namen im Netz geben |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Type SYSTEM_POWER_STATUS | |
ACLineStatus As Byte | |
BatteryFlag As Byte | |
BatteryLifePercent As Byte | |
Reserved1 As Byte | |
BatteryLifeTime As Long | |
BatteryFullLifeTime As Long | |
End Type | |
Private Declare Function GetSystemPowerStatus Lib "kernel32" (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long | |
Private Sub GetBatteryStatus() |
NewerOlder