Modifications

Sauter à la navigation Sauter à la recherche
237 octets ajoutés ,  3 mai 2016 à 19:29
Ligne 35 : Ligne 35 :     
== Bus I2C et SPI ==
 
== Bus I2C et SPI ==
You can use the ESP8266 to control I2C and SPI devices, sensors, outputs, etc. While this is done by 'bitbanging', it works quite well and the ESP8266 is fast enough to match 'Arduino level' speeds.
+
Vous pouvez utiliser l'ESP8266 pour contrôler des périphériques, senseurs, sorties, etc via le bus I2C et SPI. Même si cela est supporté de façon logiciel (par ''bitbanging''), cela fonctionne très bien et l'ESP8266 est suffisamment rapide pour atteindre 'le niveau de vitesse d'un Arduino'.
    
{{ADFImage|FEATHER-ESP8266-Brochage-30.jpg|800px}}
 
{{ADFImage|FEATHER-ESP8266-Brochage-30.jpg|800px}}
   −
In theory you can use any pins for I2C and SPI but to make it easier for people using existing Arduino code, libraries, sketches we set up the following:
+
En théorie, vous pouvez utiliser n'importe quelle broche pour réaliser un bus I2C et SPI logiciel mais pour rendre l'usage des codes/bibliothèques/croquis Arduino plus simple, ces bus ont été configurés comme suit:
* '''I2C SDA''' = '''GPIO #4''' (default)
+
* '''I2C SDA''' = '''GPIO #4''' (défaut)
* '''I2C SCL''' = '''GPIO #5''' (default)
+
* '''I2C SCL''' = '''GPIO #5''' (défaut)
   −
If you want, you can connect to I2C devices using other 2 pins in the Arduino IDE, by calling {{fname|Wire.pins(sda, scl)}} before any other Wire code is called (so, do this at the begining of {{fname|setup()}} for example
+
Si vous le souhaitez, vous pouvez connectez des périphériques I2C sur deux autres broches dans Arduino IDE en appelant {{fname|Wire.pins(sda, scl)}} avant n'importe quel autre code Wire (Par exemple: faire l'appel de {{fname|Wire.pins(sda, scl)}} en début de la fonction {{fname|setup()}})
    
Likewise, you can use SPI on any pins but if you end up using 'hardware SPI' you will want to use the following:
 
Likewise, you can use SPI on any pins but if you end up using 'hardware SPI' you will want to use the following:
29 879

modifications

Menu de navigation