Skip to content

Instantly share code, notes, and snippets.

@tako2
tako2 / nmeaparser.py
Created June 4, 2016 09:00
Parse NMEA format to KML format
#!/usr/bin/env python
# coding: UTF-8
import sys
import StringIO
###############################################################################
class NMEAParser:
# -------------------------------------------------------------------------
def __init__(self):
@tako2
tako2 / get_image.js
Created November 15, 2015 06:13
node.js script for getting image file from THETA S.
var request = require('request');
var fs = require('fs');
if (process.argv.length < 3) {
console.log('node get_image.js [Filename]');
console.log("\tFilename: Image Filename such as R0010010.JPG");
return;
}
var file_uri = process.argv[2];
@tako2
tako2 / list_images.js
Created November 15, 2015 06:12
node.js script for getting list of images with THETA S API. it needs "request" module.
var request = require('request');
var options = {
uri: 'http://192.168.1.1/osc/commands/execute',
headers: { 'Content-Type': 'application/json;charset=utf-8' },
json: true,
keepAlive: false,
body: { "name": "camera.listImages",
"parameters": {
"entryCount": 100,
@tako2
tako2 / take_picture.js
Last active December 14, 2015 17:14
node.js script for taking picture with THETA S API. It needs request module.
var request = require('request');
var options = {
uri: 'http://192.168.1.1/osc/commands/execute',
headers: { 'Content-Type': 'application/json;charset=utf-8' },
json: true,
keepAlive: false,
body: { "name": "camera.startSession" }
};
@tako2
tako2 / twelog.py
Last active June 4, 2016 08:55
Log serial text from ToCoStick (TWE - wireless usb device). This code needs python-serial and python-daemon.
#!/usr/bin/env python
# coding: UTF-8
from __future__ import with_statement
import sys
import serial
import os.path
import datetime
@tako2
tako2 / theta360.py
Created December 1, 2013 14:13
Controlls RICOH THETA 360 (Python).
#!/usr/bin/env python
# coding: UTF-8
import socket
import struct
DEBUG = True
DEBUG2 = False
PTP_OC_GetDeviceInfo = 0x1001