Go Down

Topic: Update sketch without IDE? (Read 602 times) previous topic - next topic


Im preparing to build a project that needs to operate with a pc but is autonomous in its operations so if the PC crashes it can handle it self gracefully.

It involves PWM curves based on external sensors for light control. Originally I had the pc handling the math, taking in the sensor readings, making decisions based on those readings  and then sending out text strings to interactively control PWM changes, using the Arduino as an extension of the pc, but if the pc crashed or froze so did the unit.

In my new design I want to only use the pc to update the program/light cues and then the Arduino goes on its merry way, although it will continue to send serial updates back to the computer for status. all sensor and control is autonomous in the Arduino, as it should be.

The problem I am facing is this is to be used by end users, so the program front end I am writing for the choreography of the light cues is artist friendly but I dont want to make them also be Arduino tech savy and do raw sketch IDE interaction.

In other words I want to write a program that creates a sketch with the end user just choosing things like red light, set it to fade %60 over X seconds  if you see sensor x get input and so on.

Then once the sketch is generated, (no coding by the end user) I want them to be able to push a software button that says Commit Cues to Controller and it uploads the new sketch resets and runs, with out the extra step of having them use the regular Arduino IDE and sketch loading process.

Any program/hardware stubs, code snippets supporting circuits or ideas along these lines ?

The whole goal is that the end user doesn't really interact with the Arduino directly as we do, but as a controller extension.

Does any of this make sense?

Thanks in advance for any ideas or help.



The general goal makes sense. If I understand correctly, you want to create some kind of lighting scene or profile on a PC and upload it to an Arduino.

There are a few ways to do this, one of which is to have a PC app that can write a sketch. However, I think an easier way to do it is to write the parameters of the profile into EEPROM, and have a generic sketch that reads it and acts accordingly. The EPROM will be retained even when power is taken from teh Arduino, so it can be used over and over.

Another approach is to use an Arduino and an SD shield, and write the information to an SD card. Plug the SD card into the Arduino and it will read the profile from there. You can also write data to the SD card.

Is this along the lines of what you were thinking?


Right ballpark. I had thought of the sd card but ruled it out because I wanted to keep it simple, dint want hem switching cards or anything, EEPROM is likely the route I will go as essentially that is the position the PC was in the previous project, the arduino sensor sent numbers through serial to the pc the pc did the curve math and fed it back over serial to a generic script that just plugged in them in and changed the output pwm.

So essentially what I need then is a way to write an eeprom from the computer and then the arduino just looks there for the info there if I understand you right. 

That sounds right, but is it easy to write to an eeprom in a circuit, from within a standalone program? Im new to that vein, got the controller, sensor  interface stuff down, feeling my way for more.

Go Up