Posts Tagged ‘COSM’

I had a little time to play around this weekend so I got out some toys I’ve been meaning to play with and got a few things up and running. My EVE board has been lying around collecting dust so I assembled the RFM12B and the Ciseco SRF modules along with a TMP100 on board temperature sensor. The EVE board has 2 locations where the SRF module can be fitted but I put it on the 868MHz location as that’s the frequency I am using. The PCB is routed such that the Pi can communicate with it via SPI on SS0 but it also has pads for the serial connection which is a blessing as the firmware that the module is shipped with uses serial and not SPI. Although you can OTA program these devices since I don’t have any radio modules that can easily connect to a PC I just hooked up an FTDI adapter to the serial port and programmed them using their XCM tool. The firmware image can be found here.

RFu328

I also have one of their Arduino compatible boards with a footprint for the same SFR module on the Pi so I programmed that up with the RFu328 code (I used the beta firmware) and put a small sketch on there which periodically reads the temperature and humidity values from a DHT22 sensor and sends them out to anyone listening. The protocol used to send these packets is LLAP which is really basic but gets the job done. CRC and other such things are handled in hardware so that is not required in the protocol. After that it was easy enough write a python script on the Raspberry Pi to read the values and for now just posts them to COSM.

Next phase I’m going to set up some web sockets and have a play around with some HTML5. All in all it was a fun little weekend project and I am most happy with how far it’s come.

I would also like to change this so that the sensors do no just present the data but rather are polled. While I’m at it I’d also like to build in standard inputs and outputs so I don’t have to change the code if I want to add a few basics later.

Advertisements