Soil Moisture & Rain Sensors

Next on the new sensors to play with list is a soil moisture sensor and the similar rain sensor, both use the same LM393 opamp comparator board. The pinout is: AO - A7 DO - D2 VCC - 3.3v GND - GND The digital output basically gives a 0/1 based on if the moisture/rainfall has reached a certain level (adjusted with the trimpot). My code is: const int aPin = A7; const int dPin = 2; int moisture = 0; bool isRaining = false; void setup() { Serial.

BH1750 Light Sensor

I’ve recently bought a few sensor modules for my planned revamp of my RF24 network. I also found this website which seems to be a guy who has been playing with many of the same sensors! First off we have the BH1750FVI light intensity sensor. I connected to a Nano like so: BH1750 - Nano3: VCC - 3.3v GND - GND SCL - SCL (a5) SDA - SDA (a4) ADD - Not connected The ebay listing says 3-5v power, and I must say I connected it to 5v just fine, but better go with 3.

RF24Mesh Sensor Nodes

I’m going to get back into making Arduino sensors for the house/garden. I’m going to use the RF24Mesh library this time instead of just RF24Network so that the sensors can forward packets along from each other, hopefully meaning that I can use the smallest radio modules instead of the PA+LNA variants which suck a lot more current e.g. 45-115mA instead of 15mA. I plan on using a bunch of 3.3v Sparkfun Pro Mini boards with the regulator/LED removed, and fed a clean 3.

Vagrant & Ansible

I’ve been getting back into Vagrant and Ansible lately, as I decided I needed a platform to do some Continuous Integration testing of Arduino and packaging of arduino-mk; and also building Kodi on a faster platform than my Atom HTPC. As luck would have it, the Debian package for Ansible 1.9.2 just hit Sid, so I don’t have to build my own from git with “make deb”, which is a bit Ubuntu-centric and doesn’t work too well on Debian.

7 Segment Display Countdown

Over the weekend I made a 4 digit 7 segment display countdown timer. The display driver is the SevSeg library, which I just grabbed for ease of use, on the Raspberry Pi I’ve previously just written the driver myself by mapping letters/numbers to an array of segments with HIGH/LOW states (Youtube link) but that was only a single digit display. I don’t call the delay() function at all in the code, instead it uses timers and millis() so the button presses are instantly detected and the digits redraw quicker so the countdown happens in realtime – tested with a stopwatch.