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

Python equivalent code is acting strange #21

Copy link
Copy link
@dvreed77

Description

@dvreed77
Issue body actions

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?

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.