Modifications

Sauter à la navigation Sauter à la recherche
41 octets ajoutés ,  16 février 2015 à 12:50
Ligne 4 : Ligne 4 :     
== Activer les LEDs et concepts de base ==
 
== Activer les LEDs et concepts de base ==
The easiest thing to do on the pyboard is to turn on the LEDs attached to the board. Connect the board, and log in as described in tutorial 1. We will start by turning and LED on in the interpreter, type the following:
+
{{bloc-etroit|text=The easiest thing to do on the pyboard is to turn on the LEDs attached to the board. Connect the board, and log in as described in tutorial 1. We will start by turning and LED on in the interpreter, type the following:}}
    
  <nowiki>>>> myled = pyb.LED(1)
 
  <nowiki>>>> myled = pyb.LED(1)
Ligne 10 : Ligne 10 :  
>>> myled.off()</nowiki>
 
>>> myled.off()</nowiki>
   −
These commands turn the LED on and off.
+
{{bloc-etroit|text=These commands turn the LED on and off.
   −
This is all very well but we would like this process to be automated. Open the file MAIN.PY on the pyboard in your favourite text editor. Write or paste the following lines into the file. If you are new to python, then make sure you get the indentation correct since this matters!
+
This is all very well but we would like this process to be automated. Open the file MAIN.PY on the pyboard in your favourite text editor. Write or paste the following lines into the file. If you are new to python, then make sure you get the indentation correct since this matters!}}
    
  <nowiki>led = pyb.LED(2)
 
  <nowiki>led = pyb.LED(2)
Ligne 30 : Ligne 30 :  
=== Exercice 2 ===
 
=== Exercice 2 ===
 
Connect to the pyboard directly, create a pyb.LED object and turn it on using the on() method.
 
Connect to the pyboard directly, create a pyb.LED object and turn it on using the on() method.
      
== C'est Disco sur votre PyBoard ==
 
== C'est Disco sur votre PyBoard ==
29 918

modifications

Menu de navigation