Modifications

Sauter à la navigation Sauter à la recherche
222 octets ajoutés ,  13 avril 2015 à 19:32
Ligne 67 : Ligne 67 :  
{{traduction}}
 
{{traduction}}
   −
Now lets make the mouse move based on the angle of the pyboard, using the accelerometer. The following code can be typed directly at the REPL prompt, or put in the {{fname|main.py}} file. Here, we’ll put in in {{fname|main.py}} because to do that we will learn how to go into safe mode.
+
Maintenant, faisons bouger la souris en fonction de l'angle de la carte PyBoard, ceci est rendu possible grâce à l'accéléromètre. Le code suivant peut être tapé directement sur sur l'invite de commande REPL ou placé dans le fichier {{fname|main.py}}. Ici, nous le plaçons dans {{fname|main.py}} parce que nous allons également apprendre comment passer en "Safe Mode".
   −
At the moment the pyboard is acting as a serial USB device and an HID (a mouse). So you cannot access the filesystem to edit your {{fname|main.py}} file.
+
Pour le moment, la carte PyBoard agit comme un périphérique USB série et un périphérique HID (une souris). Par conséquent, cela empêche d'accéder au système de fichier pour éditer le fichier {{fname|main.py}}.
   −
You also can’t edit your {{fname|boot.py}} to get out of HID-mode and back to normal mode with a USB drive...
+
De même vous ne pouvez pas modifier votre fichier {{fname|boot.py}} pour sortir du mode HID et revenir au mode normal (lecteur USB)...
 
  −
To get around this we need to go into safe mode. This was described in the [safe mode tutorial](tut-reset), but we repeat the instructions here:
      +
Pour y arriver, vous avez besoin de passer en "Safe Mode". Cela est décrit en détail dans le tutoriel sur le Safe-Mode mais vous pouvez répéter les opérations ci-dessous:
 +
{{tutoriel}}
 
# Hold down the USR switch.
 
# Hold down the USR switch.
 
# While still holding down USR, press and release the RST switch.
 
# While still holding down USR, press and release the RST switch.
29 910

modifications

Menu de navigation