Follow mercenarymind on Twitter
Room Node display
Written by jcw   
Wednesday, 17 November 2010 00:00

Authors: jcw

Now that there’s a Graphics Board, I thought I’d make a little display with the last few readings from a couple of room nodes around here. Ironically, it’s just a 8×21 character text display for now – no graphics in sight:

Dsc 2281

The information consists of:

  • a packet sequence number (only 4-byte packets are treated as room nodes)
  • the node ID
  • the temperature in °C
  • the relative humidity in %
  • the measured light intensity (0..255)

New readings get added at th bottom, with older readings scrolling upwards.

Unfortunately, the ST7565 library doesn’t have a normal print() & println() API, so the first thing I did was to create a new wrapper class:

Room Node display

One quirk about this code is that since we’re using a RAM buffer, the ST7565 screen contents needs to be explicitly updated. I solved it by adding a poll() method which you need to call in the main loop. It’ll make sure that the display gets refreshed shortly after anything new has been “printed” (default is within 0.1 s).

Another thing this class does is to scroll the contents of the display one line up when the bottom is reached. It does this in a slightly lazy manner, i.e. the display is not scrolled immediately when a newline is sent to it but when the first character on the next line falls outside the display area – a subtle but important difference, because it lets you use println() calls and the display won’t constantly leave an empty line at the bottom.

Scroll support does require one change to the “ST7565.cpp” source code. This:

    static byte gLCDbuf[1024];

Has to be changed as follows, to make the RAM buffer accessible from other source files:

    byte gLCDbuf[1024];

(should be around line 42 in ST7565.cpp)

With that out of the way, here’s the glcdNode.pde sketch, which has been added to the RF12 library:

Room Node display

For debugging purposes, the same information shown on the display is also sent to the serial port:

Room Node display

Note that gldeNode is hard-coded to receive packets from net group 5 @ 868 MHz, as you can see in the call to rf12_initialize().

So now I have a battery-powered wireless gadget which lets me track what our house is trying to tell us!

Read more:

Last Updated on Wednesday, 17 November 2010 14:31
MakerBot Hero: Car Keys (Part I)
Written by MakerBlock   
Tuesday, 16 November 2010 13:00

Authors: MakerBlock

Key fob, apart

Key fob, apart

My mom had been a public school teacher for all of her working life until she retired several years ago.  It was just before she retired that she bought herself a nice new car.  Yesterday she came to visit and she handed me her car keys to grab something from her trunk.  I was horrified at what I saw.  Her car keys, which have a built in electronic car lock/unlock remote, was wrapped in cheap packing tape.  On top of that, it was old packing tape.  So old that it had become stringy and oozey.

I asked what happened only to be told that while at her school she had dropped her keys which immediately cracked at the point where the metal key met the plastic housing for the electronic guts.  The school maintenance worker had kindly offered to fix it up the only way he could – with public school1 packing tape.

This conversation ensured:

  • MakerBlock: “How long has it been like this?”
  • MakerBlock’s mom: “Oh, a looong time.”
  • MakerBlock: “How long?”
  • MakerBlock’s mom: “About two years.”
  • MakerBlock: “Two years?!  Mom, you do know I have a machine in the other room capable of just making you a new plastic housing for your keys, right?”2
  • MakerBlock’s mom: “Oh, that never occurred to me.”
  • MakerBlock: “This is just unacceptable!  You can’t live like this.  I’m making you a new one.”

With the careful application of a utility knife to remove the packing tape and precision screwdrivers to take out the one lone screw, the key fob revealed its secrets, as depicted above.

Next:  Designing the replacement

  1. Read: cheap
  2. 3D printers has essentially been all I can talk about, or write about for that matter, since hearing about them for the first time in April of 2008.

Read more:

Last Updated on Thursday, 18 November 2010 05:12
Retro router Bandwidth Gauge mod
Written by PCB Heaven RSS Feed   
Tuesday, 16 November 2010 00:00

Authors: PCB Heaven RSS Feed

image Here is another awesome hack. It all began when Skytee saw on the web an Internet-fed air quality data meter that had an old voltmeter for displaying...[Read more]

Read more:

Last Updated on Tuesday, 16 November 2010 06:19
Lego NXT controls high voltage loads
Written by PCB Heaven RSS Feed   
Tuesday, 16 November 2010 00:00

Authors: PCB Heaven RSS Feed

image R J McNamara wanted to control a high voltage load such as a 220 volts lamp with his NXT. He began making his own controller, but...[Read more]

Read more:

Last Updated on Tuesday, 16 November 2010 06:17
1000 mWatts blue laser - How to
Written by PCB Heaven RSS Feed   
Monday, 15 November 2010 03:46

Authors: PCB Heaven RSS Feed

image We all know styropyro and his obsession with powerful lasers burning stuff. As a matter of fact, we had recently featured such a video with a 1 Watt blue...[Read more]

Read more:

Last Updated on Tuesday, 16 November 2010 06:18
<< Start < Prev 1 2 3 4 5 6 7 8 9 Next > End >>

Page 8 of 9