Starting Point System : Forum

You are not logged in.

  • Index
  •  » ÁChameleon
  •  » Python and ÁChameleon - Voltage to Frequency convertor

#1 2010-10-08 23:30:51

Laurent Aldon
New member

Python and ÁChameleon - Voltage to Frequency convertor

Dear All,
I am programming in Python under Ubuntu 10.04 and this is a small code to test the LED of our favorite device
If you are interested, please don't hesitate to contact me for discussion.

I am looking for a scheme using timer NE555 or other IC to convert voltage (10 to 500 mV) for frequency to obtain precise measurements...

#!/usr/bin/env python

import serial, time

    muChameleon = serial.Serial('/dev/ttyUSB0',9600)
    muChameleon = None
    print "Failed to connect on /dev/ttyUSB0"

def send(command):
    muChameleon.flushInput() # Discard input buffer
    muChameleon.write(command + '\n')

    print muChameleon.inWaiting() # For debugging
    print muChameleon.inWaiting() # For debugging
    if muChameleon.inWaiting() != 0: # Reply into the buffer
        print muChameleon.readline()

#muChameleon.write('led on\n')
#List = []
#Test = ''
#while Test != '\n':
#    Test =
#    List.append(Test)
#print str(''.join(List))
#muChameleon.write('led on\n')

if __name__ == '__main__' and muChameleon:
    while 1:
        send(raw_input('Command> '))

I am a teacher and I am trying to collect data from biopiles (microbial fuel cell) using Áchameleon !
I am coding in Python using Linux (Ubuntu)
Don't hesitate contact me to progress in developping tools...


  • Index
  •  » ÁChameleon
  •  » Python and ÁChameleon - Voltage to Frequency convertor

Board footer

Powered by FluxBB