Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes |
materiels:afficheurs:ard0_96 [2024/01/23 15:42] – [1. Description] phil | materiels:afficheurs:ard0_96 [2024/04/15 22:24] – [2. Programmation] phil |
---|
// Description : Affiche "hello, world" | // Description : Affiche "hello, world" |
| |
#include "Wire.h" // Bibliothèques nécessaires | #include "Wire.h" // Bibliothèques nécessaires à l'afficheur |
#include "Adafruit_GFX.h" | #include "Adafruit_GFX.h" |
#include "OakOLED.h" | #include "OakOLED.h" |
| |
void setup() { | void setup() { |
| // Initialisation |
Serial.begin(115200); | Serial.begin(115200); |
oled.begin(); | oled.begin(); |
| |
| // Configuration de l'affichage |
oled.setTextSize(1); | oled.setTextSize(1); |
oled.setTextColor(1); | oled.setTextColor(1); |
oled.setCursor(0, 0); | oled.setCursor(0, 0); |
| |
oled.println("Hello, World!"); | oled.println("Hello, World!"); // préparation du texte dans le buffer |
oled.display(); | oled.display(); // Transfert buffer -> afficheur |
} | } |
| |
| |
<pane id="tab-micropy"> | <pane id="tab-micropy"> |
| |
=== 2.1 Présentation === | === 2.1 Présentation === |
<callout type="info" icon="true" title="Bibliothèque SSD1306"><html>Les exemples de code de cette page ont été testés sur un afficheur <html><a href="https://www.gotronic.fr/art-module-oled-i2c-gravity-dfr0486-26805.htm" target="_blank">Gravity OLED-2864 (128x64) </a></html> de DFROBOT et un <html><a href="https://www.gotronic.fr/art-module-afficheur-oled-0-96-tf052-28511.htm" target="_blank">Module afficheur OLED 0,96'' TF052</a></html> connectés à un **ESP32** ou à un **Raspberry Pi Pico**. Ces afficheurs sont pilotés par un circuit SOLOMON SYSTECH <html><a href="https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf" target="_blank">SSD1306</a></html>. Sa mise en oeuvre nécessite une bibliothèque. \\ \\ | <callout type="info" icon="true" title="Bibliothèque SSD1306"><html>Les exemples de code de cette page ont été testés sur un afficheur <html><a href="https://www.gotronic.fr/art-module-oled-i2c-gravity-dfr0486-26805.htm" target="_blank">Gravity OLED-2864 (128x64) </a></html> de DFROBOT et un <html><a href="https://www.gotronic.fr/art-module-afficheur-oled-0-96-tf052-28511.htm" target="_blank">Module afficheur OLED 0,96'' TF052</a></html> connectés à un **ESP32** ou à un **Raspberry Pi Pico**. Ces afficheurs sont pilotés par un circuit SOLOMON SYSTECH <html><a href="https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf" target="_blank">SSD1306</a></html>. Sa mise en oeuvre nécessite une bibliothèque. \\ \\ |