The Artima Developer Community
Sponsored Link

Python Buzz Forum
Weather

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Aaron Brady

Posts: 576
Nickname: insommeuk
Registered: Aug, 2003

Aaron Brady is lead developer for Crestsource
Weather Posted: Nov 6, 2016 9:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Aaron Brady.
Original Post: Weather
Feed Title: insom.me.uk
Feed URL: http://feeds2.feedburner.com/insommeuk
Feed Description: Posts related to using Python. Some tricks and tips, observations, hacks, and the Brand New Things.
Latest Python Buzz Posts
Latest Python Buzz Posts by Aaron Brady
Latest Posts From insom.me.uk

Advertisement

Just a quickie project, mostly consisting of smushing Adafruit modules and eBay modules together in hardware, and a few choice libraries in software.

I’ve moved to Canada and I have a garage with mains power. I’ve never been through this kind of winter before, so I thought it would be interesting to log the inside and outside temperature and outside barometric pressure.

While there is power, there’s no connectivity in the garage, so I’m following in the footsteps of some of my friends back in England, and using a pair of Nordic nRF24 modules to establish a reliable radio link.

The source code to the whole thing is on GitHub, and it depends on the RF24 and Adafruit Sensor libraries.

I tested my set up by starting with low power amplifier settings on the radios and using an example sketch provided with the library. It might seem like setting power to the maximum is the best, but that also puts the most load on your 3.3V voltage regulator, and some Arduinos and clones don’t deal well with that.

Luckily, I was able to verify that mine does, and use that. I also only transmit at 250Kbps, which results in acceptable performance at higher ranges.

Sensor Node

Arduino PinBMP180 PinnRF2401+ Pin
GNDGNDGND
VCCVCC-
3.3-VCC
7-CE
8-CSN
11-MOSI
12-MISO
13-SCK
A4SDA-
A5SCL-

Receiver Node

Arduino PinnRF2401+ Pin
GNDGND
3.3VCC
7CE
8CSN
11MOSI
12MISO
13SCK

Reading the Output

As long as the Receiver node can pick up the signal from the Sensor node, you’ll get regular data output over the USB serial:

picocom --baud 9600 /dev/ttyUSB0
...
OHAI
P1022.41T4.30

That’s 1022.41 hPa and 4.30C outside.

Because I have a local Graphite install, I can just send metrics to 127.0.0.1:2003 with a tiny Ruby script, which parses the serial output and spits Carbon formatted data over TCP to my Graphite install.

Pictures and/or graphs to follow!

Read: Weather

Topic: Void Linux CDC Ethernet on the Raspberry Pi Zero Previous Topic   Next Topic Topic: Things you learn working at a startup

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use