Skip to content

Instantly share code, notes, and snippets.

@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