Ligne 10 : |
Ligne 10 : |
| Utilise la librairie Adafruit-MCP23017 pour changer une sortie du MCP23017. | | Utilise la librairie Adafruit-MCP23017 pour changer une sortie du MCP23017. |
| | | |
− | Code écrit par LadyAda pour AdaFruit Industries [www.adafruit.com] | + | Code écrit par LadyAda pour AdaFruit Industries [www.adafruit.com], Domaine Publique |
| | | |
− | TRADUCTION FRANCAISE par Meurisse D. pour MCHobby.be [www.mchobby.be], CC-BY-SA pour traduction | + | TRADUCTION FRANCAISE par Meurisse D. pour MCHobby.be [www.mchobby.be], CC-BY-SA pour tâche de traduction |
| TUTORIEL complémentaire EN FRANCAIS par MCHobby.be sur (voir wiki pour licence tutoriel) | | TUTORIEL complémentaire EN FRANCAIS par MCHobby.be sur (voir wiki pour licence tutoriel) |
| http://mchobby.be/wiki/index.php?title=MCP23017 | | http://mchobby.be/wiki/index.php?title=MCP23017 |
Ligne 23 : |
Ligne 23 : |
| #include "Adafruit_MCP23017.h" | | #include "Adafruit_MCP23017.h" |
| | | |
− | // Basic pin reading and pullup test for the MCP23017 I/O expander | + | // Test de base d'ecriture d'état pour un "MCP23017 I/O expander" |
− | // public domain! | + | // Domaine publique (code d'origine)! |
| | | |
− | // Connect pin #12 of the expander to Analog 5 (i2c clock) | + | // Connectez la broche #12 du MCP23017 sur Analog 5 (i2c clock) |
− | // Connect pin #13 of the expander to Analog 4 (i2c data) | + | // Connectez la broche #13 du MCP23017 sur Analog 4 (i2c data) |
− | // Connect pins #15, 16 and 17 of the expander to ground (address selection) | + | // Connectez la broche #15, 16 et 17 du MCP23017 sur ground (address selection) |
− | // Connect pin #9 of the expander to 5V (power) | + | // Connectez la broche #9 du MCP23017 sur 5V (power) |
− | // Connect pin #10 of the expander to ground (common ground) | + | // Connectez la broche #10 du MCP23017 sur ground (common ground) |
| | | |
| // Output #0 is on pin 21 so connect an LED or whatever from that to ground | | // Output #0 is on pin 21 so connect an LED or whatever from that to ground |