Archive for the Arduino Category


Posted in Arduino, IOT, MQTT, Networking, Wifi on July 20, 2017 by asteriondaedalus

So, following up after a previous promise I got myself a cheap arduino touch screen that was on sale, to act as a Programmable Entry Panel or PEP.

I will use the Wemos D1 and the Arduino core fore same to try to port the associated library onto Wemos D1. That way I can have a control panel via MQTT.

Yes, there wiĺl be a Android version as my wife got herself a Samsung – though so hates it.

Saves me the hassle of working in iOS.

Woof woof woof

Posted in Arduino, MQTT, Sensing on June 18, 2017 by asteriondaedalus

A neighbor complained that the dogs were barking all day.

Likely cause all the renovation work going on (late into the night as well).

I looked around for software so I could detect the barking and potentially turn sprinklers on for a minute – to distract them.

Options are also a buzzer, so they associate the buzzer with the sprinkler coming on.  Then later the sprinkler needn’t come on.

HE is funny.  Not liking to wet he has an aversion to the solar powered, IR triggered, sprinkler I use to at least keep them away from the side of the house.

The psychology is funny though, they stop short of going down the side of the house and bark anyway.

Much of the software is really noddy.  Level sensing.  So I looked for microphones and downloaded python scripts etc.  The software would also send you an email if the dogs barked.

Still, the problem running on the PC was obvious.  The problems setting up a microphone on a C.H.I.P. or Orange Pi were not insurmountable BUT still was that over kill.

My time in signal processing get get me excited about using correlations to discern dogs barking from loud noises but there are other tricks there.  The load noise would be of a fixed duration that repeated.  So, a window with say four loud noises could count as barking in a backyard otherwise quiet.

The thought of the signal processing didn’t daunt me, but the turn around time to get something running did.  So, the plan is a super duper system later, at the moment I just want to monitor their behaviour and sort something out that might curb it.

So I thought I would go with a arduino compatible microphone/sound sensor instead.  An ESP-01 would do it as the sensor has a tuneable level sensor and raises as signal if the level is at or over that set.

However, it also puts out an analogue signal, from the mic, so a WeMOS mini would be better since it has the ADC input.


The sound sensor takes 5v, as does one of the pins on the D1 mini.    This way I can pump out noise events by the level sensor early using mqtt.   And later, I can pump analogue samples out by wifi.

I am already using node-red to send emails from the OPiZ so I can pump out hourly “woof” stats.   This setup is also cheap enough to set a couple up so that different parts of the yard (and thereby irrigation sectors) can play their part.

I have a suspicion neighbors are not helping and banging the fence.  So I am looking for a vibration sensor to get stats on that as well.

Okay, so I have changed my mind …

Posted in Arduino, ESP8266, Open Source can be professional on June 17, 2017 by asteriondaedalus

… it was fun for a while but …

So, dabbling in Lua on the ESP8266 was interesting.

The event driven stuff is clever.

However, the whole thing stinks because you cannot use the REPL cycle to take advantage of the scripting environment and the superior debugging opportunity that affords.

Especially around the niggly aspects of event processing and state problems inherent therein.

So, now the Arduino has the ESP8266, but especially since it now has a mqtt library, and mostly because we are only reading GPIO ports or setting bits on/off, I relent.

If you want to knock up a simple IoT gadget quickly, then Arduino plus ESP8266 are gold.

Here’s the theory …

Posted in Arduino, Beaglebone Black, C.H.I.P., General niff naff and trivia on April 29, 2017 by asteriondaedalus

… straight forward really.

MOOS-IVP happily compiles and runs on on of my Beaglebone Blacks.


Sooooo, no stretch (pardon the pun) for MOOS-IVP to fit onto a C.H.I.P.!


Both are 1GHz processors with 512M of memory.

The standard approach, in any event, is run MOOS-IVP on the linux board and have an arduino interfacing with the hardware.

Of course, I am running against the AIO:

You could just as easily run against a raft of other boards, such as:

Or even a Parallax Propeller board!

That would all depend on what you are offloading to the hardware layer.

Arduino Killer!

Posted in Arduino, ESP8266 on February 20, 2016 by asteriondaedalus

And voila!

arduino killer

ESP8266 based. Uno form factor.  $6!!

Now along with something like this for $4 …

relay shield

You can have an OpenSprinkler killer for $10 instead of $155!!!

Still my old BlackWidow is fine for my home use but I have a backlog of family and friends wanting a wireless sprinkler controller.  Just takes a pickoff of the 12volt AC used to drive the sprinkler valves to create the voltages for the board.  A rectifier and few capacitors into a voltage regulator et cetera.

Goodbuy OpenSprinkler *sniff* so sad to see you go.


Posted in Arduino, Wifi on May 17, 2015 by asteriondaedalus

Niggly problems when setting up the Blackwidow to talk to home wifi router but, go figure, I wasn’t paying attention. When setting ssid[] and security_passphrase[] arrays one need use you local ssid and passphrase for your router as opposed to the ssid set in the code example AND remember to set “security_type = 3” for WPA2 – obviously had a newbie moment 😉 The other curl ball thrown is that the board seems to take a couple minutes to connect to the router (into which does not appear to turn up on any site I have perused).  I thought it had not worked but McAfee piped up (after a few minutes) and warned “” had connected to network (which was the static IP address I gave the Blackwidow).  Once Blackwidow is connected to router it appears more reactive. Next step to integrate in the Arduino mqtt library.  4 relay shield on order from China ($6) and I have already cracked open the current watering controller to look at swapping out the signals to the new board.  They are only 12volt signals with a common to all watering solenoids – too easy drill sergeant!


Go figure, some work to port MQTT library as it uses Ethernet library (or Wifi library) not compatible in first instance with WiShield library for BlackWidow.  However, I do note deep in the Client class used in the MQTT client we have buffer marshalling for sending on sockets.  Problem is the BlackWidow examples are using UDP.

One interesting discovery however was the way BlackWidow example built the UDP example it was not intuitive but it clicked they are using virtual methods in the library for user to define.  More than that it introduced be to PT_THREADS for Arduino.  A neat way to do limited threads on Arduino.

I may dabble a little with a MQTT port I can simply stick with HTTP or UDP examples (we are only talking about toggling 4 relays after all).  OpenHAB can work with HTTP or UDP (as well as MQTT) so no show stoppers.

PT_THREADS are, however, interesting.

In hind sight

Posted in Arduino, Nostalgia, Wifi on May 15, 2015 by asteriondaedalus

Looking at it realistically, OpenSprinkler hardware is likely a no-go for me.   Why?

When I looked at it rationally, I have the skills and the technology and I have also lamented the “maker” mentality before (buying things and plugging them together rather than designing and constructing).

Besides the $80 for the OpenSprinkler hardware is about what I paid for the Blackwidow board, a few years ago now.  I used the Blackwidow on a now decommissioned project – so it is sitting there wanting to be used.


Use me !


Why waste it?

Besides a four relay shield is in the order of $6 instead of $80.  I have found a mqtt library for Arduino so will need to integrate that with the wifi (rather than ethernet) library etc.

I might even be able to mod the OpenSprinkler software to control relays via mqtt, instead of driving GPIO pins directly.

Yes, one could go NodeMCU and a $4 four relay board and get a controller under $20, and I will for extensions to the irrigation system.  I just need to get the Blackwidow out of the parts draw doing something useful.