Sending PSoC6’s sensor to MQTT (node-red)
Last updated
Last updated
Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University
Building upon the foundational knowledge acquired from the previous lab on MQTT communication via the Mosquitto broker and public key cryptography, participants will now explore the integration of the PSoC 6 microcontroller's sensor data with Node-RED. Through this lab, participants will learn how to set up and configure Node-RED flows to receive, process, and visualize sensor data from the PSoC 6, transmitted via MQTT. The end goal is to enhance participants' proficiency in creating IoT workflows, harnessing the power of MQTT for real-time data communication, and visualizing sensor outputs in an interactive environment using Node-RED.
Resources | Links |
---|---|
Open config >> mqtt_client_config.h.\
Open publisher_task.c in source.
Copy code from publiser_task.c and past in publisher_task.c
Check node-red version
Run Node-Red by using node-red start
3. Open the Node-Red server: go to http://127.0.0.1:1880/
You will get this flow of nodes for Button control LED on PSoC6
Go to Server and click edit
Upload your client.crt
Upload your client.key
Upload your mosquito.org.crt
Topic >> set up as PSoC6Status/temperature,pressure
QoS >> set up as “1”
🎉 Congratulations! You can now complete this lab
GNU Arm® embedded compiler v10.3.1 (GCC_ARM
) - Default value of TOOLCHAIN
Arm® compiler v6.16 (ARM
)
IAR C/C++ compiler v9.30.1 (IAR
)
PSoC™ 62S2 Wi-Fi Bluetooth® pioneer kit (CY8CKIT-062S2-43012
)
PSoC™ 62S1 Wi-Fi Bluetooth® pioneer kit (CYW9P62S1-43438EVB-01
)
PSoC™ 62S1 Wi-Fi Bluetooth® pioneer kit (CYW9P62S1-43012EVB-01
)
PSoC™ 62S3 Wi-Fi Bluetooth® prototyping kit (CY8CPROTO-062S3-4343W
)
Infineon provides a wealth of data at www.infineon.com to help you select the right device, and quickly and effectively integrate it into your design.
Assoc. Prof. Wiroon Sriborrirux
Mr. Sriengchhun Chheang
Mr. Sabol Socare
© BDH Corporation, 2022-2023
Open the MQTT Subscriber node and set it up as:
Open the MQTT Subscriber node and set it up as:
Resources | Links |
---|---|
Version | Description of change |
---|---|
ModusToolbox™ Software Training
1.0.0
Node-Red Read Sensor PSoC6 vai MQTT
Computer
💻
ModusToolbox™ software v3.0 or later
CY8CKIT-062S2-43012 Infineon Board
Technical Report