Graphical interface to change the configs of an Arduino

Hello Friends,

I made this https://www.instructables.com/Space-Mouse-With-Arduino-Micro-Fully-Printable/ using the Arduino Micro Leonardo. The programming of the 3D mouse simulates the clicks and shortcuts from the Fusion 360 program. The thing is, I use other programs for 3D modeling and printing, such as Meshmixer, Solidworks, Chitubox, Cura, PrusaSlicer, and Lychee. And I would like to create a program that changes the configs of the arduino for that specific program, without the need to go into the Arduino IDE. I might add a button to the 3D mouse later to that but for now, I need help on how to do this and create the graphic interface. Tutorials, videos, and the like are very welcome.

I used a slightly different code for the 3D mouse, from this GitHub: GitHub - freeasabeer/SpaceMouse

The SpaceMouse code at Github seems alright.

The Arduino Micro has a USB HID Serial port, even if you don't use it. I think it can be called "Serial" and "SerialUSB".
You could make a program or a script that sends serial commands to the Arduino board.
Some feedback from the mouse would be nice when changing the mode. Can you add a buzzer or speaker ?

It would be fun make the settings in the Arduino board, but I think that you can do that on the computer as well.

You could have different sets of data for the controls, and select one of those sets with a serial command.
You could send a command that defines the buttons and the behavior for everything. Then you can do anything with a single sketch.

The sketch has to be turned upside down. Do you think you can do that or do you want too much ?

By the way, there is a lot that can be done with a single button. Long press, short press, double press, in combination with other buttons, and so on. I made a sketch once to see how far I could stretch it, but that went too far : Too_Much_For_One_Button.ino

Where do you want the GUI to reside, on the Leonardo or a mobile or PC?

Koepel:
The SpaceMouse code at Github seems alright.

The Arduino Micro has a USB HID Serial port, even if you don't use it. I think it can be called "Serial" and "SerialUSB".
You could make a program or a script that sends serial commands to the Arduino board.
Some feedback from the mouse would be nice when changing the mode. Can you add a buzzer or speaker ?

It would be fun make the settings in the Arduino board, but I think that you can do that on the computer as well.

You could have different sets of data for the controls, and select one of those sets with a serial command.
You could send a command that defines the buttons and the behavior for everything. Then you can do anything with a single sketch.

The sketch has to be turned upside down. Do you think you can do that or do you want too much ?

By the way, there is a lot that can be done with a single button. Long press, short press, double press, in combination with other buttons, and so on. I made a sketch once to see how far I could stretch it, but that went too far : Too_Much_For_One_Button.ino

I think a LED would be more pleasant than a buzzer or speaker.
What do you mean by turned upside down? Do you have examples?
I'll try adding the press variants on the coding! Thanks a lot for the contributions.

DrDiettrich:
Where do you want the GUI to reside, on the Leonardo or a mobile or PC?

For now, the GUI is better suited to be hosted on a PC. There is a more elaborate version of the 3D mouse with a screen and so on, but I want to focus solely on the 3D mouse for now.

O no, my Too_Much_For_One_Button.ino is a joke. This library uses the Bounce2 library for debouncing and is a serious library: GitHub - fasteddy516/ButtonEvents: An Arduino library for catching tap, double-tap and press-and-hold events for buttons.

With turning your sketch upside down, I meant that you need to add and rewrite a major part of the sketch.

Do you have experience to make a small program for Windows 10 ?
It seems to be possible to add a GUI to PowerShell script.
If you ask what a simple GUI is, then everyone has his/her own favorite: performance - What is the quickest path to writing a lightweight GUI program on Windows? - Stack Overflow.

P.S.: You don't have to quote my post. What I wrote is already there :wink:

I have not the experience, but the goal is to learn how to use it and create the interface. I'll follow the instructions given and try my best here, and i'll send the results.

Sorry for the quote!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.