Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Watteyne twatteyne

View GitHub Profile
@twatteyne
twatteyne / map.html
Created Oct 30, 2015
simple Google maps-based mote and link visualization
View map.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Motes and Paths</title>
<style>
html, body {
height: 100%;
margin: 0;
@twatteyne
twatteyne / 4e_tsch_default_ch.py
Created Nov 9, 2014
IEEE802.15.4e-2012 TSCH default channel hopping sequence calculator
View 4e_tsch_default_ch.py
BANNER = r'''
This script calculates the default channel hopping sequence for the
IEEE802.15.4e-2012 TSCH mode.
\author Thomas Watteyne
\date November 2014
\license http://opensource.org/licenses/BSD-3-Clause
'''
class Lfsr(object):
@twatteyne
twatteyne / testFindSerialPort.py
Created Sep 5, 2014
use OpenWSN's findSerialPort
View testFindSerialPort.py
'''
drop this file in a new directory:
openwsn-sw\software\openvisualizer\bin\testFindSerialPort\
double-click to run.
example output:
[('COM6', 115200)]
Script ended successfully. Press Enter to close.
@twatteyne
twatteyne / 00_iotlab_forwarder.md
Last active Aug 29, 2015
IoT-LAB: forward serial traffic from motes to your local computer
View 00_iotlab_forwarder.md

The IoT-LAB platform lets you log into the server of the site your motes are located at (e.g. rennes.iot-lab.info). It all works fine.

In some cases, you want to be able to run programs and interact with the motes' serial port on your local computer. One example is running the OpenVisualizer from the OpenWSN project.

This Gist contains a couple of ideas about how to do that using SSH forwarding and a pair of Python scripts.

How it works

@twatteyne
twatteyne / vector.py
Created Apr 4, 2014
Dynamic VPython-based visualization of a vector
View vector.py
import random
import visual
MAXDIFF = 0.05
class ArrowCoords(object):
x = random.random()
y = random.random()
z = random.random()
def get(self):