This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PREDICTIONS_TAG = "<predictions"; | |
var PREDICTIONS_END_TAG = "</predictions"; | |
var DIRECTION_TAG = "<direction"; | |
var DIRECTION_END_TAG = "</direction"; | |
var PREDICTION_TAG = "<prediction"; | |
var data_xml = msg.payload; | |
var predictions_begin = data_xml.indexOf(PREDICTIONS_TAG); | |
data_xml = data_xml.slice(predictions_begin); | |
var predictions_end = data_xml.indexOf(PREDICTIONS_END_TAG); | |
var xml_copy = data_xml; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PREDICTIONS_TAG = "<predictions"; | |
var PREDICTIONS_END_TAG = "</predictions"; | |
var DIRECTION_TAG = "<direction"; | |
var DIRECTION_END_TAG = "</direction"; | |
var PREDICTION_TAG = "<prediction"; | |
var data_xml = msg.payload; | |
var predictions_begin = data_xml.indexOf(PREDICTIONS_TAG); | |
data_xml = data_xml.slice(predictions_begin); | |
var predictions_end = data_xml.indexOf(PREDICTIONS_END_TAG); | |
var xml_copy = data_xml; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import time | |
import SensorsInterface | |
def main(argv): | |
print "=== Real Time Clock and Calendar ===" | |
print "*************************************" | |
SensorsInterface.setupSensorian() #Initialize the library |