composants:i2c_oled_ssd1306

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
composants:i2c_oled_ssd1306 [2019/01/06 19:46] – [Utilisation] mhcomposants:i2c_oled_ssd1306 [2019/08/13 21:26] – [Usage] mh
Line 1: Line 1:
 ====== I2C OLED 0.91 inch Screen ====== ====== I2C OLED 0.91 inch Screen ======
  
-===== Résumé =====+Exists in various format (128x32, 128x64)
  
-Un petit écran qui utilise le driver SSD1306S'interface avec 2 fils (I2C). Existe en format 128x32 ou 128x64.+{{composants:0.91lcd.jpg?300}}
  
-===== Utilisation =====+===== Specifications =====
  
-Dans Arduino il y a plusieurs bibliothèques qui permettent de s'interfacer en I2C avec des modules. +  *5V ready 
 +  *Can use I2C (two wires) or SPI communication
  
-Il faut d'abord trouver l'adresse I2C du module en utilisant un program scan via une arduino.+===== Usage =====
  
-++++On peut utiliser  le code suivant pour scanner : |+You can use **Adafruit SSD1306**.
  
-<code c> +The 128x32 uses address 0x3C
-#include <Wire.h> +
-  +
-void setup() +
-+
-  Wire.begin(); +
-  +
-  Serial.begin(9600); +
-  while (!Serial);             // Leonardo: wait for serial monitor +
-  Serial.println("\nI2C Scanner"); +
-+
-  +
-void loop() +
-+
-  byte error, address; +
-  int nDevices; +
-  +
-  Serial.println("Scanning..."); +
-  +
-  nDevices = 0; +
-  for(address = 1; address < 127; address++ ) +
-  { +
-    // The i2c_scanner uses the return value of +
-    // the Write.endTransmisstion to see if +
-    // a device did acknowledge to the address. +
-    Wire.beginTransmission(address); +
-    error = Wire.endTransmission(); +
-  +
-    if (error == 0) +
-    { +
-      Serial.print("Appareil I2C trouve a cette adresse 0x"); +
-      if (address<16) +
-        Serial.print("0"); +
-      Serial.print(address,HEX); +
-      Serial.println("  !"); +
-  +
-      nDevices++; +
-    } +
-    else if (error==4) +
-    { +
-      Serial.print("Erreur inconnue a cette address 0x"); +
-      if (address<16) +
-        Serial.print("0"); +
-      Serial.println(address,HEX); +
-    }     +
-  } +
-  if (nDevices == 0) +
-    Serial.println("Aucun appareil I2C trouve\n"); +
-  else +
-    Serial.println("Fin\n"); +
-  +
-  delay(100);           // wait 5 seconds for next scan +
-+
-</code> +
-+++++
  
 +If you are connecting to SDA/SCL using I2C connect pin SDA to UNO A4 and SCL to UNO A5 (default pins, respectively 20 and 21 on a Mega)
  
 ===== Ressources ===== ===== Ressources =====
  
-Acheté de la marque MakerHawk en chine.+Bought from MakerHawk in chine.
  
-  *[[https://projetsdiy.fr/ssd1306-mini-ecran-oled-i2c-128x64-arduino/|Projet DIY, tutoriel pour SSD1306 OLED I2C]]+  *[[https://projetsdiy.fr/ssd1306-mini-ecran-oled-i2c-128x64-arduino/|DIY Project for SSD1306 OLED I2C]]
  • composants/i2c_oled_ssd1306.txt
  • Last modified: 2020/06/01 16:35
  • by 127.0.0.1