def main(): ardno = True if len( sys.argv ) == 2 and sys.argv[ 1 ] in [ '-n', '--no-arduino' ]: ardno = False arduino( ardno ) try: if ardno: ArdnLib.connect() except Exception, e: print print '[firebrain] Get sure arduino is connected, we haven\' found it.' print e print
def main(): # First we check if we want to used the phisical arduino or not ardno = True if len( sys.argv ) == 2 and sys.argv[ 1 ] in [ '-n', '--no-arduino' ]: ardno = False CommLib.Functions.arduino( ardno ) try: # If we want a connection with the arduino we try to get it if ardno: ArdnLib.connect() except Exception, e: # If we cant connect to the arduino and we ArdnçLiv hasn't find it # we infor the user and print the catched exception. print print '[firebrain] Get sure arduino is connected, we haven\' found it.' print e print