Introduction: Utiliser Un Écran OLED I2C Sur Un ESP-01 / How to Use OLED Display With ESP-01
L'ESP-01 est un module WiFi (de la famille ESP8266) très économique (moins de 3€ sur ebay ou aliexpress) qui possède 2 GPIO que l'on va utiliser pour brancher un mini écran OLED I2C monochrome.
Vous pouvez retrouver l'article original sur mon blog
Si vous débutez avec l'ESP8266 , ces articles peuvent aussi vous intéresser :
- Personnaliser et flasher le firmware NodeMCU d'un ESP8266
- Réinstaller le firmware d'origine d'un ESP8266 (et retrouver les commandes AT)
ESP-01 is a very small and cheap WiFi module (ESP8266) with 2 GPIOs we can use to connect a mini OLED I2C display. You can read the entire post on my blog (in French).
Step 1: Matériel Nécessaire / BOM
Pour réaliser ce montage vous aurez besoin du matériel suivant
- 1x Module WiFi ESP-01. Moins de 3€ sur ebay, aliexpress, Banggood
- 1x module ou câble FTDI. Moins de 3€ sur ebay, aliexpress, Banggood
- 1x OLED I2C 0.96'' (SSD1306). Moins de 6€ sur ebay, aliexpress, Banggood
- 8x Jumper Dupont
- 1x alimentation pour breadboard si votre module FTDI ne délivre pas suffisamment de puissance (au moins 300 mA). Vous pouvez également utiliser 2 piles AA
BOM list
- 1x Module WiFi ESP-01. Less than 2$ on aliexpress, Banggood
- 1x FTDI module or cable. Less than 3$ on aliexpress, Banggood
- 1x OLED I2C 0.96'' display (SSD1306). Less than 6$ on aliexpress, Banggood
- 8x Jumper Dupont
- 1x 3.3/5V breadboard power supply if your FTDI is not able to deliver at least 300mA. You can use 2x AA batteries too.
Step 2: Préparer Le Programme Et L'ESP-01 / Prepare the Code and the ESP-01
Récupérez le code du projet sur github. Ouvrez le fichier ESP01-OLED.ino et modifiez les variables ssid et password et en fonction de votre réseau WiFi.
Téléchargez la librairie ESP8266Wifi sur github et installez là en allant dans le menu Croquis -> Inclure une bibliothèque -> Ajouter la bibliothèque .ZIP
Choisissez la carte Generic ESP8266 Module et sélectionnez ArduinoISP comme programmeur, sinon vous obtiendrez un message d'erreur.
Réalisez le branchement suivant et mettez votre ESP-01. Il va démarrer en mode bootload.
Téléversez le programme dans l'ESP-01.
Download the code of this project here. Open the file ESP01-OLED.ino and set your network variables ssid and password.
Now download and install the ESP8266Wifi on github
Select the board Generic ESP8266 Module and ArduinoISP.
Make the following wiring and power on your ESP-01. The ESP-01 will start in bootload mode.
Download the code
Step 3: Connecter L'écran Et Démarrer Le Scanner WiFi / Connect the Display and Start the WiFi Scanner
Débranchez l'alimentation de l'ESP-01 et débrancher le câble reliant le GPIO au GND
Branchez l'écran OLED suivant le schéma suivant
SDA <--> GPIO0
SCK <--> GPIO2
GND <--> GND
VCC <--> 3.3V
Mettez sous tension, votre écran OLED fonctionne maintenant avec votre ESP-01, le scanner WiFi démarre et affiche l'adresse IP de l'ESP ainsi que la force du signal WiFi
J'espère que cet instructable vous sera utile. La prochaine fois, nous allons fabriquer un petit boitier par impression 3D pour créer un petit scanner WiFi autonome et portable.
Un grand merci de soutenir Projets DIY sur les réseaux sociaux Facebook, Twitter, Youtube
Switch off the module and unplug the wire between the GPIO0 and GND.
Follow the scheme to connect the OLED display on the ESP-01 module
SDA <--> GPIO0
SCK <--> GPIO2
GND <--> GND
VCC <--> 3.3V
Switch On the ESP-01. Now your OLED display works with the ESP-01 module. The WiFi scanner start and display on the screen the ESP IP adress and the signal strength.
I hope this instructable will be useful. Next time, we'll make a little box with 3D printing to create a small standalone WiFi scanner.
A big thank you to support Projets DIY on social networks Facebook, Twitter, Youtube