Skip to content

Zenvi/ESP32-TencentCloud-MicroPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connecting ESP32 to Tencent Cloud by MQTT

Introduction

  • 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

1. Preparation

1.1 Hardware

  • 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.

ESP32F

1.2 Software

2. Create a Product on Tencent Cloud

  • Enter Tencent Cloud

    TC-Entry

  • Click '立即使用', after which you need a scan login

    TC-Click

  • After logging in, you should see a page like this, click '创建产品'

    TC-Create

  • Set up your product like this

    TC-PSetup
  • Click Manage for the product you just created

    TC-MClick

  • Go to '设备列表' and click '添加新设备'

    TC-GNC

    TC-CDevice

    TC-MDevice

  • The information you need for now is just:

    TC-Dinfo

    TC-PID

    TC-Alist

    Product ID & Client ID & MQTT Username & MQTT Password & Topic

3. Connect ESP32 to Tencent Cloud

  • Put main.py and simple.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:

    TC-Result

4. Reference

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages