This is an account of my first look at another member of the XIAO family of tiny development boards from Seeed Studio, the XIAO ESP32C3. There's no big project here, I just wanted to compile and upload a few simple projects from the PlatformIO and Arduino IDEs. I also wanted to look at MicroPython on the XIAO.
The source code for all the C++ projects is made available in a single GitHub repository. Some care was taken to set up each project in a way that both PlatformIO and the Arduino IDE can use the same source code. The repository notes explain how that was done. The repository does not contain the example MicroPython script presented in this post. In keeping with the use of the Arduino-ESP32, two example projects which do the same thing as the MicroPython code are included in the repository. These are not discussed at all in this post.
This is a very personal examination of the XIAO ESP32C3. It was the first time I used ESP32-C3 based development board, but it is not my first project with PlatformIO, the Arduino IDE, and MicroPython. While I go into excruciating details where I was doing things for the first time, instructions for the rank beginner are not given. In particular there is nothing about installing the PlatformIO or Arduino IDE. There are numerous tutorials for beginners including the Espressif Installing Guide in the Arduino-ESP32 documentation which seems good with respect to the Arduino IDE, but amounts to providing a link to PlatfomrIO's own getting started guide. The screen captures shown below were done either in the Arduino IDE version 2.0.3 for Linux or in the PlatformIO IDE 2.4.0 extension of VSCodium (version 1.75.1) which "is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code."
Table of Content
- Tiny, Cute and Markedly Different
- A Rose is a Rose...
- Bootloader, Buttons and Bows
- Where is the Board?
- A Do Nothing PlatformIO Project
- Doin' Nothin' in the Arduino IDE
- Pin Numbers and Names
- At Last, the XIAO ESP32C3 Blinks
- Button Controlled LED
- MicroPython: REPL Controlled LED
- MicroPython: Web Controlled LED
- Bluetooth Controlled LED
- Uncurated Bibliography and Concluding Thoughts
It is only right to disclose that I was given two XIAO ESP32C3 boards along with a XIAO nRF52840 Sense and a XIAO starter kit by Seeed Studio. Click on the image of the invoice on the right for details. The understanding was that Seeed Studio hoped that I would write a post about some of these products along the lines of my Overview of the SAMD21 Arm Cortex-M0+ Based Seeed Studio XIAO, but that there was no obligation, nor was a time line imposed. That's good because the package arrived five months ago, but I was so occupied elsewhere that I opened the first of platic bags containing an ESP32C3 only on the 20th of February. As I write this, I assume that my contact at Seeed Studio must have given up hope, as he had the package send express by DHL back in October of last year!
If trying to judge how much I am beholden "to the man", take into consideration that there was no payment from Seeed Studio and that these notes and future posts have not and will not be submitted to Seeed Studio before being published. Besides, all I really do is describe how I go about doing things for my own use and I publish some of my notes in the hope that others may find the information useful. So this post is not a recommendation about various products because I simply do not have enough knowledge or experience to make judgments about the relative merits of the numerous devices that are available from many vendors. Now is a good time to repeat that I do not claim any expertise about the subject matter covered in this post or any other post on this site.
With that out of the way, let me add that I purchased another two XIAO ESP32C3 from Seeed Studio as soon as they became available again in late December 2022 even if I had no experience with them. When Seeed Studio offered low shipping rates for these cheap ($5 US) devices with attractive specifications, I jumped at the chance to get them, along with a couple of XIAO nRF52840, especially given the supply issues that have been plaguing the markets for electronic enthusiasts in the last few years. At the same time, I also purchased a similar number of WEMOS W600-PICO development boards which is based on another Wi-Fi enabled microcontroller. Blame that purchase, in part, for the delay into looking at the ESP32C3. More accurately, I made an error in my initial look at the W600-PICO that I felt was so egregious that my priority was to rewrite the whole thing as quickly as possible. The similarities and differences are interesting enough that I may write a comparison of the two boards in the future.
Tiny, Cute and Markedly Different
The XIAO ESP32C3 by Seeed Studio is the fifth and latest addition to the Seeed Studio XIAO Series of diminutive development boards. As the name implies it is based on the ESP32-C3 microcontroller from Espressif which some, Elliot Williams at Hackaday and digiblurDIY notably, have touted as a replacement for the ESP8266. The ESP32-C3 is a departure for Espressif because it has a RISC-V processor instead of an Xtensa L106 processor. It is also a departure for the XIAO series since this is the first member that is not based on an ARM Cortex processor.
Because this is a first look and there may be a future detailed comparison with other boards, I will not describe the processor and development board in much detail at this time. Let's just say that the RISC-V processor is single core and runs at 160 MHz. It has wireless connectivity: Wi-Fi (IEEE 802.11 b/g/n; 2.4 GHz; HT20/40; up to 150 Mbps) and Bluetooth LE (v5.0). It comes with two 12-bit ADC (analog to digital converters) available on 6 channels and 22 or 16 (depending on the package) programmable GPIO pins. There's also a full complement of digital interfaces including three SPI, two UART, one I²C and one I²S. As for storage, there is 400 Kbytes of static RAM, 284 Kbytes of ROM and 8Kbytes of static ram on the real-time clock. The chip used in the XIAO ESP32C3, the ESP32-C3FN4, comes with 4 Mbytes of on-board flash memory. The list goes on of course (source).
A Rose is a Rose...
While currently named Seeed Studio XIAO ESP32C3 (SKU 113991054), the board was initially released as the XIAO WiFi/BLE - EPS32C3 (source). Consequently, there may be libraries for the device that use the older name, but I suspect that this will be much rarer than in the case of the Seeeduino XIAO renamed Seeed Studio XIAO SAMD21 much later after its release.
Saying that the XIAO ESP32C3 belonged to the "XIAO family of tiny development boards" was redundant because, as I found out months ago, XIAO means small or tiny. In any case, the board conforms to the XIAO 18x22 mm form factor shown on the right. There are 14 pads along the edges of the board, three of which are dedicated to power and ground connections and the remaining 11 pins are I/O. Four of these pins have no predefined functions, while the remaining seven are used to provide three serial peripherals: UART, I²C and SPI. Below is the specific pin assignments for the XIAO ESP32C3.
The pin naming convention is not the same as with the XIAO SAMD21 which is a bit unfortunate. Maybe it would have been better to adopt a "gender neutral" naming convention such as
P10 at the very start with the XIAO SAMD21, but that's with the benefit of hindsight, of course. The perfect match between pin name and pin number of the XIAO SAMD21 (i.e., where "An" is the name of pin number n) is not present here. That is not a problem because symbolic names instead of "magic numbers" should always be used.
Because the ESP32C3 does not have an ARM Cortex microcontroller the connections at the back of the board are quite different from the other members of the XIAO family. Gone are the pads for the SWD debug interface, replaced with for a JTAG interface. The board also has battery connection pads as it can be powered from a connected battery and can charge the battery when powered from the USB connector or the 5 volt pin. The board has no power or user-controlled LEDS. The small red LED near the USB-C connector labelled CH is a charge indicator.
As with other members of the Seeed XIAO family, Adafruit has an equivalent product, the QT Py ESP32-C3 in its line-up of QT Py / XIAO development boards. At roughly twice the price of the Seeed model, it is based on the same the ESP32-C3FN4 SoC. It boasts a neo-pixel, an on-board antenna and on-board STEMMA QT connector parallel to the I²C pins which is somewhat compatible with the Seeed Grove connector. The QT Py does not have JTAG pads as far as I can make out. Furthermore components are mounted on both sides of the board so if the QT Py were to be soldered using its castellated pads, a cutout would have to be made on the larger board.
Bootloader, Buttons and Bows
The XIAO has two normally open push buttons and one large bow. It's not really a bow of course, but it is an elegant, mat black, Wi-Fi and Bluetooth antenna. While very thin, it's area is almost twice that of the XIAO itself. The U.FL coaxial connector is very small, a bit fiddly and will probably not survive very many connections (the female connector on the antenna is rated for only 30 reconnections, see Hirose U.FL), so I will try to avoid disconnecting it.
There are two small push buttons at the bottom of the board along the edge opposite the USB-C connector. The one on the right is the reset button while the on the left is the boot mode button needed to put the board in bootloader mode. The reset button works as expected. It is a welcome addition compared to the bare pads of the XIAO SAMD21 which generated (warning! hyperbole about to be committed) half à of the postings on the forum when that board was launched. The Seeed Wiki talks about the boot button and bootloader mode only in the context of reflashing the factory firmware, something I have not done nor see the need to do. Nevertheless, that boot button very useful. The sequence of button presses and releases to get to bootloader mode is pretty common.
- Press and keep depressed the reset button.
- Press and keep depressed the boot button.
- Release the reset button.
- Release the boot button.
Another way of putting the board in bootloader mode is described in the Wiki.
- Remove power to the board, usually by disconnecting the USB cable.
- Press and keep depressed the boot button.
- Apply power to the board, usually by connecting the USB cable.
- Release the boot button.
Be deliberate about these steps, there is no rush. Once the sequence is completed, the board will be in bootloader mode waiting for new firmware. Uploading should now work. Remember that after the upload is finished, the board remains in bootloader mode and the reset button must be pressed and released to return the board to normal mode where it will execute the newly uploaded firmware.
If I were a bit more careful, there would hardly be any need to put the XIAO into bootloader mode. The following uploading error occurs regularly in PlatformIO.
Putting the XIAO in bootloader mode is a possible solution, but usually that is not necessary. I carelessly let windows pile up one on the other at the bottom of the VSCode window as I push the build, upload, and terminal buttons in the PlatformIO toolbar. Then I'll fail to spot a spinner in the stack indicating that a terminal is waiting for some input, which invariable interferes with an upload. If every window was closed properly, most times an upload will go through without a problem.
Where is the Board?
Enough with the introduction, it's time to play with the board. Because it has a USB-C port used to supply current and as a programming interface just like the XIAO SAMD21, I assumed that it would show up as terminal (TTY) device. To find it, I started printing the kernel ring buffer on my Linux Mint desktop machine with the
dmesg -w command. The
--follow) flag means that utility will not terminate once it has printed all previous messages but will remain active and will print new messages as they come in. I waited until
dmesg had finished printing all the old kernel messages and then I plugged in the USB cable from the XIAO to a USB 2 port on my Linux Mint desktop.
As usual the CtrlC keyboard combination halts execution of the process. The USB vendor and product ID were new values that I had not encountered before. When listing all USB devices, not much information is shown, but it is possible to get much more information by explicitely asking for it.
Most of this information is not particularly important at this point, but it is nice to see that the USB port has a serial number. Investigating by looking up the serial numbers of the four XIAO that I have in a Media Access Control or MAC address database, it looks very much as if that serial number is a MAC address assigned by Espressif to each ESP32-C3 microcontroller produced. The fact that the USB connection has a unique identifier can be very useful when trying to set up
udev rules for specific devices that are connected to a USB port.
With all that said, the XIAO ESP32C3 shows up as a
ttyACMxx device just like the XIAO SAMD21. At this point, I connected directly to the device with the old, dependable "Call up another system"
This output looks like the firmware could be a factory test to ensure that the board is functioning properly. Everything is failing which makes sense as there is no testing fixture connected to the board. Whatever this firmware is, it will be erased in the next steps. I presume that it could be restored by flashing the Seeed Studio XIAO ESP32C3 Factory firmware available from the Seeed Studio Wiki. Note how the linked file is named
ESP32-C3_RFTest... so that sort of makes sense.
It did not matter if the baud was set to 115200, 9600 or 500000 or probably anything else when connecting to the board with the
cu . Just like the XIAO SAMD21, the USB data lines are connected directly to the microcontroller which has a built-in USB serial controller with a CDC-ACM virtual serial port with is USB 2.0 compliant capable of 12 Mbits/s transfer speeds (Source ESP32C3 Series Datasheet, Version 1.4 pp 25).
A Do Nothing PlatformIO Project
Check if platform
Espressif 32 is already installed in PlatformIO or PIO for short. If it is, make sure it is up to date. Do that by clicking on the
Platforms icon in the PIO Home side bar, clicking on the
Installed tab at the top of the window, and by entering
Espressif in the
Filter platforms by name... box at the top of the list of installed platforms.
Espressif 32 platform is installed, it will be displayed along with the currently installed version number. To check if it is up to date, click on the
Updates tab at the top and enter
Espressif in the
Filter platforms by name... box once again.
Espressif 32 is not shown as above, then the installed version is the most recent. Otherwise, the platform is displayed and clicking on the button will install the newest version.
If the platform is not installed, there is nothing much to do because the newest version will be installed automatically when a new project using the XIAO ESP32C3 is created in the next step.
I created a new project by first clicking on the
Home icon in the PIO Home and then clicking on + New Project under
Then it's a matter of filling in the fields in the project wizard setup page.
There are so many supported boards in PIO, it is best to start typing some words that will narrow down the search. It will be easy to select the XIAO ESP32C3 after entering
xiao into the
Board: drop down edit box. Note that I did not use the default location and instead let PIO create a project directory named
FirstRun in a directory called
~/Documents/PlatformIO/Projects/esp32c3. When I clicked PIO automatically created the project directory and subdirectories, a do-nothing sketch
main.cpp in the
Click on the
Explorer icon at the left edge of VS-Code to see the project directory and open the
src subdirectory and click on the
main.cpp file name to see its content in the editor. PIO also created a default
platformi.ini configuration file in the project directory.
The update port and serial monitor ports are not specified so adjustments may be needed. Indeed, there was another serial device connected to a USB port on the desktop, which caused confusion. In a way, that was fortunate because it's best to iron out connection problems as soon as possible.
When the PIO serial monitor was started, it latched onto the wrong serial port.
Of course nothing showed up because the terminal took over
/dev/ttyUSB0 thus disabling my very basic macro key pad which is unfortunate because I use it writing these posts. Supposedly, autodetection is better when uploading firmware to the microcontroller. So I compiled the empty sketch and tried to flash it on the XIAO.
As we can see, autodetection got confused just as before and tried to upload the binary to the macro keypad. I checked in the terminal to confirm that PIO was seeing both serial devices.
One way to get around this problem is to specify, in the configuration file, which device to use for uploads and for the serial monitor.
It does work but these additions to
platformio.ini would be required for each project. Fortunately, there is a "universal" solution which involves modifying the PIO JSON configuration file for the board. The file,
seeed_xiao_esp32c3.json, is in a "hidden" subdirectory in the user home directory
~./platformio/platforms/espressif32/boards/. The hardware IDs array (
hwids) did not contain the vendor and product ID values for the particular board I had, so I added those values.
I was pleasantly surprised to see that this worked as I compiled and uploaded the "do nothing" binary without interfering with the serial device at
The emphasis shown in the listing above was added by me.
seeed_xiao_esp32c3.jsonboard definition file, at least not as a long-term solution. The problem is that the modified file will be overwritten with the next update of the platform. However, Valerii Koval (valeros) quickly merged my correction into the
developbranch of the
platform-espressif32repository. The change should be included in the next release of the Espressif 32 platform. Consequently modifying the JSON board definition by hand at this point should be safe. In the source on the GitHub repository, I used a third approach. The
developbranch of the
platform-espressif32repository is used since it contains the USB ID correction and avoids editing the board definition file. That is not a perfect solution either; a later version of the development branch could break something.
Doin' Nothin' in the Arduino IDE
The recently released version 2.0 of the Arduino IDE represented a major improvement. While PlatformIO remains a better choice for me, I think the new Arduino IDE will be good enough for many. As a matter of fact, both are installed on my desktop computer and both get used. Consequently, it seemed appropriate to upload a "do nothing" sketch using the Arduino IDE to check if there are connection problems. To do this, I used the latest, self-contained, 2.0.3 Linux 64-bit appImage of the IDE and added support for third-party ESP32 microcontrollers within the IDE. That is done by adding the URL of the JSON index file of the
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json in the
Additional boards manager URLs: list in the
Settings tab of the application
Preferences found in the
File menu. It is simpler than described, details can be found under Software setup in the Getting Started Seeed Wiki.
I also ensured that another serial device was plugged into the desktop computer just as with PlatformIO. I am pleased to announce that no significant confusion, as encountered with PIO, arose.
I chose the correct board and then selected the serial device (or port) to use. Both serial devices were displayed, and I was able to select the correct device
/dev/ttyACM0 from the list, compile the do-nothing sketch and upload the generated binary successfully. One can see a part of the Output window below the
Tools which shows that 100% of the binary was uploaded and that the data was verified. The following bit was also shown in the output window but it has scrolled out of view by the end.
I added the emphasis to underline the fact that the correct serial port was used. Of course, that is not too surprising because the choice of a serial port is a manual operation in the Arduino IDE.
It was a bit disconcerting to see that the serial port was associated with the Adafruit QT Py ESP32-C3 instead of the XIAO, so I looked at the latter's definition in
boards.txt in the
esp32 package found in the following directory
~/.arduino15/packages/esp32/hardware/esp32/2.0.7/. The definition starts at line 19576 (yes it is a huge file!).
As in PIO, the USB vendor and product ID listed for the board does not correspond to the values of the four XIAO ESP32C3 that I have. I decided to add the newer IDs following the instructions at Board VID/PID in the Arduino CLI Platform specification documentation .
Unfortunately, that did not work as I had hoped.
There is probably no acceptable work around this problem:
"The Arduino development software uses the vid and pid properties to automatically identify the boards connected to the computer. This convenience feature isn't available for boards that don't present a unique VID/PID pair." (source)
Sometimes, there is a good reason to use the Arduino IDE instead PlatformIO because it can happen that it is updated more quickly when changes to the underlying ESP-IDF (Espressif IoT Development Framework) are made. However this is not always the case. Currently (2023-02-22), the latest
2.0.7 esp32 package installed in the Arduino IDE is based on ESP-IDF v4.4.4, while the latest
6.0.1 platform-espressif32 release is based on ESP-IDF v5.0, "a major update for ESP-IDF v4.x".
Another reason to use the Arduino IDE is its better management of examples sketches. This could be an important criterion especially for beginners. Of course, it is possible to use both. Indeed, that is what is done in the GitHub repository that contains most of the code shown here.
Pin Numbers and Names
I have been on pins and needles after seeing the Adafruit QT Py pinout. A simplified version is shown on the right.
Same processors, same form factor but the I/O pin assignment is different! I had to make sure that there was no error in the XIAO pinout. The direct way of checking that is to look at the pin assignment in
pins_arduino.h found in the Arduino Espressif32 package in the following directory:
~/.platformio/packages/framework-arduinoespressif32/variants/XIAO_ESP32C3/. But that's not as much fun as writing a first sketch to merely spit out the pin numbers assigned to the symbolic names and finally do something with the board.
The serial output proves that there was no mistake in the Seeed documentation. It is unlikely that there is an error in the Adafruit pinout. I expect to look into this in more detail in further investigation of the ESP32-C3. In any case, here is the simple source of the sketch that printed the above results.
At Last, the XIAO ESP32C3 Blinks
Now that the connection issues are resolved, it's time to run a blink sketch, the microcontroller equivalent of the "Hello world!" program. The Seeed Studio Wiki already contains a blink sketch in Getting Started with Seeed Studio XIAO ESP32C3, but I have modified it slightly because it is hard to show a blinking LED on a static Web page. This version of the sketch prints the state of the LED out to the serial port as it toggles it on and off.
Note how the default baud of the serial port is not set with the
Serial.begin() statement. The baud could be anything; indeed the default value is 0 and the parameter is actually ignored in the
void HWCDC::begin(unsigned long baud) function found in
~/.platformio/packages/framework-arduinoespressif32/cores/esp32/HWCDC.cpp. Here is the serial output of the program.
One should check that the program will not hang waiting for the serial port to be activated by powering the board from a USB power source.
Button Controlled LED
Let's control the LED with a push button. The on-board boot push button could be used, but my test setup is not ideal making it hard to reach the button. I prefer connecting another normally open push button connected to ground and D1 instead. Being lazy and hoping for some free publicity to the many thousands who will be reading this post, my own button library will be used. Since it is available on GitHub, a simple
lib_deps directive in the
platformio.ini configuration file will take care of the dependancy.
Here is the listing, which is nothing more than the basic button example from the
mdPushButton library with the addition of the
I was very pleased to see that my push button library worked with the ESP32-C3 without any tweaking. In other words, the program works as expected, the LED is toggled on or off with each single press of the added button. Long presses and two or more successive button presses done in quick succession do not toggle the LED, but they are reported to the serial monitor.
MicroPython: REPL Controlled LED
Following the instructions at MicroPython ESP32-C3 with USB, I downloaded the latest v1.19.1 release of MicroPyton into a directory in my desktop machine. The it was a matter of using
esptool to upload the binary to the XIAO ESP32C3. I knew that there were many copies of that utility on my machine, so a search in the PlatformIO packages directory to find the most recent version seemed advisable.
A check of the esptool GitHub repository showed that version 4.5 was indeed the latest release. Since the binary is not on my search path, I created an alias, to avoid typing a very long command and tested it by displaying the
esptool version and then using it to view some information about the ESP32-C3 on the XIAO.
chip_id. After enough resets into bootloader mode, I could get the
flash_idbut never the
chip_id. It turns out that PlatformIO had some control over the serial port, even if it looked as if I had stopped the serial monitor. Once I unloaded the PIO project that was open, everything worked perfectly.
To simplify things, I made the directory where the firmware was uploaded the current working directory and checked the firmware's name. Note that a
upy- prefix had been added to the name when the file was downloaded to make it easier to identify. Uploading the micropython firmware according to the instructions was a breeze.
esptool says it reset the XIAO, it didn't because there is no RST connection through the USB port. So activate the XIAO reset button to exit bootloader mode.
Once again I used
cu to connect to the MicroPython REPL. Nothing seemed to be happening until I pressed the Enter key at which point the REPL prompt
>>> appeared. A keyboard combination CtrlD initiated a soft reset which in turn displayed the initial MicroPython screen.
Let's turn on and off the LED connection to I/O pin 10. Note the GPIO pin number is used in MicroPython, not an alias such as
Of course that's not very practical, but with the XIAO Wi-Fi capabilities it is relatively easy to control the LED with a web server built with MicroPython.
MicroPython: Web Controlled LED
For my next trick, I decided to just modify an example web server W600-PICO. I used the same Thonny IDE as before, the only difference was that I had to configure the interpreter to use a different port:
USB JTAG/serial debug unit (/dev/ttyACMO). The firmware can only serve two web pages, the default page at
http://192.168.1.59/ and a 404 error page whenever a non-existent page is requested or an unknown request is made.
To toggle the state of the LED, click on the
http://192.168.1.59/?led=toggle, will be sent by the client web browser back to the Web server which will then act on receipt of that request to change the state of the LED. The Web server code is spread over three files. First there is a
secrets.py file that contains the Wi-Fi network credentials and the fixed IP address to be assigned to the Web server. Here is a template for that file, which will have to be modified in accordance with the local network.
httpresonses.py module has two functions. The first returns an HTTP response header whose content will be different depending on whether a 404 error HTML page or the index HTML page will be sent. The second function returns the full text of the HTML page to be displayed by the client web browser. Its content depends on whether it is a 404 error page or the index page. The state of the LED is passed onto this second function so that it displays the state correctly.
Here is the
main.py module which is executed automatically whenever the XIAO is booted.
Notice how the LED is first turned on for a two seconds at the beginning, and then flashed 10 times just after the web server starts accepting connections. That helped in figuring out what was happening when starting the application. It turns out that the XIAO draws so little power when the web server is waiting for a client connection that the power bank I was using to test the firmware without a connection would disconnect the XIAO entirely.
Finally here is the serial output as displayed in the REPL.
That unusual Quit button is just a quick way to return to the REPL.
The source code for this MicroPython script is not included in the GitHub repository, but it can be downloaded from this site: upy_web_led.zip.
Bluetooth Controlled LED
Unlike the ESP8266, the ESP32-C3 has Bluetooth® Low Energy (BLE) capabilities. My knowledge in this area is so limited (one tiny post: BLE Beacons with Tasmota32 - Proof of Concept) that I do not want to say much. Let's just say that I was able to simplify an example from Shahzada Fahad (Engr), XIAO ESP32C3 Bluetooth Tutorial, Range test, and Home Automation to control the LED connected to the XIAO ESP32C3.
The sketch uses the
ArduinoBLE library, which is added as a dependency in the
platformio.ini configuration file.
The source is almost comprehensible.
On uploading the firmware to the XIAO it seems to stop once the
setup function is completed.
But that is not the case, the XIAO is simply waiting for a connection and I could see that "Home Automation" was indeed visible in the list of Bluetooth devices found by my desktop computer.
There's no point in pairing the XIAO with the desktop at least on my machine. I could not find a light application that would connect and interact with BLE for Linux, so I opted to use a tablet to continue with this example. Shahzada Fahad used nRF Connect for Mobile (Android, IOS). I tried the Android version and it worked. However I will be showing the use of LightBlue for Android below (there is an IOS version).
Once installed, start
LightBlue. There is no need to pair the XIAO to the phone or tablet,
LightBlue will take care of this. Click on the thumbnails on the right to see a full-sized version of the screen capture.
The sketch shows the received values in the serial monitor. It also reports when an invalid value is received.
Uncurated Bibliography and Concluding Thoughts
Here is an uncurated bibliography, meaning here are links to various sources that I have consulted in the last few days while writing this post. I am sure there are other sources that would be just as informative if not more than what I found. Any suggestions would be welcome.
- Seeed Studio:
- PlatformIO: Board documentation
- Wiki: Getting Started with Seeed Studio XIAO ESP32C3.
- Forum: Micropythhon support for XIAO ESP32C3 and All XIAO ESP32C3 topics.
- Espressif Systems:
- ESP32C3 Series Datasheet, Version 1.4.
- ESP32C3 Technical Reference Manual, Version 0.7
- hackster.io: XIAO ESP32C3 Projects
- Shahzada Fahad (Engr):
- XIAO ESP32C3 Getting started tutorial with Projects, ESP32 C3 with accompanying video.
- XIAO ESP32C3 Bluetooth Tutorial, Range test, and Home Automation with accompanying video.
- techiesms: Getting Started with XIAO ESP32 C3 (video).
- PlastiBots: SEEED XIAO ESP32C3 Review and Demo of ESP-NOW Feature (video).
- Algobotics: Testing The Amazing ! new Xiao Wifi ( esp32-c3 ) (video).
- digiblurDIY: ESP32-C3 First Look - The Next ESP8266? (video).
- Adafruit: QT Py ESP32-C3 WiFi Dev Board.
Is it an ESP8266 replacement? It does not look as if Espressif is planning to drop the older device. The device still shows up in its product line and, this very month of February 2023, the Hardware Design Guidelines for the ESP8266 have been updated. However looking at pricing, the future is not so clear. Here are the listing from Mauser Canada for single core Espressif microcontrollers that were in stock on Feb. 26, 2023. All prices in Canadian dollars.
|part||price ($)||SPI Flash (MB)||PSRAM (MB)||Notes|
|ESP8285||2.48||1||0||Used in Sonoff Basic|
|ESP32-C3FN4||1.90||4||0||Used in XIAO ESP32C3|
|ESP32-S2FN4R2||2.37||4||2||Xtensa LX7 core|
These prices do not seem to make much sense when compared to the comparative capabilities of the controllers. Perhaps the surprisingly high price of the older 8266/8285 parts has something to do with meeting the production demand for older devices. In the long run, demand for the ESP8266 may disappear as older products are removed from the markets and replaced with new designs based on newer chips.
This is just the opinion of an amateur, but the ESP32-C3 by Espressif is a very good SoC which is a better than ESP8266 as far as I can tell from my preliminary examination. It has more static RAM, much more flash memory, more analog input pins, a faster TCP stack, a built-in USB-to-serial peripheral (this is not native USB, so no HID capabilities) and so on.
The ESP32-C3 is not the first Risc-V microcontroller. I toyed with the Longan Nano and Wio Lite RISC-V back in March and April of 2020. However there is no real comparison from the amateur's point of view between the older boards. The Arduino framework for the ESP32-C3, which I believe is the work of Espressif, is much better than for the older board. It really feels as if one is programming for any ESP32 (aside from the single core restriction) when working with the ESP32-C3. This is probably an unfair judgment because I have not looked at the older boards since those first experiments.
As for the Seeed XIAO ESP32C3, again my first impressions are very positive. I believe this board can be seen as a replacement for the Wemos D1 Mini based on the ESP8266. It offers the same number of I/O pins as the bigger D1 mini (and the bigger nodeMCU ESP8266 boards), with the greater flexibility of the ESP32-C3. It was possible to install Tasmota for the ESP32-C3 on the XIAO and, after some difficulties with the installation, it was possible to integrate the XIAO ESP32C3 into my Domoticz based home automation system. I am looking forward to looking at improving some of my old projects, especially Domoticz Button, a light-weight physical interface to a home automation system based on Domoticz. It would be interesting to redo it in MicroPython to see if it could be made more "user-friendly".