Archive for November, 2013

Sensor network

Posted: November 4, 2013 in IOT

After partial success with 433MHz transmitters and a custom Manchester encoded library, I’ve decided to switch to using NRF24L01+ modules.

These are 2.4GHz, which in theory have a more limited indoor range. My testing so far shows I can reach from the study to the far end of the garden, which is though 3 walls.

So, I’m going to build a number of sensors using Arduino Pro Mini boards, with a Raspberry pi to connect to the network.

The RF24 modules are much easier to use, and can connect directly to the rpi (no need for accurate timing as with the Manchester endoding).

The disadvantage is the number of pins required to connect : 4 SPI, + CSN + IRQ (optional)

This rules out the ATTiny85 (unless I multiplex the pins and/or don’t connect any external sensors)

But the Arduino Pro mini boards are now very cheap.

Cost of pro mini + RF24 is less than 10AUD


Posted: November 4, 2013 in IOT, Linux

Building LIRC for DP USB IR Toy


How I built LIRC with USB IR Toy support

matt@desktop:~$ git clone git://
Cloning into 'lirc'...
remote: Counting objects: 13436, done.
remote: Compressing objects: 100% (3474/3474), done.
remote: Total 13436 (delta 10403), reused 12735 (delta 9826)
Receiving objects: 100% (13436/13436), 2.60 MiB | 534 KiB/s, done.
Resolving deltas: 100% (10403/10403), done.
matt@desktop:~$ cd lirc
matt@desktop:~/lirc$ wget
--2013-09-13 21:07:57--
Resolving (, 2a01:1e8:e100:27c::2
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19871 (19K) [text/plain]
Saving to: 'lirc-0.9.0-usb_irtoy.patch'
100%[==================================================>] 19,871 58.8K/s in 0.3s
2013-09-13 21:07:58 (58.8 KB/s) - 'lirc-0.9.0-usb_irtoy.patch' saved [19871/19871]
matt@desktop:~/lirc$ patch -p1 < lirc-0.9.0-usb_irtoy.patch
patching file
Hunk #2 succeeded at 446 (offset -1 lines).
Hunk #3 succeeded at 680 (offset -1 lines).
Hunk #4 succeeded at 1394 (offset -1 lines).
patching file daemons/hw-types.c
patching file daemons/hw_usbirtoy.c
patching file
patching file
matt@desktop:~/lirc$ ./
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in installing `./compile' installing `./missing'
daemons/ installing `./depcomp' installing `./INSTALL'
Creating ...
matt@desktop:~/lirc$ ./configure --with-driver=usb_irtoy --without-x --with-tty=/dev/usbirtoy
matt@desktop:~/lirc$ ./configure --with-driver=usb_irtoy --without-x --with-tty=/dev/usbirtoy
checking for a BSD-compatible install... /usr/bin/install -c
. config.status: executing libtool commands
Your hardware does not require a special LIRC kernel module.
You will have to use the suitable kernel driver to access /dev/usbirtoy.
Now enter 'make' and 'make install' to compile and install the package.
matt@desktop:~/lirc$ make
matt@desktop:~/lirc$ sudo make install
matt@desktop:~$ cat /etc/udev/rules.d/60-usb_irtoy.rules
SUBSYSTEM=="tty",KERNEL=="ttyACM*",ATTRS{manufacturer}=="Dangerous Prototypes", ATTRS{product}=="CDC Test", ATTRS{serial}=="00000001",SYMLINK+="usbirtoy"