Monthly Archives: January 2015

Heathack code on Github

I’ve uploaded my code to Github so that we can share it and have a common code base for the JeeNodes and Raspberry Pis.

The page is here: and the easiest way to get a copy is to use the Download ZIP button in the bottom right.

Ideally though you’ll use git to manage it so you can easily download updates and also push up your own changes. If you have git installed then the command:

git clone

will create a folder called heathack.

Unfortunately the Arduino IDE doesn’t allow you to have multiple workspaces, so you’ll need to change the sketch file location to point at the heathack/arduino folder.

The sketches in the arduino folder are:


Intended for installing on a JeeLink for receiving broadcasts from the sensor nodes and writing the readings to the connected PC’s serial port. A standard JeeNode with no sensors and the BUB serial interface will work just as well.


The code for putting on a standard JeeNode to read attached sensors and transmit the readings. There are #defines at the top that need editing to set a unique node id for the JeeNode (the receiver is 1, so 2 to 30 are available). There’s also #defines to comment/uncomment depending on the attached sensors. The expected layout is DHT11/22 on port 1, Dallas DS18Bs (max 3 devices) on port 4 and the room node board across ports 2 and 3.


Simplified version for the JeeNode Micro.


A test sketch for the Micro that just sends a battery level reading.


The code for the LED light demonstrated at the launch day.


A sketch to test taking sensors readings asynchronously so that the processor can continue with other jobs while waiting for the reading, instead of pausing. LedStripViz needs to use this technique so it can update the LED animation every 30th second.

tonight, 7:30

We’ll check in with how people are doing with the various bits and pieces they’re trying – everything from a first go with a Pi to our first assembled Jeenode Micro – but there are also a bunch of things to discuss.

What do we want to offer to show at the Mini-Maker Faire?

Of all the ways we’ve tried wiring the sensor location boxes, what’s good, what’s bad, and what do we want to do with the new Jeenodes we have coming?

How can we minimize the weight of a sensor location for six or so balloon clusters on Shrove Tuesday – what’s our best power option?

We can get a virtual machine and start hosting our own web service and code repository – are we ready for that?

What kind of extra non-Tuesday night meet-ups do we think would be useful, and what the time/skill bottlenecks we should be looking to spend our way out of?

It all sounds pretty formal written out like that, but it should be fun – see you there (City of Edinburgh Methodist, down in the basement)!


Adding a JeeNode reset button

The JeeNode v6 is the more common version of a JeeNode – it’s the cheapest of the 4-port variants and assembling it yourself gives you an appreciation for how it functions. Unfortunately it is lacking the reset button which the SMD, USB and Micro JeeNodes have. A reset button is very useful for restarting the program on the node, for example to get it to send a data packet immediately rather than waiting for the next trigger point which might be a minute or more away.

The v6 board has an 8-pin header near the serial connection end of the board. Although only the middle 6 pins are labelled on the top of the board, turning it over you can see that the one at the side nearest the battery connector is labelled ‘RST’. To trigger a reset you simply need to momentarily connect RST to ground. Helpfully there is a ground connection available close by on the negative terminal of the battery connector (labelled ‘-‘).


These two connections are just close enough together to connect a push button across them. Pressing the button will connect reset to ground and restart the microcontroller.

I used a mini push button as I that’s what I had available. The button has 4 legs but they operate in pairs – pressing the switch connects the pair on one side to the pair on the other. I prepared the button by bending one pair of legs in toward each other so that they can go through the RST hole from opposite sides, and removing one leg from the other pair because there won’t be anywhere to solder it to.


With the button held against the side of the board with a bit of blu-tac(!) and the inward-bent legs pushed through the RST hole, I soldered them in place.

Next I placed a short piece of wire across the gap from the other button leg to the battery negative pin and soldered that at both ends.

_MG_2060 _MG_2061

… and there you go! One very useful reset button that fits neatly onto the JeeNode. Even though only 3 of the 4 legs are attached, the button still feels nice and stable.


I’m now wondering whether this smaller right-angle button might fit even better and not extend over the side of the board.


last night…

… there was some serious multitasking going on!

We created more stable connections for the Methodist organ monitor – still to be moved upstairs, but all ready to go now – and packed up the black globe to transfer to Christ Church Morningside next week after giving it a bit more black.  They sometimes have cold walls and warm air – a much better combination for testing than the Methodists, whose heating is on most of the time.

We also figured out why our SD card cloning hasn’t worked – cards from different manufacturers are very slightly different, and that means dd is too crude a technique.

And we exchanged lots of tips with each other, with kit in progress for St Marys Episcopal, and at least a glimmer in the eye for St Columba’s and some rental accommodation that, reading between the lines, might possibly benefit from evidence that it’s a wee bit damp.  I think we even sent everyone home with the right bits and pieces, except Iain’s not going get to far with the Ciseco kit and no Pi, but I think that’s the one I packed up just before we all departed into the snow!  We’ll have to rectify that soon.

While we pass on what we’ve learned so far to our newest hackers, Tim’s assembling a Jeenode Micro so we can see whether that’s too hard to use, and we’re about to start working harder on figuring out everything to do with helium for Shrove Tuesday.  Two hours a fortnight is short – watch for us to declare more times when we’re “in residence” and the space is available for hacking.

January’s meet-ups

In the pre-Christmas rush, we accidentally forgot to confirm our dates for January.  Yes, we will be at City of Edinburgh Methodist Church on 2nd and 4th Tuesday nights from 7:30 – that’s the 13th and 27th.  I’m also thinking about just declaring myself in residence there some times during the weeks, because it’s a long time between, once the current work crunch is over.  We do expect to continue the Tuesdays through February as well.  We’ll declare officially after the next Tuesday night.

shopping list

This week, HeatHack is composing a shopping list, in preparation for the Shrove Tuesday Balloon Trials and the Easter Vigil – an attempt to get readings (live to the web or otherwise) from as many Edinburgh churches as we can manage, all at the same time, just so we have the same baseline for comparing notes.

So far, my wishlist is:

  • a crimp pin tool, housings in some useful configurations, and crimp pins.  I think that’s probably a good way of making stable connections quickly.  Failing that, some idea of what to call the parts for soldered connections we’ve tried and liked before!  They’re really hard to find on supplier websites, and short of taking examples in to Maplin, I’m not sure I’ll get them!
  • more standard Jeenodes.  They work, are pretty tolerant of abuse, and we have the luxury of being able to pay someone to assemble them. We may even be able to buy them assembled, if the rules happen to count them as consumables (which I must check soon).  We haven’t had a chance to assemble the Jeenode Micros yet, much less try them, which suggest we need the lower skill version just so we don’t get bogged down.

I’ve ordered an SD card reader for Arduino as a sample because that and an Adafruit Trinket might be a good way to build extra simple loggers, but we have enough Pis and temperature sensors that we can just use them, assuming there’s a power socket.   Anyway, the cheap source takes a long time to come.

Get your suggestions in…