0

January 27, 2017 AT 12:13 pm

Wireless Remote Sensing with Wemos D1 Mini, Arduino IDE, Raspberry Pi and Lighttpd Web Server #piday #raspberrypi @Raspberry_Pi

via RasPi.Tv

For a long time now I’ve wanted wireless temperature sensors scattered around the house and garden reporting their temperatures regularly to a central server. It’s not something I really need, but something nice to have. I’d originally planned to do it with a RasPiO Duino or Arduino nano and inexpensive NRF24L01 radio boards. Albert @winkleink Hickey, a friend of mine, who also runs the Egham Jam put me onto these when he did his buttonflash game. Albert has a useful hobby of trawling ebay for bargain-basement electronics. A few weeks ago he showed me the Wemos D1 mini.

I have multiple Wemos D1 minis. Each one has a TMP-36 sensor being read by the analog port. Every minute, each Wemos reads its sensor and reports the value, via WiFi to a Raspberry Pi on the local network.

The Raspberry Pi is running a lighttpd web server and php5. A short php script is used (a first for me) to log the data from the incoming http “GET” commands from each of the Wemos boards.

That takes care of the data logging. I wanted to be able to view the current data on a web page, so I wrote a short Python script to generate an html page from the most recent data. This script is run every minute using a cron job on the Pi. If I knew php, it could probably be done dynamically using php. But I don’t, so meh!

So the outcome is that, every minute, each sensor sends in its new data, which is logged, a new html file is created and I can always view data in my browser which is never more than a couple of minutes old.

Read more


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!


Maker Business — SoftBank Invests $300 Million in WeWork

Wearables — Impatience reward

Electronics — Cool your FETs!

Biohacking — NinjaPCR – Open Source #iot DNA Amplifier

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.