issue111:python
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue111:python [2016/08/21 07:43] – d52fr | issue111:python [2016/08/24 11:18] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 13: | Ligne 13: | ||
Nous ferons 8 connexions au RPi, en plus des trois que nous utilisions le mois dernier pour le capteur de température. Ce mois-ci, nous aurons besoin des composants supplémentaires suivants : | Nous ferons 8 connexions au RPi, en plus des trois que nous utilisions le mois dernier pour le capteur de température. Ce mois-ci, nous aurons besoin des composants supplémentaires suivants : | ||
- | • un potentiomètre de 10k | + | • un potentiomètre de 10k ; |
- | • un afficheur LCD 16x2 | + | • un afficheur LCD 16x2 ; |
- | • de nombreux cavaliers pour la plaque d' | + | • de nombreux cavaliers pour la plaque d' |
**By the time you are done, the wiring diagram (and the resulting board) will look like a bit of a rat’s nest, but go slowly – make sure you have the wiring correct. | **By the time you are done, the wiring diagram (and the resulting board) will look like a bit of a rat’s nest, but go slowly – make sure you have the wiring correct. | ||
Ligne 25: | Ligne 25: | ||
On the display, connect pin 1 to ground and pin 2 to the +5 volt buss. That makes three connections out of the twelve we need. Pin 6 of the display goes to pin 22 of the RPi. This is the Enable pin. Pin 5 on the display goes to ground, and pin 4 to pin 27 on the RPi. We are up to 6 connections so far. That makes us halfway there. Because we have to use pin 4 for our sensor, we can’t control the backlight.** | On the display, connect pin 1 to ground and pin 2 to the +5 volt buss. That makes three connections out of the twelve we need. Pin 6 of the display goes to pin 22 of the RPi. This is the Enable pin. Pin 5 on the display goes to ground, and pin 4 to pin 27 on the RPi. We are up to 6 connections so far. That makes us halfway there. Because we have to use pin 4 for our sensor, we can’t control the backlight.** | ||
- | Une fois que vous l'avez fait, le schéma de câblage (et en vrai sur la plaque) | + | Une fois terminé, le schéma de câblage (et en vrai sur la plaque) |
- | Comme vous pouvez le voir sur le schéma | + | Comme vous pouvez le voir sur le schéma |
- | D' | + | D' |
- | Sur l' | + | Sur l' |
**Now we will work backwards from pin 16. Pin 16 goes to ground, and pin 15 to +5v. Pin 15 is actually the backlight voltage on mine. If you find the display too bright, you could put the wiper of another potentiometer connected between +5v and ground and control the display backlight. | **Now we will work backwards from pin 16. Pin 16 goes to ground, and pin 15 to +5v. Pin 15 is actually the backlight voltage on mine. If you find the display too bright, you could put the wiper of another potentiometer connected between +5v and ground and control the display backlight. | ||
Ligne 47: | Ligne 47: | ||
cd examples** | cd examples** | ||
- | Maintenant, | + | Maintenant, |
- | Maintenant, les lignes de données. Il y a réellement 8 lignes de données, mais, heureusement, | + | Maintenant, les lignes de données. Il y a réellement 8 lignes de données, mais, heureusement, |
- | Maintenant tout est connecté | + | Maintenant tout est connecté |
git clone https:// | git clone https:// | ||
Ligne 78: | Ligne 78: | ||
That’s about it for this month. Next month we will look at changing out our regular 16x2 display for a 16x2 I2C display (which uses only 2 lines for data and all control, and 2 lines for power.) We will also discuss the different ways of using serial communication for interfacing displays and other devices. Until then, have fun!** | That’s about it for this month. Next month we will look at changing out our regular 16x2 display for a 16x2 I2C display (which uses only 2 lines for data and all control, and 2 lines for power.) We will also discuss the different ways of using serial communication for interfacing displays and other devices. Until then, have fun!** | ||
- | Maintenant, chargez char_lcd.py dans votre éditeur favori. Ou, vous pouvez | + | Maintenant, chargez char_lcd.py dans votre éditeur favori. Ou vous pouvez |
- | Ignorez les messages de rétro-éclairage ; mais vous devriez | + | Ignorez les messages de rétro-éclairage ; mais vous devrez |
Hello World! (Bonjour le monde) | Hello World! (Bonjour le monde) | ||
Ligne 86: | Ligne 86: | ||
Blink Cursor_ (curseur clignotant) | Blink Cursor_ (curseur clignotant) | ||
Scroll (right and left) (déplacement, | Scroll (right and left) (déplacement, | ||
- | Flash backlight in 5 seconds... (rétro-éclairage flashant | + | Flash backlight in 5 seconds... (rétro-éclairage flashant |
- | Goodbye! (au revoir !) | + | Goodbye! (Au revoir !) |
Si tout a bien fonctionné, | Si tout a bien fonctionné, | ||
Ligne 93: | Ligne 93: | ||
Voici le programme du mois dernier, modifié, qui inclut des bribes de code venant de cet exemple (en haut à droite) d' | Voici le programme du mois dernier, modifié, qui inclut des bribes de code venant de cet exemple (en haut à droite) d' | ||
- | C'est tout pour ce mois. Le mois prochain, nous regarderons | + | C'est tout pour cette fois. Le mois prochain, nous examinerons |
issue111/python.1471758230.txt.gz · Dernière modification : 2016/08/21 07:43 de d52fr