0

This is the hardware set-up at home,

Raspberry Pi GPIO -> Logic Level Converter -> Arduino -> Multiple Relays

enter image description here

I am running Raspbian and NodeJS on the Pi while the Arduino is loaded with StandardFirmata. I connect NodeJS to the Arduino with the johnny-five package and it works well after it's started. But after extended periods, a few hours? The Arduino stops responding. Whatever command that I send to the Arduino won't be acted on. It's as though as the Arduino hung. Both the Raspberry Pi and Arduino are being powered indenpendently with a 1A Nokia USB Adapter.

Does anyone know why this is happening?

  1. johnny-five
  2. StandardFirmata
  3. NodeJS Server Code
  • Also, please add links to all the products you are using. I don't know what "Johnny-Five" is aside from a robot from an 80s movie. Same with "StandardFirmata". – Connor Wolf Dec 24 '14 at 8:48
  • Also, the details on the RPi code, as well as (ideally) pictures of how you have everything hooked up. – Connor Wolf Dec 24 '14 at 9:07
  • 3
    You might want to consider posting your code, otherwise every answer here will be a guess at best – Omer Dec 24 '14 at 9:31
  • Very often, if Arduino hangs, this is a memory problem (typically collision between the heap and the stack). It's gonna be hard to diagnose the actual issue without the source code of the program you downloaded to Arduino! – jfpoilpret Dec 24 '14 at 10:18
  • Hav you check that your Arduino still works properly with usual programs (blink in particular). You first need to find out if it is a hardware issue (pin or MCU fried due to too much current switched through the relays) or software. – jfpoilpret Dec 24 '14 at 10:20
0

If none of the code is yours, and all code from the Firmata library, then the most possible cause that comes to mind after reviewing the library code is memory leak, which makes the next allocation to fail and by thus breaking the code.

The Firmata library does perform dynamic memory allocation, checkout Firmata.c, so it is realistic - I would suggest to take it with the Library's author.

| improve this answer | |
  • 1
    Yeah. None of the code on the Arduino is mine. It's all Firmata's. So it's probably Firmata? – Zane Dec 24 '14 at 20:14
  • 1
    logically, it must be. Perhaps they didn't take into account running indefinitely. – Omer Dec 24 '14 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.