def initInterfaces(self): if self.providedInterface: self.fabnet = self.providedInterface #providedInterface is defined in the virtualMachine class. else: self.fabnet = interfaces.gestaltInterface( 'FABNET', interfaces.serialInterface(baudRate=115200, interfaceType='ftdi', portName='/dev/ttyUSB1'))
def initInterfaces(self): if self.providedInterface: self.fabnet = self.providedInterface #providedInterface is defined in the virtualMachine class. else: self.fabnet = interfaces.gestaltInterface('FABNET', interfaces.serialInterface(baudRate = 115200, interfaceType = 'ftdi', portName = '/dev/tty.usbserial-FTXW9L60'))
# Ilan E. Moyer # July 7, 2015 # This script is inteded to be run from within a makefile. # Loads and then runs a program provided as a command-line argument. # Note that for now, this utility assumes that you have UPPv2Node.py, or a symlink to it, in a folder ~/symlinks/ from pygestalt import nodes from pygestalt import interfaces import time import sys, os import random from doppel.UPP import UPPGestaltNode serialInterface1 = interfaces.serialInterface(baudrate=115200, interfaceType='ftdi') programmer1 = nodes.soloGestaltNode(name='programmer1', interface=serialInterface1, module=UPPGestaltNode) for programmer in [programmer1]: programmer.identifyChip() if programmer.program(sys.argv[1]): print "PROGRAMMED " + sys.argv[1] + " SUCCESSFULLY!" try: lfuse = int(sys.argv[2], 0) programmer.setFuses(lfuse=lfuse, hfuse=None, efuse=None) #sets clk/1 print "LFUSE BURNED TO: " + hex(lfuse) except:
from pygestalt.Nodes import printrboard from pygestalt import nodes from pygestalt.Nodes import dummyNode from pygestalt import interfaces #myPrintrboard = nodes.soloIndependentNode(name = 'myPrintrboard', module = printrboard) #gsArduino = nodes.soloGestaltNode(name = 'gsArduino1') myInterface = interfaces.gestaltInterface('myInterface', interfaces.serialInterface(baudRate = 115200, interfaceType = 'ftdi', portName = '/dev/tty.usbserial-FTVG67VT')) myFabUnit = nodes.networkedGestaltNode('myFabUnit', myInterface, module = dummyNode) #gsArduino = nodes.soloGestaltNode(name = 'gsArduino', interface = interfaces.serialInterface(baudRate = 76800, interfaceType = 'lufa', # portName = "/dev/tty.usbmodemfa131"), module = dummyNode) #gsArduino.identifyRequest() #print gsArduino.urlRequest()