I need a way to send someone a sketch that will upload itself onto there arduino without giving them an option to open or edit it. I've been reading about making a .exe but that seems to be over my head for now. As always, I'm not looking to have someone write this for me. Just point me in the right direction or what options I might have to persue a solution. Thanks for all the help forum!
You could send them the compiled and linked executable image, and instructions to upload it from a command prompt. I suppose you could send them a batch file to execute the upload if you wanted to make it easier for them.
It's not as simple and straight forward as you might think or wish. And of course the users would have to first have the proper arduino USB driver installed to recognize their board when plugged in. And not every user will have the same com port number assigned to their arduino board. And if users have different arduino board types (say Uno Vs Mega) you will have to be sure you send each user the proper unique .hex file.
Many posters here have asked for a method like this and usually are told they will have to find and send the .hex file of the compiled sketch and have the users install the arduino IDE so they will have a copy of AVRDUDE and it's support files and some kind of batch file to run make scripts, etc. At least that is how I recall all the messy details.
I don't recall ever seeing a complete procedure here listed out step by step and I don't even know if the same exact procedure would be identical for all possible PC OS systems, Windows, Apple, and Linux.
Good luck;
Lefty
The triggertrap company which sells a shutter release system based on the Arduino has recently updated their firmware, and they have a system that doesn't need the Arduino stuff loaded on the target computer. https://triggertrap.com/easily-update-your-triggertrap-firmware/
For Linux they recommend Cowascript, which was posted to these forums in April (you do need to install avrdude): Arduino Forum.
MichaelMeissner:
The triggertrap company which sells a shutter release system based on the Arduino has recently updated their firmware, and they have a system that doesn't need the Arduino stuff loaded on the target computer. https://triggertrap.com/easily-update-your-triggertrap-firmware/For Linux they recommend Cowascript, which was posted to these forums in April (you do need to install avrdude): Arduino Forum.
Reading the user's comments on that linked page, it doesn't sound like it was as easy and effective as one might hope, or perhaps that was just early bugs and/or users not able to follow instructions well?
Lefty
retrolefty:
It's not as simple and straight forward as you might think or wish. And of course the users would have to first have the proper arduino USB driver installed to recognize their board when plugged in. And not every user will have the same com port number assigned to their arduino board. And if users have different arduino board types (say Uno Vs Mega) you will have to be sure you send each user the proper unique .hex file.
They will all have the same arduino model. And setting a com port is farily simple to walk someone through. I was reading a small amount on using the AVRDUDE and your right about not having a perfected guideline. Now the issue you brought up about the OS is a new thought for me. And your quite right... I wonder if there is a way to auto load a sketch from USB.
If I add a USB port to the arduino could I set the current sketch to overwrite itself with the sketch on the USB stick? Thats just a shot in the dark but you guys are getting the gears running in my head. Any other ideas?
Only one person one sketch update? Flash it into a new chip and send them the new chip
FOUND IT!!!! Can't wait to get into beta.
http://codebender.cc/
Amazing.
retrolefty:
usually are told they will have to find and send the .hex file of the compiled sketch and have the users install the arduino IDE so they will have a copy of AVRDUDE and it's support files and some kind of batch file to run make scripts, etc. At least that is how I recall all the messy details.
I think all the ingredients are there to enable a script to install the USB drivers and then install/run a standalone avrdude. It could be invoked either as a manual batch file, or an autorun batch file, or an executable installer. But it's not an easy job.