Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions BreakfastSerial/BreakfastSerial.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def __init__(self, *args, **kwargs):
newargs = (find_arduino(),)
super(Arduino, self).__init__(*newargs)

# Get protocol version
self.sp.write(chr(0xF9))
self.pass_time(1)
while self.bytes_available():
self.iterate()

if not self.get_firmata_version():
raise FirmataNotOnBoardException

Expand Down
1 change: 1 addition & 0 deletions BreakfastSerial/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, board, pin):
super(Led, self).__init__(board, pin)
self._isOn = False
self._interval = None
self._pin.mode = pyfirmata.OUTPUT

def on(self):
self._pin.write(1)
Expand Down