{"id":19776110,"url":"https://github.com/namnamiot/esp32_canopus","last_synced_at":"2025-06-15T08:35:21.469Z","repository":{"id":156950297,"uuid":"614019033","full_name":"NamNamIoT/ESP32_CANOPUS","owner":"NamNamIoT","description":"Example for Modbus RTU, Modbus TCP/IP, MQTT run in ESP32 Canopus board","archived":false,"fork":false,"pushed_at":"2024-06-10T03:37:43.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T04:09:15.697Z","etag":null,"topics":["esp32","ethernet","hardware","iot","lan8720a","modbus","modbus-master","modbus-rtu","modbus-slave","modbus-tcp","wifi"],"latest_commit_sha":null,"homepage":"https://canopus-iot.com/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NamNamIoT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"paypal.me/thanhnamlt5"}},"created_at":"2023-03-14T18:17:37.000Z","updated_at":"2024-06-10T03:37:46.000Z","dependencies_parsed_at":"2024-06-15T19:45:29.318Z","dependency_job_id":null,"html_url":"https://github.com/NamNamIoT/ESP32_CANOPUS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamNamIoT%2FESP32_CANOPUS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamNamIoT%2FESP32_CANOPUS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamNamIoT%2FESP32_CANOPUS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamNamIoT%2FESP32_CANOPUS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NamNamIoT","download_url":"https://codeload.github.com/NamNamIoT/ESP32_CANOPUS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769234,"owners_count":21640871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","ethernet","hardware","iot","lan8720a","modbus","modbus-master","modbus-rtu","modbus-slave","modbus-tcp","wifi"],"created_at":"2024-11-12T05:18:46.589Z","updated_at":"2025-04-30T19:30:45.624Z","avatar_url":"https://github.com/NamNamIoT.png","language":"C++","funding_links":["paypal.me/thanhnamlt5"],"categories":[],"sub_categories":[],"readme":"# ESP32_Canopus Module Quick Start Guide\n\n## ✌️✌️ Welcome! ✌️✌️  \nHi, im Namnam 🕴🏼.  \nPlease contact me if you need to develop ioT products.  \n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://fb.com/kuem0912\" target=\"blank\"\u003e\u003cimg align=\"center\" src=\"https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/facebook.svg\" alt=\"kuem0912\" \nheight=\"30\" width=\"40\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://wa.me/84969809444\" target=\"blank\"\u003e\u003cimg align=\"center\" src=\"https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/whatsapp.svg\" alt=\"84969809444\" height=\"30\" width=\"40\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n### Information ESP32_Canopus board  \n  \n#### 🕵🏻‍♀️Version 1.0  \n|     **Object**    |      **Detail conponent**      |          **Note**     |\n| ----------------- | ------------------------------ | ----------------------|\n|        Power      | MC34063A                       | 5-35VDC               |\n|       Ethernet    | LAN8720A  (RJ45: HR911105A)    | -                     |\n|        RS485      | SP485EE                        | Serial2, auto DERE    |\n|         I2C       | -                              | SDA = IO33, SCL = IO4 |\n|      Led blue     | -                              | PIN IO15              |\n|      Led yellow   | -                              | PIN IO2               |\n|       Button      | -                              | PIN IO36              |\n|       ESP32       | ESP32 WROOM 32D                | -                     |\n|       Case        | Plastic                        | Mount dinrail         |  \n\n#### 🧑🏻‍🔧 Hardware Setup \n-Cable USB type C for power and upload code.  \n-Power 5-24VDC.  \n  There's really no need because we used 5V power via type C cable.  \n  Both type C cable and power supply via terminal can be connected at the same time.  \n-Cable ethernet, Use for ethernet demos.  \n\n#### 🧑🏼‍💻 Software Setup\n+Install IDE arduino. Follow [this](https://support.arduino.cc/hc/en-us/articles/360019833020-Download-and-install-Arduino-IDE), skip if you done.  \n##### ⚠️ WARNING: Install in Document folder.  \n![image](https://user-images.githubusercontent.com/49629370/235334499-7e59c503-6423-4381-9ae5-eeccecb57699.png)  \n+Install driver CH340. Follow [this](https://electropeak.com/learn/how-to-install-ch340-driver/), skip if you done.  \n+Install ESP32 in manager board:\n  - Down load this folder: [hardware](https://mega.nz/file/e3wlwIAI#vFoR5nT5x3zT5wkQSVknqihluzf_9Ng89H5CxPmu3Io)  \n  - Extract at ...\\Documents\\Arduino. Ex my computer: C:\\Users\\NamPC\\Documents\\Arduino  \n  - Go to ...\\Documents\\Arduino\\hardware\\espressif\\esp32\\tools  \n  - Click get and gen:  \n  ![ESP32 install](https://user-images.githubusercontent.com/49629370/235330978-d56cb96c-8032-4c83-995e-6e6720e585da.png)\n  + Check it in IDE:  \n  ![image](https://user-images.githubusercontent.com/49629370/235331088-db8737b9-3053-4350-bb5f-e3c348a513bb.png)  \n    \n    \n## At here , you are ready 👌 to execute the sample code for the ESP32_CANOPUS board  \n####  ⚠️ WARNING: Prepare yourself a cup of coffee ☕☕☕, because the next is a fascinating journey with Canopus board 🤪.   \nYou will be stronger after working through the next 12 examples.  \n#### [Blink led](#Blink)\n#### [Read modbus slave via RTU](#Modbus_Slave)\nRead modbus slave via TCP/IP  \nServe master RTU  \nServe master TCP/IP  \nAuto switch WiFi-Ethernet  \nAuto switch many WiFi in list  \nPush value modbus to MQTT  \nOn/off led via MQTT  \nFOTA - update firmware via Internet with FTP  \nWATCHDOG timmer  \nDeep sleep  \n\n#### Blink  \n\n```c\n#define LED_YELLOW 2 //Pin led color yellow is IO2\nvoid setup() {\n  // initialize digital pin LED_YELLOW as an output.\n  pinMode(LED_YELLOW, OUTPUT);\n}\n\n// the loop function runs over and over again forever\nvoid loop() {\n  digitalWrite(LED_YELLOW, HIGH);   // turn the LED on (HIGH is the voltage level)\n  delay(1000);                       // wait for a second\n  digitalWrite(LED_YELLOW, LOW);    // turn the LED off by making the voltage LOW\n  delay(1000);                       // wait for a second\n}\n```\nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### Modbus_Slave\nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 3. Read modbus slave via TCP/IP  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 4. Serve master RTU (board is slave)  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 5. Serve master TCP/IP (board is slave)  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 6. Auto switch WiFi-Ethernet  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 7. Auto switch many WiFi in list  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 8. Push value modbus to MQTT  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 9. On/off led via MQTT  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 10. FOTA - update firmware via Internet with FTP  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 11. WATCHDOG timmer  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n#### 12. Deep sleep  \nYou can find it in examples: [Download](https://github.com/NamNamIoT/ESP32_CANOPUS/tree/master/examples)  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamnamiot%2Fesp32_canopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamnamiot%2Fesp32_canopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamnamiot%2Fesp32_canopus/lists"}