Reprograming arduino without ide

Hello everyone. I was wondering to make a pedalboard with my arduino leonardo. I think it is easy, but I want to make it reprogramable, to make that one button presses the letter "A" for example for one game, and when I need it for anything else I reprogram it to press the combination "Shift+control+T".
I can reprogram it from the arduino IDE, but I want to make it accessible for the normal people. It would only mean to override one function.
I know how to program in Java, C# and python.

  • What I'm wondering is possible???
  • How can it be possible??

Thank you everyway.

I can't figure from your question if your Leonardo will be connected to a PC ?

If it is, you can use a PC program to compile and upload a program using the Arduino system from the command line. This Thread shows how to upload a program from the Geany editor. You could adapt the technique to other situations.

You should note that a special technique is needed to reset a Leonardo - open the serial port at 1200 baud and immediately close it again.

...R

Maybe the Arduino code could open & monitor the serial port if a button is pressed (program button) and pulls in the key sequence you want programmed to the pedal board. It could store this in EEPROM so it survives power cyles.
Your PC code would maybe prompt the user to switch the device into programming mode then send the key sequences to the Arduino; wrapped in some for of header & CRC to prevent random/corrupt data from being accepted. Then close the serial connection after restarting the Arduino.

Thank you for your ansers but I can see that you couldn't understand me. I was wondering to connect 6 buttons to the arduino leonardo, and use it's Keyboard and Mouse commands to use the buttons as macros, "joysticks"(pressing keyboard keys), etc. But I was wondering to make a program that has to be friendly to the normal people, and that program is supossed to pass the keys, macros or wathever the users wants to the arduino and when the person presses that button with his/her foot, the arduino presses the corresponding keys or mouse clicks or buttons.

cotuex:
Thank you for your ansers but I can see that you couldn’t understand me. I was wondering to connect 6 buttons to the arduino leonardo, and use it’s Keyboard and Mouse commands to use the buttons as macros, “joysticks”(pressing keyboard keys), etc. But I was wondering to make a program that has to be friendly to the normal people, and that program is supossed to pass the keys, macros or wathever the users wants to the arduino and when the person presses that button with his/her foot, the arduino presses the corresponding keys or mouse clicks or buttons.

Nope, that’s exactly what I though you wanted to do and what I have replied to.

Plug Leo in and PC sees and used it as a keyboard/mouse HID device issuing your macro’s.

  1. Press a Leo key and it reads corresponding key macro from EEPROM and sends it as keyboard sequence.
    Flick a programming switch on the Leo and it opens a serial port to accept new macro strings.
    Run your program on the PC that defines the macros and sends them to the Leo.
    The Leo reads these macros and stores them in EEPROM memory (to survive power down)
    Flick the programming switch off and Leo closes/ignores serial stuff and goes back to 1

Neither @Riva nor @cotuex has expressed the ideas sufficiently clearly for me to be able to wite a program. But you seem to understand each other so I will leave you to it.

...R

Robin2:
Neither @Riva nor @cotuex has expressed the ideas sufficiently clearly for me to be able to wite a program. But you seem to understand each other so I will leave you to it.

As I understand it the OP want to use the Leonardo as a HID keyboard that will send key sequences (macros) when a button is pressed on the Leo. Something like, you could define your name & address as one of these macros and when you press the Leo button it sends all the HID keyboard key strokes to enter the name & address into the text box of a form that has focus on the PC.
They also want to be able to change the macros in an easy fashion without resorting to altering the sketch file and compile/upload it every time so I suggested the Leo sketch can monitor the serial port and receive new macros from a simple PC program that just needs serial control.
If this does not make sense then I'm also giving up. :confused:

Riva:
If this does not make sense then I'm also giving up. :confused:

I understand what is in your mind now, and it seems reasonable. Thanks.

...R

Thank you @Riva and @Robin2. I will try to use riva's idea to make my program and thank you both for so much effort you made to help me.