Introduction: How to Send Data From M5Stack StickC to Delphi
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
Step 2: Start Visuino, and Select the M5 Stack Stick C Board Type
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 pin
in our case we connected Battery voltage pin to the serial 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
- 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 Instructable, you can download it here and Delphi project that you can download it here.