Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python equivalent code is acting strange #21

Open
dvreed77 opened this issue Dec 27, 2014 · 2 comments
Open

Python equivalent code is acting strange #21

dvreed77 opened this issue Dec 27, 2014 · 2 comments

Comments

@dvreed77
Copy link

I am trying to implement one of the starter circuits using your library. This simple Arduino code, causes the LED to light up brightly and blink accordingly (everything seems correct):

void loop() {  
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);  
  delay(1000);              
}

But this Python code, causes the LED to blink correctly, but is very dim with the exact same circuit:

from Arduino import Arduino
import time

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

while True:
    board.digitalWrite(13, "LOW")
    time.sleep(1)
    board.digitalWrite(13, "HIGH")
    time.sleep(1)

Any ideas what could cause this?

@hamsolo474
Copy link
Contributor

I have also experienced this, having extensively combed through the source code i have NO idea what could be causing it, i have forked this library and i still experience this bug from time to time.

Are you able to reproduce yours with a 100% success rate or does it only happen on occasion?

@thearn
Copy link
Owner

thearn commented Jan 3, 2015

I'm looking into this now, though I am having some trouble reproducing it. I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants