iot:micropython
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| iot:micropython [2020/04/09 13:17] – [MicroPython] admin | iot:micropython [2025/02/11 10:05] (aktuell) – [Asynchronous Programming mit uasyncio:] admin | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== MicroPython ====== | ====== MicroPython ====== | ||
| - | === MicroPython für ESP8266 / ESP32 === | + | [[iot: |
| + | |||
| + | ==== MicroPython für ESP8266 / ESP32 ==== | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | ==== Develop for / with Micropython ==== | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| - | | + | ==== Porting Micropython ==== |
| + | | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| ==== Blink LED: ==== | ==== Blink LED: ==== | ||
| Zeile 24: | Zeile 36: | ||
| </ | </ | ||
| + | ==== LED Helligkeit per PWM regeln: ==== | ||
| + | |||
| + | <code python> | ||
| + | from machine import Pin, PWM | ||
| + | from time import sleep | ||
| + | |||
| + | frequency = 5000 # Hz: can be a value between 0 and 78125 | ||
| + | led = PWM(Pin(2), frequency) | ||
| + | |||
| + | while True: | ||
| + | for duty_cycle in range(0, 1024): #can be a value between 0 and 1023 (100%) | ||
| + | led.duty(duty_cycle) | ||
| + | sleep(0.005) | ||
| + | </ | ||
| + | |||
| + | Quelle: https:// | ||
| + | |||
| + | ==== Ping auf dem ESP32 ==== | ||
| + | |||
| + | * https:// | ||
| + | |||
| + | ==== Asynchronous Programming mit uasyncio: ==== | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| ==== MQTT auf dem ESP32: ==== | ==== MQTT auf dem ESP32: ==== | ||
| * https:// | * https:// | ||
| Zeile 41: | Zeile 78: | ||
| </ | </ | ||
| + | ==== I2S Audio auf dem ESP32: ==== | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ==== BME280==== | ||
| + | |||
| + | * https:// | ||
| ==== DHT11/22 (ESP32)==== | ==== DHT11/22 (ESP32)==== | ||
| Zeile 95: | Zeile 140: | ||
| </ | </ | ||
| + | ==== Freien Speicher ermitteln ==== | ||
| + | <code python> | ||
| + | >>> | ||
| + | >>> | ||
| + | >>> | ||
| + | 107488 | ||
| + | >>> | ||
| + | >>> | ||
| + | </ | ||
iot/micropython.1586438226.txt.gz · Zuletzt geändert: von admin
