Skip to main content

You are here

Tricky JeeNode crash using sound and RF12 together

1 post / 0 new
pixelpusher
Tricky JeeNode crash using sound and RF12 together

Hello,

I'm building a large-scale art installation using (eventually) 30 JeeNodes to create a forest of talking birds. Each one plays a sound (think of a bird tweeting) and broadcasts wirelessly at the same time to other birds, who call back when they wirelessly "hear" a tweet. I used the code from http://forum.jeelabs.net/node/1184 as a basis for my sketch, and added wireless call/response code.

What's happening is incredibly difficult to pinpoint. Out of 20 JeeNodes, with the same firmware and software and no apparent inconsistencies in construction, they almost all run differently! Many of them simply crash - the loop() function stops running. I have no idea why, but I think it must be a memory or stack error of some sort. Some of them run perfectly fine, and others run for awhile and then mysteriously stop.

The common denominator is Sleepy and the RF12 functions. Just adding RF12 function calls makes the code unstable, so perhaps someone can shed some light on why that is?

This is a basic sketch that plays back a sound and sleeps: http://content.flkr.com/software/TimedSoundPlaybackBasic-121015a.zip

Try enabling RF12 code and see how that works for you.

Here's the more complex sketch

with a diagram that (hopefully) explains it

Premium Drupal Themes by Adaptivethemes