Différences entre versions de « ENG-CANSAT-PICO-HowTo »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 4 : Ligne 4 :
 
This section of the tutoriel contains small portion of code explaining how to use digital pins, analog pins, buses and all the fundamentals to control the board with Python code.
 
This section of the tutoriel contains small portion of code explaining how to use digital pins, analog pins, buses and all the fundamentals to control the board with Python code.
  
 +
== Control an output ==
 +
The onboard LED is tied to the GPIO 25. Here how to control it.
 +
 +
<syntaxhighlight lang="python">
 +
from machine import Pin
 +
led = Pin(25, Pin.OUT)
 +
led.value(1) # Switch on the LED
 +
led.value(0) # Switch off the LED
 +
</syntaxhighlight>
 +
 +
This will work the same with any GPIO pins.
 +
 +
== Additional tutorials ==
 
Anyway, the followings are also goods and complete references.
 
Anyway, the followings are also goods and complete references.
  
Ligne 33 : Ligne 46 :
 
{{ttuto-end}}
 
{{ttuto-end}}
  
== Control an output ==
 
The onboard LED is tied to the GPIO 25. Here how to control it.
 
 
<syntaxhighlight lang="python">
 
from machine import Pin
 
led = Pin(25, Pin.OUT)
 
led.value(1) # Switch on the LED
 
led.value(0) # Switch off the LED
 
</syntaxhighlight>
 
 
This will work the same with any GPIO pins.
 
  
 
{{ENG-CANSAT-PICO-TRAILER}}
 
{{ENG-CANSAT-PICO-TRAILER}}

Version du 21 février 2022 à 00:03

MicroPython How To

This section of the tutoriel contains small portion of code explaining how to use digital pins, analog pins, buses and all the fundamentals to control the board with Python code.

Control an output

The onboard LED is tied to the GPIO 25. Here how to control it.

from machine import Pin
led = Pin(25, Pin.OUT)
led.value(1) # Switch on the LED
led.value(0) # Switch off the LED

This will work the same with any GPIO pins.

Additional tutorials

Anyway, the followings are also goods and complete references.

Pico Python SDK

Tlogo-pico-python-sdk.jpg

A MicroPython environment for RP2040 microcontrollers.

Arduino Yun

Tlogo-yun.jpg

Arduino Yun, spécialiste du WIFI et du Net. avec traduction de la librairie en français.

-- AUSSI AVEC LIEN VERS GITHUB --

MOD-Wii-Chuck [UEXT]

Tlogo-mod-wii-nunchuck.png

Contrôleur de jeu I2C Wii Nunchuck. Exploiter le sous MicroPython (via port UEXT).

 



Written by Meurisse D. for MCHobby


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.