davidanddiesel
Posts: 15
Joined: Sun Jan 18, 2015 4:03 am

Arduino Nanpy Problem

Wed Jan 28, 2015 12:21 am

I am using the Nanpy library to control an Arduino Uno. I have Arduino IDE installed on my Pi and it works fine. I successfully installed the library with no errors. But when I use the code, the L led of the Arduino flashes 3 times, then the RX led flashes once, after that the Arduino reboots and does nothing. I am connecting it using the serial cable that comes with the Arduino. Code is below:

Code: Select all

from nanpy import Arduino as A
led = 13


A.pinMode(led, A.OUTPUT)


while True:
    A.digitalWrite(led, A.HIGH); 
    
    A.delay(1000); 
    A.digitalWrite(led, A.LOW);
    
    A.delay(1000);

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Arduino Nanpy Problem

Wed Jan 28, 2015 8:19 am

There is a very detailed tutorial elsewhere on these forums - http://www.raspberrypi.org/forums/viewt ... py#p546921

I notice that you don't specifically mention whether you have uploaded the nanpy firmware into the arduino.

Return to “Troubleshooting”