Skip to content

Instantly share code, notes, and snippets.

@samrocksc
Created November 21, 2014 02:58
Show Gist options
  • Save samrocksc/ff931477e4697a4ba50e to your computer and use it in GitHub Desktop.
Save samrocksc/ff931477e4697a4ba50e to your computer and use it in GitHub Desktop.
Reuters Ticker in Lo Fi Coffee
##MAP LAYOUT FOR SERIAL OUT
##Interval(320000)=>RSS Request(http://feeds.reuters.com/reuters/topNews)=>Function
Function:
var welcome = "Welcome to Lo Fi Coffee";
var news1 = msg.rss.channel.item[0].title;
var news2 = msg.rss.channel.item[1].title;
var news3 = msg.rss.channel.item[2].title;
var news4 = msg.rss.channel.item[3].title;
var news5 = msg.rss.channel.item[4].title;
var news6 = msg.rss.channel.item[5].title;
return {
"payload": {
"serial_out": welcome+' ** '+news1+' ** '+news2+' ** '+news3+' ** '+news4+' ** '+news5+' ** '+news6
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment