Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633
salzamt

Table of Contents

element 1: the body

the process of making of, here

element 2: the mechanics

element 3: the controls

development

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.

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

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

http://www.backtrack-linux.org/forums/showthread.php?t=15519

parse the airodump csv file, using the python csv module

import csv

scan=open(file.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

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)
lasted=listlasted.communicate()[0].strip()
print lastedited
newPackets=int(lookup(airodump))
packetsDiff=newPackets-packet

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

 if packetsDiff>10:
        newPosition=position+2
        print 'should stretch', newPosition
        linearone.write(newPosition)
        time.sleep(0.3) 
        lineartwo.write(newPosition)
        time.sleep(0.3)
elif packetsDiff<=0:
        newPosition=position-1
        print 'should shrink', newPosition
        linearone.write(newPosition), lineartwo.write(newPosition)