User Tools

Site Tools


element 1: the body

  • a cuboid structure made of plywood and stretchable fabric

the process of making of, here

element 2: the mechanics

  • the motors are controlled by an arduino diecimila board.

element 3: the controls

  • startup script that runs airodump in the background and starts the python script


a simple arduino code to test the motors, moves up and down with a delay of 3 seconds in between.

the extended-python-arduino-prototyping-api firmware is uploaded on an arduino board and controlls are sent to it from python.

  • get the network traffic:

parse a cvs from airodump, look for IVs column and print the values

cat salzamt1009-01.csv | awk -F “,” '{print $11}'

parse the airodump csv file, using the python csv module

import csv

scanDict=csv.DictReader(scan, delimiter=',')

from here, lookup the value for the #IVs

for adict in scanDict:
        if adict.has_key(' # IV'):
            data=adict.get(' # IV')
            print data
  • choose the last edited .csv file in the current folder;

this can be done using the subprocess module:

import subprocess

listlasted=subprocess.Popen("ls -ct1 | head -1". shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print lastedited
  • calculate the next position of the motors based on the change in the number of packets. this number is returned by the lookup() function that reads the last edited .csv file

based on this difference, a position value is sent to the motors

 if packetsDiff>10:
        print 'should stretch', newPosition
elif packetsDiff<=0:
        print 'should shrink', newPosition
        linearone.write(newPosition), lineartwo.write(newPosition)
  • the full python script is available here
  • the whole process is finally wrapped in an automatic startup script,
salzamt.txt · Last modified: 2013/04/22 08:17 by zoza