-
What does this project do?
This project connects an ESP32 board to Tencent cloud by MQTT protocol, and publishes a topic which shows the value of a on-board Touch Pad (Capacitive Touch module).
Also, it receives from the cloud and set-high or set-low GPIO0 accordingly.
-
What do I need to get this project running?
See 1. Preparation
-
How should I do to get this project running?
See 2. Create a Product on Tencent Cloud and 3. Connect ESP32 to Tencent Cloud
-
The Board
The board I use called ESP-32F, which is a never-heard-of version of ESP32. It has a RGB light module which is soldered incorrectly (never gonna light up), and a speaker module which speaks when I try to light the RGB module up, and so many other shits. By the way, 1-starred on its TaoBao Page of course.
But it has two touch pads. Although their pin number don't comply with the schematic, they work smoothly thank god.
- MicroPython: http://docs.micropython.org/en/latest/esp32/tutorial/intro.html#esp32-intro
- Thonny: https://thonny.org/
-
Enter Tencent Cloud
-
Click '立即使用', after which you need a scan login
-
After logging in, you should see a page like this, click '创建产品'
-
Set up your product like this
-
Click Manage for the product you just created
-
Go to '设备列表' and click '添加新设备'
-
The information you need for now is just:
Product ID
&Client ID
&MQTT Username
&MQTT Password
&Topic
-
Put
main.py
andsimple.py
to the board through Thonny. -
Modify
main.py
, fill in the information (Product ID
&Client ID
&MQTT Username
&MQTT Password
&Topic
) you just got from Tencent Cloud. -
Run
main.py
on board through Thonny. -
If everything goes well, you could observe your data on Tencent Cloud:
This project is just a modified version of a blog on the 01Studio (https://www.01studio.cc/) forum:
https://bbs.01studio.cc/thread/28
Thanks to Jackey.