Benutzer-Werkzeuge

Webseiten-Werkzeuge


iot:micropython

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
iot:micropython [2020/12/27 13:34] – [MicroPython] adminiot:micropython [2025/02/11 10:05] (aktuell) – [Asynchronous Programming mit uasyncio:] admin
Zeile 16: Zeile 16:
   * https://github.com/micropython/micropython-lib   * https://github.com/micropython/micropython-lib
   * https://github.com/adafruit/circuitpython   * https://github.com/adafruit/circuitpython
 +
 +==== Porting Micropython ====
 +  * https://docs.micropython.org/en/latest/develop/porting.html
 +  * https://www.snaums.de/informatik/porting-micropython-to-bare-metal-raspberry-pi.html
 +  * https://www.snaums.de/informatik/porting-micropython-to-the-raspberry-pi-part-2.html
 +  * https://forum.micropython.org/viewtopic.php?t=5779
 +
 ==== Blink LED: ==== ==== Blink LED: ====
  
Zeile 29: Zeile 36:
 </code> </code>
  
 +==== 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)
 +</code>
 +
 +Quelle: https://randomnerdtutorials.com/esp32-esp8266-pwm-micropython/
 +
 +==== Ping auf dem ESP32 ====
 +
 +  * https://gist.github.com/shawwwn/91cc8979e33e82af6d99ec34c38195fb
 +
 +==== Asynchronous Programming mit uasyncio: ====
 +
 +  * https://gpiocc.github.io/learn/micropython/esp/2020/06/13/martin-ku-asynchronous-programming-with-uasyncio-in-micropython.html
 +  * https://www.youtube.com/watch?v=2IW-ZEui4h4 -- How To Easily Do Asynchronous Programming With Asyncio In Python
 ==== MQTT auf dem ESP32: ==== ==== MQTT auf dem ESP32: ====
   * https://boneskull.com/micropython-on-esp32-part-2/   * https://boneskull.com/micropython-on-esp32-part-2/
Zeile 46: Zeile 78:
 </code> </code>
  
 +==== I2S Audio auf dem ESP32: ====
 +
 +  * https://www.youtube.com/watch?v=UXt27kOokh0 - MicroPython I2S Audio with the ESP32
 +  * https://github.com/miketeachman/micropython-i2s-examples
 +
 +==== BME280====
 +
 +  * https://randomnerdtutorials.com/micropython-bme280-esp32-esp8266/
  
 ==== DHT11/22 (ESP32)==== ==== DHT11/22 (ESP32)====
Zeile 100: Zeile 140:
 </code> </code>
  
 +==== Freien Speicher ermitteln ====
 +<code python>
 +>>> import gc
 +>>> gc.collect()
 +>>> gc.mem_free()
 +107488
 +>>> import micropython
 +>>> micropython.mem_info()
 +</code>
iot/micropython.1609076052.txt.gz · Zuletzt geändert: 2020/12/27 13:34 von admin