cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling embedded device via scripting (in a C# application)

JBlackann
Associate III

Hello all,

I have created an embedded device (based on a STM32F4) where I can communicate with it via both USB HID and also commands via the UART interface (with a FTDI serial cable) and a terminal interface. I have also created a test application (written in C#) which communicates and controls the device via the USB interface. I would like to add some form of scripting parsing so that the test application can accept a file and then control the embedded device in some manner. Please excuse me if I am not using the correct terminology.

My embedded device can produce analog voltages for testing other different devices. For example, I would like a user to be able create a script which could be loaded into the test application which would then make the device work. The user's script would command output 1 of the embedded to produce an output of 0.5V. Then there could be delay of time T. After the delay, the device would be sent another command to set output 1 to 1.0V and again a time delay. This process could continue until reaching 3.0V (or whatever value) at which point, the script would reset the output back to 0.5V.

I would like the user to be able to load a simple script which can perform the functionality they desire instead of having them to develop their own application to interface to my embedded device.

STMicro has functionality similar to this in their SPINFamily evaluation tool for evaluating their stepper motor driver ICs.

https://www.st.com/en/development-tools/stsw-spin002.html

From the website for the SPINFamily evaluation tool. "A script editor allows controlling each aspect of the device using the Python language. "

Unfortunately STMicro does not provide the source for this application.

If anyone has any suggestions or other examples of similar functionality, I would love to learn more.

Thanks

0 REPLIES 0