We love Blinka & CircuitPython, and want to share it with the world! But how can we get CircuitPython talking to everyone?
This guide will show you how to connect your CircuitPython board to the Internet, by using an ESP8266 or ESP32 as the 'Wireless modem' - we'll even show you how to upload the required AT command firmware to the chip, all from your CircuitPython board.
Yallah! Let's go!
The Internet offers wonders beyond belief, but first we have to connect to it. There's two ways we can do that.
Use a chip with integrated WiFi such as the ESP8266 or ESP32
The all-in-one chips are powerful and low cost, but have some drawbacks. The ESP8266 has very few GPIO pins, and they are limited in functionality - for example only one ADC and it's not easy to use. A RTOS also takes up a lot of processor time, and makes real-time control difficult for some things like NeoPixels. The ESP32 solves a lot of these issues but doesn't have the native USB we require for a good CircuitPython experience.
Use a separate chip with WiFi and use it just for wireless data
For example, the Feather M0 WINC1500 has a SAMD21 chipset to do pin twiddling, I2C sensing, and display driving, while the WINC1500 provides just the WiFi part. When the M0 chip wants to send or receive data, it packetizes the commands over SPI and tells the WINC what to do. Works pretty well in Arduino!
Which way for CircuitPython?
A mix of the two! We don't support CircuitPython on the ESP8266/ESP32 because of the missing USB, and the WINC1500 is a complex beast that costs more than a bare ESP module. So we go right down the middle, by using an ESP8266 or ESP32 as a 'Wireless Co-processor'. This gets us:
- A main chip like a SAMD21 or SAMD51 with USB, peripherals, pins, and timers
- Wireless handling by a separate chip, so we don't have to run the WiFi stack natively - saves a lot of FLASH/RAM space
- Re-programmable co-processor (the WINC1500 is completely closed, we cannot change the firmware)
Text editor powered by tinymce.