diff --git a/examples/scan.py b/examples/scan.py old mode 100644 new mode 100755 index c3f1721..49be647 --- a/examples/scan.py +++ b/examples/scan.py @@ -1,7 +1,9 @@ -import serial -import serial.tools.list_ports - -print("Serial devices available:") -l = serial.tools.list_ports.comports() -for ll in l: - print(ll.device, ll.description) +#!/usr/bin/python + +import serial +import serial.tools.list_ports + +print("Serial devices available:") +l = serial.tools.list_ports.comports() +for ll in l: + print(ll.device, ll.description) diff --git a/pyfirmata2/pyfirmata2.py b/pyfirmata2/pyfirmata2.py index d9de871..d094f18 100755 --- a/pyfirmata2/pyfirmata2.py +++ b/pyfirmata2/pyfirmata2.py @@ -588,7 +588,7 @@ def read(self): if self.mode == UNAVAILABLE: raise IOError("Cannot read pin {0}".format(self.__str__())) if (self.mode is INPUT) or (self.mode is INPUT_PULLUP) or (self.type == ANALOG): - warnings.warn("Use a callback handler for pin {0}".format(self.__str__())) + raise IOError("Reading via polling is not supported by this library. Please use the original pyfirmata.") return self.value def register_callback(self, _callback): diff --git a/setup.py b/setup.py index 46ae247..59448cc 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='pyFirmata2', - version='2.4.6', + version='2.5.0', description="Use your Arduino as a data acquisition card under Python", long_description=long_description, author='Bernd Porr',