The SSD1306 I2C OLED display and how to interface it with WizFi-360-Pico using MicroPython. It is a simple project that receives messages from WizFi360 and displays them on the display.
WizFi360-EVB-Pico
WizFi360-EVB-Pico is based on Raspberry Pi RP2040 and adds Wi-Fi connectivity using WizFi360. It is pin compatible with Raspberry Pi Pico board and can be used for IoT Solution development.
- Raspberry Pi Pico Clone
- Wi-Fi (WizFi360)
OLED (SSD1306)
OLED displays available in the market the one which we will be using is the SSD1306 0.96-inch OLED display. The main component of all different types of OLED displays is an SSD1306 controller which uses I2C or SPI protocol to communicate with the microcontrollers.
Schematic Raspberry Pi Pico with OLEDFollow the schematic diagram below connect them accordingly.
Micropython Thonny IDE
Install Thonny IDE on Raspberry Pi Pico by referring to the link
Hold Down BOOTSEL and Connect Pico to USB Port
1. Go to Run > Select interpreter and choose MicroPython (Raspberry Pi Pico)
It's also a good idea to install or update firmware. This will update your Pico with the latest version of MicroPython, or install MicroPython if it wasn't already.
2. You can also access the firmware installation menu if you click on MicroPython (Raspberry Pi Pico) in the status bar and choose ‘Configure interpreter …’.
3. Look at the Shell panel at the bottom of the Thonny editor. You should see something like this:
SD1306 OLED MicroPython Library
We will have to install the SSD1306 OLED library for MicroPython to continue with our project.
- To successfully do that, open your Thonny IDE with your Raspberry Pi Pico plugged in your system. Go to Tools > Manage Packages. This will open up the Thonny Package Manager.
- Search for “ssd1306” in the search bar by typing its name and clicking the button ‘Search on PyPI.
- From the following search results click on the one highlighted below: micropython-ssd1306
Install this library.
After a few moments this library will get successfully installed. Now we are ready to program our Raspberry Pi Pico with OLED display.
Welcome to WizFi ChatSTEP 1
Use the Hercules tool to open the TCP server and wait in the Listen state.The IP address of the server PC is 192.168.11.4 and the port is set to 5000.
STEP 2
Create a Python file named main.py before executing the code.Copy and paste the source code below and enter the "SSID" "PASSWORD" of the AP you want to connect to.
STEP 3
After that, if you insert the address and port of the open server, you will be able to connect to the client.
STEP4
1. When you are ready to receive the message, the OLED displays "Start WizFi Chat".
STEP5
It prints out the time and IP address of the client and verifies that the server and the client are connected.
STEP6
Send a text message from the server to the client as shown below.
STEP7
It will print out the received message and also print out the received time information on the OLED display.
Additionally, WIZnet is currently conducting a contest. I hope a lot of people will participate and I will leave a link.Thank you.
Comments
Please log in or sign up to comment.