4

I'm dabbling in a project and would like to add a feature, but I need some help from the community.

My project returns a response from the wunderground api and lights an led based on the temperature in the response. I plan to enclose the circuits and use a single led on the enclosure to display the temperature. I have most of the sketch logic knocked out, but need help with sharing the project.

If I gave this project to someone, they would need to update the sketch to include their wifi name and password, as well as the zip code where they live.

Is there a way I can do this without using the arduino ide? A use case for this would be: the user plugs the arduino into their machine, the gui loads, the user would enter variables, and then the board would get flashed with the new variables.

Is this a pie in the sky proposition, or something that could be implemented?

Thanks for your input.

asked Dec 30, 2017 at 0:06
5
  • 1
    Without the IDE? Store the variables in eeprom and then flash just the eeprom maybe?? Commented Dec 30, 2017 at 0:15
  • @jsotola thanks for pointing out the typo. Do you have any suggestions or ideas on how to implement a solution? Commented Dec 30, 2017 at 3:41
  • some kind of a script that generates the necessary eeprom image file and then calls avrdude in order to transfer the image file to arduino's eeprom .... but i would go with the answer from @per1234 Commented Dec 30, 2017 at 5:23
  • what are you using for the wifi module?? Commented Dec 30, 2017 at 5:26
  • if you are using something like an ESP8266, then it is possible that you do not need the arduino at all. Commented Dec 30, 2017 at 5:41

1 Answer 1

2

The common way to do this is to build the configuration UI into your program. Then the user has no need to be messing with the firmware.

Since your device has WiFi this can easily be done by serving a configuration web page that is loaded in the browser. But how can you make a connection before the credentials for the WiFi router have been configured? The answer is for the device to serve as an access point (AP). So you connect a computer with WiFi to the device's AP, open the configuration page in the browser on that computer, and then configure the credentials as well as any other configurations you might like.

The configuration parameters are written to EEPROM so that they will be preserved.

In its most simple form there would be a specific IP address that must be opened in the browser but more user friendly is to create a captive portal so that after connecting to the AP any URL opened in the browser will load the configuration page.

Of course all this will increase the memory usage of your program and apparently you are using the Arduino Uno so this is fairly scarce to begin with. You'll need to determine whether there is enough extra memory for it.

answered Dec 30, 2017 at 3:39
1
  • I had wondered if having a configuration UI on a web page would be a possible solution. I think your answer should give me enough information to do some research. Thanks. Commented Dec 30, 2017 at 4:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.