Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweetstache.js: clean up config a bit and wake display every 30s

  • Loading branch information...
commit 58feb5acd754cb6fc8b39ab9068b7e40c861affc 1 parent b4d9dfc
@jadonk authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 tweetstache.js
View
12 tweetstache.js
@@ -15,6 +15,7 @@ try {
config.trigger = "/sys/class/leds/lcd3\:\:usr0/trigger";
config.brightness = "/sys/class/leds/lcd3\:\:usr0/brightness";
config.twitterKey = false;
+ config.message = "New #BeagleBone BeagleStache image captured! @BeagleBoardOrg";
}
function LED() {
@@ -158,7 +159,7 @@ function stacheMessage(data) {
if(data.tweet && data.filename) {
winston.info('stacheMessage = ' + JSON.stringify(data));
led.on();
- sendTweet("New #BeagleBone BeagleStache image captured at Embedded Linux Conference 2013 #lfelc! @BeagleBoardOrg", data.filename);
+ sendTweet(config.message, data.filename);
}
} catch(ex) {
}
@@ -179,5 +180,14 @@ function requestStache() {
stache.stdin.write('s');
};
+// turn on the display every 30 seconds
+setInterval(unblankDisplay, 30000);
+function unblankDisplay() {
+ try {
+ fs.writeFileSync("/sys/class/graphics/fb0/blank", "0");
+ } catch(ex) {
+ }
+};
+
//setInterval(requestStache, 5000);
Please sign in to comment.
Something went wrong with that request. Please try again.