Cannot communicate between RPi and Arduino

  • Hi all, I've been making progress with my setup at home but am encountering some problems. I have the my LED strip connected together and talking to the Arduino (verified by loading a different sketch). I have verified Hyperion is running, and my phone can successfully connect to the server. I have not added an inline capicator


    When I power only the Arduino, I see a quick, successful LED test. Once the Pi and Arduino boot up I see a quick LED flash, but do not see the rainbow swirl effect.


    I am unable to control the LEDs through Hyperion. When I SSH into the Pi and manually set a color I see confirmation from Hyperion, but nothing on the LED side. I'm not sure if it's a configuration issue with the Arduino, or a communication issue between the Pi and the Arduino. Thanks for any help!


    Code
    BoxOfLights:~/hyperion/bin # ./hyperion-remote -c blue
    hyperion-remote:
      version   : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
      build time: Jul 25 2016 06:54:18
    Connected to localhost:19444
    Set color to 0 0 255


    Hardware:
    RiPi3 with OpenElec 7.01 and Hyperion
    IEIK UNO R3 Board ATmega328P
    Mokungit 1APA102-C Individually Addressable Magic Color LED Strip 36 Pixels/m 180


    Configs:
    Gist => hyperion.config.json
    Gist => Arduino sketch
    Note, my hyperion config uses "AdalightApa102". When I tried modifying the type to "apa102" type I did not see any activity from the LEDs at all.


    Hyperion log


    Arduino pins:
    Ignore the wire colors, I had to flip the connector backwards for a better connection. I have verified the correct direction of the clock and data.


    Testing LEDs through the Arduino (different sketch loaded):

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.


    RPi3 + Arduino test:

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

  • Okay, I've added the ground wire on the Arduino. I don't think I need to ground anything on the RPi.




    When I send commands to change color from the command I can see the LEDs doing something, but I'm still not seeing any solid color or working effects.


    I double checked the manufacuter site and read:

    Zitat

    The manufacturer of the APA102C smart LED used in this strip used to be GRB order, and has changed in 2015 to have BRG color order. This means if you are using our DotStar library, you’ll need to change the initialization to tell it which you are using. Check the tutorial for details on how to do this! The LED colors are otherwise identical, you just have to pipe the data to it in a slightly different order.


    I updated my Arduino sketch to use the BRG color order while keeping the Hyperion config to use RGB. Still no luck and everything is white.


  • I don't think I need to ground anything on the RPi.


    Yes. you NEED a common ground connection to all attached. However it should be grounded Via the USB connection already.


    Could this be the RGB color order?


    you would at least see the LED's emitting colors, wrong colors. but colors non the less.


    Hope it helps.

  • Okay, another update. I believe the RGB byte order provided online was incorrect. I loaded another sketch to test and found BRG gave me the correct colors on boot. After setting the correct color order on the Arduino to BRG and keeping the Hyperion config at RGB it looks like I can control a single LED. This is odd.


    On first boot with Pi + Arduino this is the resting state, note the LEDs that are off:


    When I connect with the Hyperion Android app and use the color wheel and choose yellow:


    Gist => Test sketch

  • How many LED's are you using? I ask because the two sketch's have different values. One for 240 and the other for 168.

  • As a test, would it be possible to install the arduino ide on the Rpi and see if it can upload the sketch without issue?

  • As a test, would it be possible to install the arduino ide on the Rpi and see if it can upload the sketch without issue?


    I'm not sure what this would accomplish since I can confirm I am able to upload sketches.


    I have another idea that may resolve the issue. Try the Official sketch. ( https://github.com/hyperion-pr…ino/adalight/adalight.ino)


    It may work better for you. I know it did for me.


    I am already using the official sketch.

  • I'm not sure what this would accomplish since I can confirm I am able to upload sketches.


    Making sure the Rpi can communicate with the a arduino without issue on /dev/ttyACM0



    I am already using the official sketch.


    Yup I realized that shortly after posting. My mistake

  • Yes. However if you want to make sure the communication between the two is without fault I would install the ide and test an upload or two.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!