Ligne 126 : |
Ligne 126 : |
| # -- shop.mchobby.be -- | | # -- shop.mchobby.be -- |
| | | |
− | # Raspberry Pi pin configuration: | + | # Configuration des broches du Raspberry Pi: |
| RST = None | | RST = None |
− | # Note the following are only used with SPI: | + | # Note: uniquement utilisé avec bus SPI: |
| DC = 23 | | DC = 23 |
| SPI_PORT = 0 | | SPI_PORT = 0 |
| SPI_DEVICE = 0 | | SPI_DEVICE = 0 |
| | | |
− | # 128x32 display with hardware I2C: | + | # Afficheur 128x32 sur bus I2C matériel: |
| disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST) | | disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST) |
| | | |
− | # 128x64 display with hardware I2C: | + | # Afficheur 128x64 sur bus I2C matériel: |
| # disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST) | | # disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST) |
| | | |
− | # Alternatively you can specify an explicit I2C bus number, for example | + | # Alternativement, vous pouvez spécifier le n° de bus I2C, par exemple |
− | # with the 128x32 display you would use: | + | # avec l'afficheur 128x32, vous pouvez utiliser: |
| # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, i2c_bus=2) | | # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, i2c_bus=2) |
| | | |
− | # 128x32 display with hardware SPI: | + | # Afficheur 128x32 avec bus SPI matériel: |
| # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000)) | | # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000)) |
| | | |
− | # 128x64 display with hardware SPI: | + | # Afficheur 128x64 avec bus SPI matériel: |
| # disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000)) | | # disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=8000000)) |
| | | |
− | # Alternatively you can specify a software SPI implementation by providing | + | # Vous pouvez également spécifier un SPI logiciel en fournissant |
− | # digital GPIO pin numbers for all the required display pins. For example | + | # les numéros de broches GPIO digital (pour toutes les broches |
− | # on a Raspberry Pi with the 128x32 display you might use: | + | # utilisées par l'afficheur). Par exemple: |
| + | # Sur un Raspberry Pi avec afficher 128x32 vous pourriez utiliser: |
| # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, sclk=18, din=25, cs=22) | | # disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, sclk=18, din=25, cs=22) |
| </syntaxhighlight> | | </syntaxhighlight> |