python:micropython:gtemps

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
python:micropython:gtemps [2021/08/11 09:19] – modification externe 127.0.0.1python:micropython:gtemps [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1
Ligne 1: Ligne 1:
-{{ :suivant.png?nolink&30|}} {{ :retour.png?nolink&30|}} [[:python:micropython:accueil|{{ :iconemaison.jpg?nolink&30|Sommaire MicroPython, CircuitPython}}]] 
  
-===== MicroPython - Gestion du temps ===== 
-{{ :micropython:logomicropython.png?nolink&120|}} 
- 
-[Mise à jour le : 12/7/2021] <html><span style="color:red">En cours de rédaction</span></html> 
- 
-  * **Ressources** 
-    * <html><a href="https://micropython.org/" target="_blank">MicroPython.org</a></html> 
-    * <html><a href="https://docs.micropython.org/en/latest/index.html#" target="_blank">MicroPython documentation</a></html> 
-    * <html><a href="https://thonny.org/" target="_blank">IDE Thonny</a></html> 
-==== 1. Présentation ==== 
- 
-==== 2. Module time ==== 
-{{ :python:micropython:materiel:led.jpg?nolink&50|LED}} 
-  * **Ressource** : <html><a href="https://docs.micropython.org/en/latest/index.html" target="_blank">Documentation</a></html> sur docs.micropython.org. 
- 
-  * //Exemple pour un **ESP32 Feather Huzzah** (LED #13)// 
- 
-<code Python helloesp32.py> 
-# Faire clignoter la led de la carte 
- 
-from machine import Pin 
-import time 
- 
-# Led de la carte 
-Led = Pin(13, Pin.OUT) 
- 
-while(True): 
-    Led.on() 
-    time.sleep(1) 
-    Led.off() 
-    time.sleep(1) 
-     
-</code> 
- 
-  * //Exemples pour un **Raspberry Pi Pico** (LED #25)// 
- 
-<code Python hellopico.py> 
-# Exemple 1 
-# Faire clignoter la led de la carte 
-# A modifier dans le code ci-dessus 
-... 
-Led = Pin(25, Pin.OUT) 
-... 
-</code> 
- 
-{{ :python:micropython:morse.png?nolink&50|}} 
-<code Python morse.py> 
-# Exemple 2 
-# Titre : Message en Morse 
-# Sources 
-#   Elektor n°488, 
-#   https://fr.wikipedia.org/wiki/Code_Morse_international 
-# fichier : morse.py 
- 
-import time 
-from machine import Pin 
-led=Pin(25,Pin.OUT) # Led de la carte 
-BlinkRate=0.25 
-# Code complet téléchargeable à partir du lien ci-dessous 
-</code> 
- 
-{{ :python:micropython:materiel:thonny.png?nolink&70|}} 
-<note tip><html><strong><a href="https://webge.fr/doc/wikis/code/micropython/MICROPYTHON_RPI2_MORSE.zip" target="_blank">Télécharger</a></strong></html> le projet MICROPYTHON_RPI2_MORSE pour Thonny.</note> 
- 
-==== 3. Module Timer  ==== 
-  * //Exemple pour un **Raspberry Pi Pico**// 
- 
-{{ :python:micropython:materiel:led.jpg?nolink&50|LED}} 
-<code python *.py> 
-# Faire clignoter la Led de la carte 
-# Ressource : https://docs.micropython.org/en/latest/rp2/quickref.html 
- 
-from machine import Pin, Timer 
-led = Pin(25, Pin.OUT) 
-timer = Timer() 
- 
-def blink(timer): 
-    led.toggle() 
- 
-timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink) 
-</code> 
- 
-==== 3.  ==== 
- 
-  * **Ressource** : <html><a href="" target="_blank"></a></html> sur Micropython.org. 
-  * **Matériel** :  
- 
-  * //Exemple// 
- 
-<code python *.py> 
- 
-</code> 
- 
-==== 4.  ==== 
- 
-  * **Ressource** : <html><a href="" target="_blank"></a></html> sur Micropython.org. 
-  * **Matériel** :  
- 
-  * //Exemple// 
- 
-<code python *.py> 
- 
-</code> 
  • python/micropython/gtemps.1628666361.txt.gz
  • Dernière modification : 2021/08/11 09:19
  • de 127.0.0.1