Difference between revisions of "OLED Display 0.96"

From
Jump to: navigation, search
(Code)
(Caractéristiques)
 
(50 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Grove - OLED Display 0.96 inches (Seeed-Studio) ==
+
== Grove - OLED Display 0.96 inches (SSD1308) (Seeed-Studio) ==
  
 
=== Caractéristiques ===
 
=== Caractéristiques ===
Dot Matrix 128×64
+
Dot Matrix <b>128×64</b><br>
 +
Pilote SSD1308
  
=== Support ===
+
=== Communication ===
 +
Port <b>I2C</b> : Adresse '''0x3C'''
 +
 
 +
=== Images ===
 
[[File:OLED Display 128x64 recto.jpg|300px]]
 
[[File:OLED Display 128x64 recto.jpg|300px]]
 
[[File:OLED Display 128x64 verso.jpg|300px]]
 
[[File:OLED Display 128x64 verso.jpg|300px]]
 +
 +
=== Tableau ===
 +
{| class="wikitable centre" width="250"
 +
|+ Seeed-Studio
 +
|-
 +
! scope=col | Seeeduino
 +
! scope=col | Sensor
 +
|-
 +
| width="33%" |
 +
5V
 +
| width="34%" |
 +
Red
 +
|-
 +
| width="33%" |
 +
GND
 +
| width="34%" |
 +
Black
 +
|-
 +
| width="33%" |
 +
SDA
 +
| width="34%" |
 +
White
 +
|-
 +
| width="33%" |
 +
SCL
 +
| width="34%" |
 +
Yellow
 +
|-
 +
| align="center" colspan="3" |
 +
Grove - OLED Display 0.96 inches -
 +
|}
  
 
=== Drivers ===
 
=== Drivers ===
Line 17: Line 52:
 
=== Code ===
 
=== Code ===
 
[[File:Arduino logo.jpg|50px]]
 
[[File:Arduino logo.jpg|50px]]
Exemple "Hello World!"<br>
+
Exemples de <b>"Hello World!"</b><br>
il faut sauvegarde sous 'OLED_Hello_World.ino'<br>
+
donnez des nos par exemple 'OLED_Hello_World.ino'<br>
 
on trouve Wire.h ici C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.h
 
on trouve Wire.h ici C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.h
<code>
+
 
 +
<b>Hello World!</b> <i>Bibliothèque SeeedOLED</i>
 +
 
 +
[https://github.com/Seeed-Studio/OLED_Display_128X64/blob/master/examples/OLED_Hello_World/OLED_Hello_World.ino OLED_Hello_World.ino]<br>
 +
 
 +
<pre>
 
  #include <Wire.h>
 
  #include <Wire.h>
 
  #include <SeeedOLED.h>
 
  #include <SeeedOLED.h>
Line 35: Line 75:
 
  void loop()
 
  void loop()
 
  {  
 
  {  
  }</code>
+
  }
 +
</pre>
  
[https://github.com/Seeed-Studio/OLED_Display_128X64/blob/master/examples/OLED_Hello_World/OLED_Hello_World.ino OLED_Hello_World.ino]<br>
+
----
[https://github.com/Seeed-Studio/OLED_Display_128X64/archive/master.zip Télécharger les sources sur GitHub]
+
 
 +
=== Code 2 - Hello World! - u8g2 ===
 +
 
 +
<i>Bibliothèque</i>  <b>u8g2</b> https://wiki.myows.top/index.php?title=U8g2_for_Seeeduino_boards#Setup
 +
 
 +
[[File:Grove Base for XIAO 1.PNG|200px]]
 +
[[File:XIAO RA4M1 4.PNG|125px]]
 +
[[File:OLED Display 128x64 recto.jpg|150px]]
 +
ou
 +
[[File:OLED-Display-0-96-SSD1315.png|150px]]
 +
 
 +
Grove Base for XIAO <br>
 +
XIAO-RA4M1 <br>
 +
OLED Display 0.96 (SSD1308) 128 × 64 pixels, Port <b>I2c</b> &#x2705;<br>
 +
ou
 +
OLED Display 0.96 (SSD1315) 128 × 64 pixels, Port <b>I2c</b> &#x2705;<br>
 +
 
 +
<pre>
 +
#include <Arduino.h>
 +
#include <U8g2lib.h>
 +
 +
#ifdef U8X8_HAVE_HW_SPI
 +
#include <SPI.h>
 +
#endif
 +
#ifdef U8X8_HAVE_HW_I2C
 +
#include <Wire.h>
 +
#endif
 +
 +
U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // SSD1306 and SSD1308Z are compatible
 +
 +
// U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);    //Low spped I2C
 +
 +
void setup(void) {
 +
  u8g2.begin();
 +
}
 +
 +
void loop(void) {
 +
  u8g2.clearBuffer();                  // clear the internal memory
 +
  u8g2.setFont(u8g2_font_ncenB08_tr);  // choose a suitable font
 +
  u8g2.drawStr(0,10,"Hello World!");    // write something to the internal memory
 +
  u8g2.sendBuffer();                    // transfer internal memory to the display
 +
  delay(1000); 
 +
}
 +
</pre>
 +
 
 +
----
 +
 
 +
[https://github.com/Seeed-Studio/OLED_Display_128X64 GitHub]
 +
 
 +
[https://github.com/Seeed-Studio/OLED_Display_128X64/archive/master.zip Télécharger les sources (zip) sur GitHub]
 
==== Liens internes ====
 
==== Liens internes ====
[[Grove|index wiki arduino]]<br>
+
[[Grove| Main page]]<br>
[[OLED Display 1.12| OLED Display 1.12 inches ]]<br>
 
[[4-Digital Display| 4-Digital Display]]<br>
 
[[Base Shield V2| Base Shield V2]]
 
  
 
----
 
----
  
 
==== Liens externes ====
 
==== Liens externes ====
https://www.seeedstudio.com/Grove-OLED-Display-112-p-781.html<br>
+
[https://www.seeedstudio.com/Grove-OLED-Display-0-96.html www.seeedstudio.com/Grove-OLED-Display-0-96.html] <font color=red>shop</font><br>
http://wiki.seeed.cc/Grove-OLED_Display_0.96inch/<br>
+
 
https://github.com/Seeed-Studio/OLED_Display_128X64
+
[http://wiki.seeedstudio.com/Grove-OLED_Display_0.96inch/ wiki.seeedstudio.com/Grove-OLED_Display_0.96inch]<font color=red>wiki</font><br>
 +
[https://github.com/Seeed-Studio/OLED_Display_128X64 github.com/Seeed-Studio/OLED_Display_128X64] <font color=red>github</font>

Latest revision as of 15:29, 31 August 2025

Grove - OLED Display 0.96 inches (SSD1308) (Seeed-Studio)

Caractéristiques

Dot Matrix 128×64
Pilote SSD1308

Communication

Port I2C : Adresse 0x3C

Images

OLED Display 128x64 recto.jpg OLED Display 128x64 verso.jpg

Tableau

Seeed-Studio
Seeeduino Sensor

5V

Red

GND

Black

SDA

White

SCL

Yellow

Grove - OLED Display 0.96 inches -

Drivers

SSD1308 chip
LY190-128064

Voltage

3.3 ~ 5.5V

Code

Arduino logo.jpg Exemples de "Hello World!"
donnez des nos par exemple 'OLED_Hello_World.ino'
on trouve Wire.h ici C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.h

Hello World! Bibliothèque SeeedOLED

OLED_Hello_World.ino

 #include <Wire.h>
 #include <SeeedOLED.h>
 void setup()
 {
  Wire.begin();
  SeeedOled.init();                    //initialze SEEED OLED display
  SeeedOled.clearDisplay();            //clear the screen and set start position to top left corner
  SeeedOled.setNormalDisplay();        //Set display to normal mode (i.e non-inverse mode)
  SeeedOled.setPageMode();             //Set addressing mode to Page Mode
  SeeedOled.setTextXY(0,0);            //Set the cursor to Xth Page, Yth Column  
  SeeedOled.putString("Hello World!"); //Print the String
 }
 void loop()
 { 
 }

Code 2 - Hello World! - u8g2

Bibliothèque u8g2 https://wiki.myows.top/index.php?title=U8g2_for_Seeeduino_boards#Setup

Grove Base for XIAO 1.PNG XIAO RA4M1 4.PNG OLED Display 128x64 recto.jpg ou OLED-Display-0-96-SSD1315.png

Grove Base for XIAO
XIAO-RA4M1
OLED Display 0.96 (SSD1308) 128 × 64 pixels, Port I2c
ou OLED Display 0.96 (SSD1315) 128 × 64 pixels, Port I2c

#include <Arduino.h>
#include <U8g2lib.h>
 
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
 
U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // SSD1306 and SSD1308Z are compatible
 
// U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);    //Low spped I2C
 
void setup(void) {
  u8g2.begin();
}
 
void loop(void) {
  u8g2.clearBuffer();                   // clear the internal memory
  u8g2.setFont(u8g2_font_ncenB08_tr);   // choose a suitable font
  u8g2.drawStr(0,10,"Hello World!");    // write something to the internal memory
  u8g2.sendBuffer();                    // transfer internal memory to the display
  delay(1000);  
}

GitHub

Télécharger les sources (zip) sur GitHub

Liens internes

Main page


Liens externes

www.seeedstudio.com/Grove-OLED-Display-0-96.html shop

wiki.seeedstudio.com/Grove-OLED_Display_0.96inchwiki
github.com/Seeed-Studio/OLED_Display_128X64 github