Coder Social home page Coder Social logo

breakfastserial's People

Contributors

ranman avatar theycallmeswift avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breakfastserial's Issues

Add official windows support

Windows is actually already supported if you specify the COM port manually:

board = Arduino("COM5")

Adding windows support should be as simple as adjusting the regex to match open COM ports as well.

Also need to update the documentation.

led.py

I am getting the following error when I try to compile the file:

python led.py
Traceback (most recent call last):
  File "led.py", line 7, in <module>
    from BreakfastSerial import Led, Arduino
  File "/Users/.../anaconda/lib/python3.6/site-packages/BreakfastSerial/__init__.py", line 5, in <module>
    from components import *
ModuleNotFoundError: No module named 'components'

Any idea what the problem is?

RGBLed polarity

The RGB LED that came with my arduino kit is reverse polarity; that is, the common lead is actually Vcc and the individual color inputs have to be pulled LOW to turn on. I don't know if I have a weirdo defective LED or if this is a common thing.

If it's the latter, it'd be nice if we had a switch to reverse the polarity of the RGBLed object so that it pulled the pins lower to make colors brighter for LEDs configured that way.

_handle_report_version passed invalid arguments

Getting this once in a while. Looks like a pyFirmata issue.

Connecting to /dev/cu.usbmodem1411
Traceback (most recent call last):
  File "motor.py", line 10, in <module>
    board = Arduino()
  File "/Users/theycallmeswift/dev/open-source/BreakfastSerial/BreakfastSerial/BreakfastSerial.py", line 28, in __init__
    super(Arduino, self).__init__(*newargs)
  File "/Users/theycallmeswift/dev/open-source/BreakfastSerial/venv/lib/python2.7/site-packages/pyfirmata/__init__.py", line 16, in __init__
    super(Arduino, self).__init__(*args, **kwargs)
  File "/Users/theycallmeswift/dev/open-source/BreakfastSerial/venv/lib/python2.7/site-packages/pyfirmata/pyfirmata.py", line 87, in __init__
    self.iterate()
  File "/Users/theycallmeswift/dev/open-source/BreakfastSerial/venv/lib/python2.7/site-packages/pyfirmata/pyfirmata.py", line 266, in iterate
    handler(*received_data)
  File "/Users/theycallmeswift/dev/open-source/BreakfastSerial/venv/lib/python2.7/site-packages/pyfirmata/pyfirmata.py", line 152, in decorator
    f(*args, **kwargs)
TypeError: _handle_report_version() takes exactly 3 arguments (45 given)

Sensor.value Problem

I have problems with using the Sensor .value returning a NoneType. I can't perform any math on it.

Does not work on Raspberry Pi

This is the script I'm using to test BreakfastSerial

from BreakfastSerial import Arduino, Servo

from time import sleep

board = Arduino()
servo = Servo(board, 10)

import code
code.InteractiveConsole(locals=globals()).interact()

When running this on an Ubuntu Virtual Machine, it works fine. When running this with Raspberry Pi, this consistently happens:

First run (tries to connect to ttyACM0):
python servo_test.py
Connecting to /dev/ttyACM0
Python 2.7.3 (default, Jan 13 2013, 11:20:46)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/BreakfastSerial/BreakfastSerial.py", line 80, in run
while self.board.bytes_available():
File "/usr/local/lib/python2.7/dist-packages/pyfirmata/pyfirmata.py", line 225, in bytes_available
return self.sp.inWaiting()
File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 435, in inWaiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 5] Input/output error

exit()

Second run (Tries to connect to ttyACM1):
python servo_test.py
Connecting to /dev/ttyACM1
Python 2.7.3 (default, Jan 13 2013, 11:20:46)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

servo.center() #This call worked properly before the exception below
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/BreakfastSerial/BreakfastSerial.py", line 80, in run
while self.board.bytes_available():
File "/usr/local/lib/python2.7/dist-packages/pyfirmata/pyfirmata.py", line 225, in bytes_available
return self.sp.inWaiting()
File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 435, in inWaiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 5] Input/output error
exit()

Every subsequent run(tries connecting to ttyACM0)
python servo_test.py
Connecting to /dev/ttyACM0
Traceback (most recent call last):
File "servo_test.py", line 5, in
board = Arduino()
File "/usr/local/lib/python2.7/dist-packages/BreakfastSerial/BreakfastSerial.py", line 31, in init
raise FirmataNotOnBoardException
BreakfastSerial.BreakfastSerial.FirmataNotOnBoardException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.