jmalins / BattleBot-Control

Cardboard BattleBots control firmware for ESP8266 module
24 stars 21 forks source link

Onboard editor #15

Open JamesNewton opened 5 years ago

JamesNewton commented 5 years ago

If you save this link: https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js into the data folder (e.g. the file ace.js is added to the data folder) you can then go to the bot address/edit e.g. http://192.168.4.1/edit and actually edit files on the robot. This allows you to change all the .html and .js files.

Sadly, the ace editor will not edit .config files so you can not use that to add the wifi.config file to allow the unit to connect to the local network.

Suggestion: Instead use .txt for text config files. E.g. wifi.txt. (I've added a name.txt file which allows you to set the bots name without re-programming; with the new code, on startup the unit looks for that file and if found uses its contents as the ssid)

Suggestion, in the "Settings" section (gear) add a link to /edit.