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
/* | |
Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to the port name. | |
usage: node logger.js /dev/tty.usbserial <baudrate> | |
*/ | |
var SerialPort = require("serialport"); | |
var fs = require("fs"); | |
var port = process.argv[2]; |
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/env python3 | |
from __future__ import print_function | |
import sys | |
import os | |
import time | |
import asyncio | |
from ably import AblyRest | |
my_path = os.path.abspath(__file__) # Find the full path of this python script | |
# get the path location only (excluding script name) | |
base_dir = my_path[0:my_path.rfind("/")+1] |