Real-time control with the PC interface

Greetings, forum members.

Is there a way to control the output of the Arduino in real-time, using the interface written outside of the Arduino IDE?

We are building a wrist rehabilitation device and we need multiple speed settings as well as rehabilitation modes, and we have to switch between them in real time, without uploading code on Arduino over and over again. How could we do that, if we could?

There are dozens of ways to communicate with an Arduino both wired and wireless. One currently popular way is via Bluetooth using a smartphone app written with MIT App Inventor but there are many others using code written for the PC or even via web applications.

Once you have communication the Arduino code just needs to set variables like "speed" or select different functions for the different modes.

Steve

Unfortunately I don't think that bluetooth is an option in our case, we lack time and abilities to make an app for that.

You say that there are many other ways, but could you name the one requiring least time to work with?

It's difficult to offer advice without knowing what capabilities you do have.

IMO the absolute simplest is a wired serial connection with the data sent using the Serial Monitor in the Arduino IDE. It will work but is very crude. You might key commands like "s20","s50" for speeds and perhaps "m1","m2" for modes of operation.

Whatever you choose will need some code in the Arduino and some careful design of the main program.

Steve

For (serial) communication, do a search for Robin2's serial input basics thread. The thread can give you ideas.

The principles can be applied to serial communication, communication via wired network or via wifi and so on.

Serial Input Basics - simple reliable ways to receive data.

Bluetooth is really just serial-by-wireless so it should be easy to implement.

...R