Arduino Hacking: RSS onto an LED Dot Matrix Display Panel

We’ve been playing with Arduinos for the last few weeks.  Yesterday I bought a Freetronics Dot Matrix Display (DMD) from Jaycar for $30 or so, and I’ve cobbled together a couple of scripts to drive some RSS content to it.  It works :)


I have a SainSmart Mega 2560, but there’s no reason this shouldn’t work with any Uno compatible. Note – this DMD doesn’t work with the Mega unless you overwrite a couple of files (Thanks @TheRevva for sharing)

Before starting, two ruby gems are needed – SerialPort and FeedJira -thanks @johndagistino [protected] for the steer.  It’s also worth spending time going through the code samples Freetronics have made available on github – linked at the bottom their product page

Note – I still have a problem with serial comms in that it doesn’t work unless I have the Serial Monitor open.

gem install serialport

gem install feedzilla

 

This is the ruby test script that I’ve used to grab two rss feeds, and pass the headlines in one at a time into to Arduino over the serial port.

require "serialport"
require "feedjira"

def showfeed(feedurl)
	#params for serial port
	port_str = "/dev/tty.usbmodem621"  #NB port may be different for you, copy this from port selected in Arduino IDE 
	baud_rate = 9600
	data_bits = 8
	stop_bits = 1
	parity = SerialPort::NONE
	 
	sp = SerialPort.new(port_str, baud_rate, data_bits, stop_bits, parity)
	feed = Feedjira::Feed.fetch_and_parse(feedurl)
	sp.write feed.title
	puts feed.title
	sp.write "   "
	sleep(8)

	feed.entries.each do |entry|
		sp.write entry.title
		puts entry.title
		sp.write "   "
		sleep(8)
	end
end
showfeed('http://feeds.smh.com.au/rssheadlines/top.xml')
showfeed('http://www.theverge.com/rss/frontpage')

And lastly, the Arduino sketch to drive the rss feed onto the display:

// dmd-rss.ino

#include "SPI.h"      
#include "DMD.h" 
#include "TimerOne.h"
#include "Arial_black_16.h"<arial_black_16.h> 
// you can remove the fonts if unused
#include "SystemFont5x7.h"

#define DISPLAYS_ACROSS 1   
#define DISPLAYS_DOWN 1       
/* change these values if you have more than one DMD connected */
DMD dmd(DISPLAYS_ACROSS,DISPLAYS_DOWN);

void ScanDMD()
{ 
  dmd.scanDisplayBySPI();
}

void drawText(String dispString, int scrollspeed) 
{
  dmd.clearScreen( true );
  dmd.selectFont( SystemFont5x7 );
  char newString[256];
  int sLength = dispString.length();
  dispString.toCharArray( newString, sLength+1 );
  dmd.drawMarquee(newString,sLength,( 32*DISPLAYS_ACROSS )-1 , 0 );
  long start=millis();
  long timer=start;
  long timer2=start;
  boolean ret=false;
  while(!ret){
    if ( ( timer+1000-scrollspeed ) < millis() ) {
      ret=dmd.stepMarquee( -1 , 0 );
      timer=millis();
    }
  }
}

void setup()
{
	Serial.begin(9600);
   Timer1.initialize( 5000 );           
/*period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker.*/

   Timer1.attachInterrupt( ScanDMD );  
/*attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()*/

   dmd.clearScreen( true );            
/* true is normal (all pixels off), false is negative (all pixels on) */
}

void loop() {
  
  String content = "";
  char character;

  while(Serial.available()) {
      character = Serial.read();
      content.concat(character);
      Serial.println(content);
  }

  if (content != "") {
  	drawText(content,980);
  	delay(1000);
  	dmd.clearScreen( true);
  	delay(500);
  }
  else {
    delay(500);
	}
	
}

 

 

Continuous Deployment

I had a chat with Brett Winterford recently, a journalist writing for IT News, about continuous integration and continuous deployment (article here).  The essence of our discussion was focused on the question “Can legacy enterprise teams move into CI/CD”.  The answer to the question has to be yes, for a couple of reasons.

First and foremost, our competitors can no longer be regarded as the same competitors we had when news was delivered daily in print and technology projects could run for three years (and did!) without seeming unusual – merely “big”.  Our competitors now are globally placed, and can set up a competitive news source about as quickly as you can make an omelette. That’s the benchmark.  If we can’t tweak a feature on one of our sites and test it live inside of 24 hours, we might just be dinosaurs waiting for a meteor.  Most of the newer digital media businesses can do this, and many of our legacy competitors are on this journey as well.  This is why it’s a baseline expectation, not a target.

Secondly, as we move into a world of KPI’s focused on site performance including competitive benchmarking we need to be able to call a slowdown worse than a particular measure a severity one issue, and ask the relevant team to stop their project work and turn their attention to the slowdown until the issue is resolved.  This can’t really work unless we can release the performance fixes and test them continuously – preferably using RUM (Real-user monitoring) and this couples these two objectives.

Third, in a recent restructure my team was expanded and now includes responsibilities from design through to support.  Part of the motivation for this is a desire for faster output.  I’ve had several people dispute this is feasible – on the basis that we are running at capacity already.  I believe we can achieve good results in a couple of ways though.

As we are all in one team now, we can lean out our management processes and push closer to pure agile / Scrum and ship a lot more smaller releases.  This will create a perception of velocity in its own right, but will also gain faster feedback – allowing teams to refine or pivot more quickly, and get to the right outcomes quicker.  Product managers will also be able to do their UAT incrementally instead of waiting for releases, which will lean out the UAT processes.

Lastly, testing as a function will change fundamentally in a CI/CD environment and our testers will be increasingly automation specialists who will work with the project teams to make sure they have tests in place.  This will mean more testing is automated, and done quicker than human hands can do it.

Disruptive Innovation 101

My boss handed me a pamphlet he’d received in the mail at work and said “Here,you’ll be interested in this”.  It was advertising a talk by Clay Christensen on his learnings around disrupive innovation – or as he calls it market-creating innovation.  This struck me as so important for our leadership team to attend I got permission to book a bunch of us seats to attend.  And it was worth every second.

I presented a crunched-down brown bag lunch session on this at work recently, you can find it on the Engineering @ Fairfax blog – where we’ve started publishing a lot of our internal sessions.   Unfortunately the Q&A was very sensitive and so we have had to edit the last part out of the video

Here’s the video:

Here’s the presentation:

Repaving the front garden

Since we moved in, the front garden has been messy uneven brickwork.  Someone who lived here a very long time ago spent a lot of effort arranging the brick pavers in a circle pattern, but there were two problems.  Firstly, the circle pattern means there are a lot of big spaces between the rectangular bricks – and these spaces get more and more full of weeds over time.   Second, the little trees they planted turned into big trees, and the roots had lifted all the bricks unevenly, and so the gate no longer opened without contact with the bricks and the walking area was one big trip hazard.

Starting point – very uneven brickwork, poorly maintained beds, massive weed problem:

It’s easy to see how the bricks were lifted up by the roots of the big plane tree here, and how the tree has outgrown the original corner  placement, and is butting up against the brickwork.  It’s also very close to making the garage wall crack, and will probably have to be taken out in five years or so.

2013-09-07 12.17.26 2013-09-07 12.17.21

 

Continue reading

PUCC CREATE networking event

I recently spoke at the Pyrmont Ultimo Chamber of Commerce’s annual networking event called CREATE. I spoke briefly about ending trends in tech and media, and about what it takes to work with companies like ours or to compete with us in this new media world.

The networking event itself was very interesting to watch. It was run like speed dating, only each person left a business card with each other date. Speaking to participants after,they generally agreed that the value was more social than practical but unanimously thought it was fun, and worth participating in. It’s one to try again with my entire team at work, I think

One week on Android

It’s been a week or so since I sold my iPhone 5 and bought myself the Samsung S4, and I’m loving it. I have Apple to thank really, for cutting me free by making me write off my “investments” in terms of docks, chargers and cables and so on and rounding that off with a device whose battery life was bad enough to cause me more stress than any phone is worth.

Here are my initial observations and tips as a long time iOS device user who is getting to know Android. Continue reading

Samsung Android issue: Unfortunately CloudService has stopped

I grew increasingly frustrated with the poor battery life that my iPhone5 offered, to the point where I eventually decided to switch phones.  After searching I settled on a Samsung Galaxy S4.  Since I first turned it on, it’s thrown errors periodically saying “Unfortunately CloudService has stopped”.  There’s very little help available for this issue online, but all occurrences link to Samsung handsets or tablets.  After a lot of searching, factory resetting, and head scratching, I found it comes down to something related to Samsung’s cloud services and possibly dropbox.  I did a factory reset again (probably not necessary) and never signed in to anything.  Using the camera, then going to image galleries used to show the issue, now nothing.  I added dropbox, and importantly, enabled image sync (one forum post in this thread said this).  Still working perfectly.  The one key thing I haven’t done is logged in to any Samsung services on the device.

So, if you’re unlucky like me and googleing away to find a fix to this issue, just clear anything Samsung from your accounts.  The CloudService is named using android’s namespace so it looks like it is part of Android but some forum posts indicate it is safe to remove.  I haven’t gone there, but if there’s ever a way of rooting it and loading the Nexus flavour of Android on, that may be a good way to go.

In summary: factory-reset, do not sign in to anything Samsung.

DIY: Table Restoration

We have a “thing” in Australia.  Twice a year, your neighbourhood has a council cleanup day.  You put all the things you don’t want on the pavement on a Sunday, and some time that week the council trucks come around and take the no-longer-loved items away.  They take their time coming round though, as an entire ecosystem, or economy, has emerged around this tradition.

Every so often I drive past something I can’t believe is being dumped.  Last time this happened, it was a spectacular cast iron table base, with a piece of cheap and nasty laminated chipboard in place of the original table top… I couldn’t help myself.  I stopped and picked it up: Continue reading