Ligne 1 : |
Ligne 1 : |
| {{SenseurIR-Nav}} | | {{SenseurIR-Nav}} |
| | | |
− | The good news is that it is very easy to hook up this sensor. Just connect the output to a digital pin. The bad news is that the Arduino's friendly digitalRead() procedure is a tad too slow to reliably read the fast signal as its coming in. Thus we use the hardware pin reading function directly from pin D2, thats what the line "IRpin_PIN & BV(IRpin))" does. | + | The good news is that it is very easy to hook up this sensor. |
| + | Just connect the output to a digital pin. |
| | | |
− | [[Fichier:IR-Arduino-1.jpg]] | + | The bad news is that the Arduino's friendly digitalRead() procedure |
| + | is a tad too slow to reliably read the fast signal as its coming in. |
| + | |
| + | Thus we use the hardware pin reading function directly from |
| + | pin D2, thats what the line "IRpin_PIN & BV(IRpin))" does. |
| + | |
| + | [[Fichier:IR-Arduino-1.jpg|350px]] |
| | | |
| [http://github.com/adafruit/Raw-IR-decoder-for-Arduino Vous pouvez obtenir la dernière version du code sur le github d'AdaFruit.] | | [http://github.com/adafruit/Raw-IR-decoder-for-Arduino Vous pouvez obtenir la dernière version du code sur le github d'AdaFruit.] |
Ligne 111 : |
Ligne 118 : |
| Si vous utilisez ce programme et utilisez une télécommande Sony sur laquelle vous pressez le bouton Marche (On), vous obtiendrez le résultat suivant... | | Si vous utilisez ce programme et utilisez une télécommande Sony sur laquelle vous pressez le bouton Marche (On), vous obtiendrez le résultat suivant... |
| | | |
− | [[Fichier:IR-Arduino-2.jpg]] | + | [[Fichier:IR-Arduino-2.jpg|350px]] |
| | | |
| Si vous ignorez la première impulstion OFF (correspond au temps nécessaire au programme Arduino pour s'activer à la première réception du signal InfraRouge) et la dernière impulsion ON (qui est le début du code suivant) vous identifierez le code POWER de Sony: | | Si vous ignorez la première impulstion OFF (correspond au temps nécessaire au programme Arduino pour s'activer à la première réception du signal InfraRouge) et la dernière impulsion ON (qui est le début du code suivant) vous identifierez le code POWER de Sony: |