Example #1
0
# input while code is tested.

import time
import serial
import os
import linecache
import json
import urllib2
import math
import telemachus_plugin as tele
import config

url = config.url()

ser = serial.Serial(
    port=config.arduinoSerialPort(),
    #port='COM3',
    #baudrate=115200, # Causes the arduino buffer to fill up
    baudrate=9600,  # Seems to be working well
    # parity=serial.PARITY_ODD,
    # stopbits=serial.STOPBITS_TWO,
    # bytesize=serial.SEVENBITS
)

gearStatus = 0
global gearStatus
brakeStatus = 0
global brakeStatus


def clamp(num, minn, maxn):
Example #2
0
    proper headers and footers that dont interfere with the actual data'''
import math
import time
import curses
import copy
import telemachus_plugin as tele
import config

try:
    import serial
except:
    print 'PySerial does not seem to be installed'

try:
    ser = serial.Serial(
        port=config.arduinoSerialPort(),
        #port='COM3',
        #baudrate=115200, # Causes the arduino buffer to fill up
        baudrate=9600,  # Seems to be working well
       # parity=serial.PARITY_ODD,
       # stopbits=serial.STOPBITS_TWO,
       # bytesize=serial.SEVENBITS
    )
    arduinoConnected = True
    print 'Serial device connected at ' + config.arduinoSerialPort()
except:
    arduinoConnected = False
    print 'Unable to connect to arduino at ' + config.arduinoSerialPort()


def getFlightData(dIN):
Example #3
0
# input while code is tested.

import time
import serial
import os
import linecache
import json
import urllib2
import math
import telemachus_plugin as tele
import config

url = config.url()

ser = serial.Serial(
    port=config.arduinoSerialPort(),
    #port='COM3',
    #baudrate=115200, # Causes the arduino buffer to fill up
    baudrate=9600, # Seems to be working well
   # parity=serial.PARITY_ODD,
   # stopbits=serial.STOPBITS_TWO,
   # bytesize=serial.SEVENBITS
)

gearStatus = 0
global gearStatus
brakeStatus = 0
global brakeStatus


def clamp(num, minn, maxn):