How To Send Data From M5stack Stickc To Delphi
About the project
In this video we will learn how to send values from StickC board to Delphi VCL Application using Visuino.
Project info
Difficulty: Moderate
Platforms: Arduino, Visuino, M5Stack
Estimated time: 1 hour
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Story
In this video we will learn how to send values from StickC board to Delphi VCL Application using Visuino.
Watch the video.
Step 1: What You Will Need
1 / 3
- M5StickC ESP32: you can get it here
- Visuino program: Download Visuino
Note: Check this tutorial here on how to Install StickC ESP32 board
- Delphi - Embarcadero Link
Learn how to install Delphi here
- Mitov CommunicationLab for Delphi, download here
Step 2: Start Visuino, and Select the M5 Stack Stick C Board Type
1 / 2
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "M5 Stack Stick C" as shown on Picture 2
Step 3: In Visuino Connect Components
- Connect the pin (with the value that you want to send to the Delphi application) to the serial[0] pin
in our case we connected Battery voltage pin to the serial[0] pin
Step 4: Generate, Compile, and Upload the Arduino Code
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
Step 5: Start Delphi and Add Components
1 / 8
- In Delphi create New Windows Vcl Application
- In palette window find 'TCLComPort' component and drag it to the Form
- In the Object Inspector set the port of the StickC board (you can find the port number in Arduino>Tools>Port
- In palette window find 'CLTerminal' component and drag it to the Form
- In the Object Inspector double click on the 'InputPin' and in the connections window select 'CLComPort1'
- Click on the green Run button in Delphi
Step 6: Play
If you power the M5Sticks module (connected via USB to the computer), it will start to send data to the Delphi application.
Congratulations! You have completed your M5Sticks project with Visuino and Delphi. Also attached is the Visuino project, that I created for this tutorial, you can download it here and Delphi project that you can download it here.
Leave your feedback...