0

I've built a very simple WiFi thermometer out of an Adafruit ESP8266 HUZZAH breakout board and a TMP36 temperature sensor. I have it reporting the temperature over wifi to my computer which will be storing the data in a database for monitoring purposes. I'd like to make multiple of these devices and place them around the house. My question: I currently have the location of the board as a const char* on the board itself. Doing this for multiple devices is just a bad idea and a nightmare to manage. Is there some way of setting a location variable on the board that will persist across shutdowns? Or am I coming at the problem from completely the wrong direction?

asked Jun 24, 2016 at 19:09
2
  • Why not just use the (unique) IP address of each module to identify it and map that to a name on the PC? Commented Jun 24, 2016 at 19:16
  • I was thinking that would solve the issue, but I'd rather have the resolution contained within this system rather than relying on configuring my router as well. Commented Jun 24, 2016 at 20:26

1 Answer 1

1

With a set of DIP switches or jumpers on some of the GPIO, you could encode a unique number for each one - 16 of them with 4 I/Os f/ex. The same code could run on all of them, sample the unique ID report it along with the temperature. Let the PC-side map IDs to locations.

answered Jun 24, 2016 at 19:27
5
  • I like this. Your answer gave me an idea though. I can get a MAC address from the breakout board. Would the MAC ever change? If not, I could send the MAC of the board along with the other data and do some server side mapping with the MAC. Commented Jun 24, 2016 at 20:25
  • I don't know how the Lua firmware works, but the AT+ interpreter firmware includes commands to set the chip's MAC address, so, yes, it can be changed, but that's a change you would have to make, not one that I could ever imagine would be programmed to happen without you taking explicit action. Commented Jun 24, 2016 at 21:59
  • The MAC address comes from the ESP8266 chip, not from the breakout board Commented Jun 26, 2016 at 23:55
  • @JaromandaX: Yes, that's correct. And ? Commented Jun 27, 2016 at 11:34
  • Just clearing up @Taelsin's misconception that the breakout board has something to do with the MAC address, if that's OK with you Commented Jun 27, 2016 at 12:05

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.