Digging on Xojo. It took me less than an hour to whip together a crude prototype that let me achieve four goals:
- Pick an Arduino (or any serial device) from a list of COM ports.
- Connect/disconnect on the fly.
- Read data from the analog pins on the Arduino.
- Send commands to toggle the LEDs.
- Save the analog data coming in from the serial port to a CSV file locally on the computer.
- Have the application as native apps for Windows, MacOS, and Linux. A higher tier of Xojo even lets you export to a web app and iOS app.
You can get a free copy of Xojo if you are deploying to a Raspberry Pi! Grab your copy here https://www.xojo.com/
You can grab my code from GitHub: https://github.com/GreenShoeGarage/ArduinoXojoSerialCommsExample
There are three subfolder under the “Software” folder:
- “Arduino Firmware”: Contains the .ino file that can be edited and flashed to your Arduino
- “Xojo Project”: The raw Xojo project file that can be edited to meet your needs
- “Windows Executable”: A .exe file that can be ran on a Windows 10 machine.
Word of Warning: This code is provided as-is. It is experimental and not fully tested. Use at your own risk, and do NOT use for any production or other critical applications. You have been warned!
Some screenshots: