Sparkfun Thing hosting a web form and driving a motor

I’d like to use the Thing to control a motor driver at a particular time of day every day. Details:

  1. Thing will be connected to a LAN as a simple client. Not in P2P mode.

  2. Thing will occasionally get the current time from a public NTP server

  3. Thing will host a simple web form that I can connect to from another client on the LAN, say my phone. From this other client, I’d like to submit the time/day that I’d like the Thing to rotate the motor, so I’m envisioning a simple form with a few textboxes and a submit button that the Thing presents to my phone, and which my phone uses to send data to the Thing.

  4. The thing will store the data it’s given either in a local nonvolatile storage (unclear to me whether this exists), or store it on the web somewhere and retrieve it when it needs it.

  5. To control the motor driver I need a minimum of 3 GPIOs (which should be available already, I believe)

  6. Lastly, to keep things simple, I’d like to use Sparkfun’s Arduino library and program it as I would an Arduino. I’d really prefer not to have to flash custom firmware.

The reasons/questions for #6 is:

  • If I install a problematic firmware, can I roll back to the default one?

  • Do different firmwares mean different methods for controlling/configuring GPIOs, I2C, etc.?

  • Just concerned this adds avoidable complexity to this project

So my questions:

  1. Any holes in my plot?

  2. Hoping someone can help with the web form/HTTP/server side of things, i.e. Step #3. Any code examples out there that do this, using the Arduino lib? Present a form to another client on the LAN, and get data back from the client.

Never mind the firmware part, I completely misunderstood what’s meant by firmware here. A few hours of google’ing later I now understand that the Arduino sketches in the Thing hookup guide are firmwares. And any other firmware can be flashed in the same way - maybe different languages or IDEs, but still just pushing some code to the device that gets run on power-on. Not a big deal.

Now that I know where’s up and where’s down, in case anyone else has similar questions in the future, this is my plan:

  1. Forget about writing my own Arduino sketch for the Thing. Going to switch directly to NodeMCU, looks very well supported. https://github.com/nodemcu/nodemcu-firmware

  2. Not going to be using the Arduino IDE to flash the code (NodeMCU), need to use the NodeMCU flasher. https://github.com/nodemcu/nodemcu-flasher

  3. Found this example for an HTTP server: runs on NodeMCU, shows a web page with some buttons, toggles a GPIO. A perfect start for my project. https://github.com/marcoskirsch/nodemcu-httpserver

  4. The HTTP server is simply a bunch of files (html and lua) that get read by NodeMCU. Can push them to the Thing for NodeMCU to read using an uploader script. https://github.com/marcoskirsch/nodemcu-httpserver