Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Trouble with INPUT pin mode #9

Copy link
Copy link
@LucasPa

Description

@LucasPa
Issue body actions

Hi,

Before explaining the issue I have with your project, let me express how great I find it ! It is doing exactly what I need, thank you !

However I had some troubles when using a pin mode as "INPUT". For instance when running the following simple example :

from Arduino import Arduino

board = Arduino('9600') #plugged in via USB, serial com at rate 9600
board.pinMode(5,"INPUT")
board.close()

everything runs fine. However, if I run this same code a second time I get the following output :

File "./TestArduino.py", line 23, in
board = Arduino('9600') #plugged in via USB, serial com at rate 9600
File "/usr/local/lib/python2.6/dist-packages/arduino_python-0.2-py2.6.egg/Arduino/arduino.py", line 106, in init
raise ValueError("Could not find port.")
ValueError: Could not find port.

But then it works again if I disconnect and reconnect the Arduino. Such an issue is not happening if I replace "INPUT" by "OUTPUT". The versions of Python and python-serial are respectively 2.6.5 and 2.7.

The issue I have is then not a major obstacle since I can just reconnect the Arduino board. But I was thinking that you may want to give this a look.

Lucas

UPDATE :

This issue is not happening when running with Python 2.7 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.