Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
microc:micropython:tuto1gpio [2023/08/19 08:08] – [2.1 Présentation] phil | microc:micropython:tuto1gpio [2023/08/20 12:19] (Version actuelle) – [Tutoriel "Etape par Etape" - Premiers programmes en MicroPython ou CircuitPython avec une carte Raspbery Pi Pico W] phil |
---|
| |
* **Lectures connexes** | * **Lectures connexes** |
* **Installer MicroPython** - [[python:micropython:materiel:espressif|MicroPython - Les modules Espressif ESP32 et ESP8266]] | * **Installer MicroPython** - [[microc:uc:espressif|MicroPython - Les modules Espressif ESP32 et ESP8266]] |
* **Raspberry Pi Pico** - [[:microc:uc:rp2|Les modules Raspberry Pi Pico et Pico W]] | * **Raspberry Pi Pico** - [[:microc:uc:rp2|Les modules Raspberry Pi Pico et Pico W]] |
* **Programmez** ! Juillet/Août 2019 | * **Programmez** ! Juillet/Août 2019 |
==== 1. Le matériel ==== | ==== 1. Le matériel ==== |
* **Ressource** | * **Ressource** |
* [[:microc:uc:rp2|MicroPython - Les modules Raspberry Pi Pico et Pico W]]* | * Wiki [[:microc:uc:rp2|MicroPython - Les modules Raspberry Pi Pico et Pico W]]* |
| |
==== 2. L'IDE Thonny ==== | ==== 2. L'IDE Thonny ==== |
| |
==== 3. Programmation ==== | ==== 3. Programmation ==== |
=== 3.1 Prog. 1 - Commande d'une sortie numérique === | === 3.1 Programme 1 - Commande d'une sortie numérique === |
{{ :python:micropython:materiel:led.jpg?nolink&100|LED}} | {{ :python:micropython:materiel:led.jpg?nolink&100|LED}} |
<callout type="primary" title="Objectif" icon="true">Faire clignoter une LED externe à la carte Raspberry Pi Pico !</callout> | <callout type="primary" title="Objectif" icon="true">Faire clignoter une LED externe à la carte Raspberry Pi Pico !</callout> |
| |
{{ :materiels:capteurs:potentiometre.png?nolink&80|Potentiomètre}} | {{ :materiels:capteurs:potentiometre.png?nolink&80|Potentiomètre}} |
=== 3.2 Prog. 2 - Lecture d'une entrée analogique === | === 3.2 Programme 2 - Lecture d'une entrée analogique === |
<callout type="primary" title="Objectif" icon="true">Afficher la position angulaire (en °) d'un axe dans la console de l'IDE.</callout> | <callout type="primary" title="Objectif" icon="true">Afficher la position angulaire (en °) d'un axe dans la console de l'IDE.</callout> |
| |
| |
{{ :arduino:gravity-i2c-oled-128x64-display.jpg?nolink&150|Gravity OLED-2864 Display}} | {{ :arduino:gravity-i2c-oled-128x64-display.jpg?nolink&150|Gravity OLED-2864 Display}} |
=== 3.3 Prog. 3 - Afficheur graphique === | === 3.3 Programme 3 - Afficheur graphique === |
<callout type="primary" title="Objectif" icon="true">Afficher la température délivrée par le **capteur interne** au microcontrôleur sur un afficheur graphique.</callout> | <callout type="primary" title="Objectif" icon="true">Afficher la température délivrée par le **capteur interne** au microcontrôleur sur un afficheur graphique.</callout> |
| |
| |
| |
=== 3.4 Prog. 4 - Capteur atmosphérique === | === 3.4 Programme 4 - Capteur atmosphérique === |
{{ :python:micropython:ada2652.jpg?nolink|}} | {{ :python:micropython:ada2652.jpg?nolink|}} |
<callout type="primary" title="Objectif" icon="true"> Afficher la température, l'humidité et la pression délivrées par un capteur à circuit **BME280** sur un afficheur graphique.</callout> | <callout type="primary" title="Objectif" icon="true"> Afficher la température, l'humidité et la pression délivrées par un capteur à circuit **BME280** sur un afficheur graphique.</callout> |
</pane> | </pane> |
</tabs> | </tabs> |
=== 3.5 Prog. 5 - Capteur de luminosité === | === 3.5 Programme 5 - Capteur de luminosité === |
{{ :python:micropython:ar-capteur-de-lumiere-tsl2591-ada1980-22971.jpg?nolink&200|}} | {{ :python:micropython:ar-capteur-de-lumiere-tsl2591-ada1980-22971.jpg?nolink&200|}} |
<callout type="primary" title="Objectif" icon="true">Afficher la luminosité ambiante sur un afficheur graphique.</callout> | <callout type="primary" title="Objectif" icon="true">Afficher la luminosité ambiante sur un afficheur graphique.</callout> |
</pane> | </pane> |
</tabs> | </tabs> |
=== 3.6 Synthèse === | === 3.6 Serveur WEB === |
<color #ed1c24>WEB : A faire</color> | * <color #ed1c24>Ressource provisoire</color> : <html><a href="https://randomnerdtutorials.com/esp32-esp8266-micropython-web-server/" target="_blank">ESP32/ESP8266 MicroPython Web Server</a></html> |
| |
| <color #ed1c24>A faire</color> |
=== Pour aller plus loin === | === Pour aller plus loin === |
- **Tutoriels** sur <html><a href="https://randomnerdtutorials.com/projects-esp32-esp8266-micropython/" target="_blank">RANDOM NERD TUTORIALS</a></html>((Random Nerd Tutorials helps makers, hobbyists and engineers build electronics projects. We make projects with: ESP32, ESP8266, Arduino, Raspberry Pi, ...)) | - **Tutoriels** sur <html><a href="https://randomnerdtutorials.com/projects-esp32-esp8266-micropython/" target="_blank">RANDOM NERD TUTORIALS</a></html>((Random Nerd Tutorials helps makers, hobbyists and engineers build electronics projects. We make projects with: ESP32, ESP8266, Arduino, Raspberry Pi, ...)) |
| |