@rlogiacco did you run into any problem / solution to the Printf.h use on Spark Core? I pretty much just dumped it, and tried to use printf() to format things… like this:
For the moment I just scrapped the printf() stuff in the application.cpp example, and commented out all of the printf() statements in the library. You don’t see them anyways if you are not debugging…
You’ll notice that Unit 2 is receiving, and it’s catching every payload… even when the transmitter Unit 1 says it’s failing. I believe this is just because Unit 1 can’t Rx well and is not receiving the acks from Unit 2 consistently.
And here’s two Spark Cores talking over nrf24L01 radios:
I’d love to fix this printf() thing before I release the library… any ideas?
So you did nothing other than removing all the prints calls? Weird, I did the same but it didn’t work… Who knows what should I have done while removing those lines
About the printf I believe we can just replace all those calls with pre processor macro calls which, for now, just do nothing. Another interesting task would be to prepare a standard DEBUG library , but having the flashed over the web IDE I’m not sure what should be the default implementation… A remote web service call?
Yep! The Wifi doesn’t seem to affect it… I’m sure there’s a channel for both where they clash though. There are various methods in the RF24 Class that can help you determine signal strength and switch channels, so theoretically you could roll your own frequency hopping scheme. These would be great for low cost, low power sensors… but I’m planning on using them in an application that creates a wireless display for a force sensor. Even with all of the error correction and acknowledgement that’s going on… it should still be fast enough for that.
@BDub Awesome! Thanks for getting one more library up and running. I can see these being very useful for when you want to feed sensor data back to a Spark Core thats 50ft away or less indoors.
We need to do some testing with the nRF24 chips with external antennas & NRF24 chips with amps built in.
It would be great if you could create some type of easy to follow Adafruit style setup guide for getting the these low cost radios working it would be great for just about everybody.
I figured out the printf() thing! Now I just need to wrap this up. Unfortunately right now I don’t have my radios with me, but if I just mess with the printf() stuff I shouldn’t break anything important. Then I’ll post a link to the github repo. It’s probably going to be a hacked up version of the RF24 to start with… with the things that I had to do to make it work, I don’t think it’s going to be easy to support arduino as well in one library without duplicating sections of code… it would be a mess. For right now let’s just get it out there and get it in the hands of people that want to use it
Ok guys @wgbartley@rlogiacco@RWB@peekay123, here’s the base RF24 library all cleaned up for the Spark Core! Compiles locally and on the web IDE (aka Sparkulator). @rlogiacco would you mind adding this to your top post so people can find it quickly?
Note: I did change the Getting Started example a bit… now it doesn’t acknowledge the round trip times to keep the comms really simple and straight forward. You can see the Transmitter just sends the time stamp, and the receiver just receives it. There is STILL the auto-acknowledge happening in the background that the nRF24L01+ manages by itself. That is enabled by default along with CRC checks.
I will add in the other examples as soon as I get time, and also the RF24_Network library conversion (should be easy now).
There may be some little glitches… not sure as I don’t have my radios with me at the moment, but it was working last night! Please let me know how it goes
Special thanks to @wgbartley for the sample nRF24L01+'s… without those, I would not have been able to work on this!
Now that the library is working and we have tested the chip antenna version of the nRF24 indoor range I went ahead and ordered up some nRF24 chips with amps and SMA antennas so we can see what kind of indoor and outdoor range we can get with these $7 dollar radios.
Its shipping form China so it might be awhile before I get them but they will come eventually. I’ll test these before I spend more for XBees.
This is a great deal for the board AND the whip antenna. Just the antenna alone would be $5 at Adafruit.
I’m going to order some of these as well once I get home…
The antenna connector would have to be trapped between the plastic of an enclosure to make this viable as a product though… because any time the antenna is bumped, or unscrewed, it’s going to put strain on the PCB connections… which should ultimately be soldered in as well.
Yea I don’t support Paypal and ebay only accepts Paypal for payment so I stick with Amazon.
The current consumption on these amplified boards is like 130mA so they are gonna need external power. Hopefully they work good. 3000+ feel outdoors it says.
RWB, these are only communications boards and don’t have any inputs. You can, however, connect these nRF24L01 boards to a cheap arduino like a pro mini that have sensors connected. The arduino then sends the data back to the Spark’s nRF24L01 where the Spark can send it to wherever via WiFi. According to Nordic, you can have up to 6 “slave” nodes connected to one “master” node.
Check out this great write up and sensor node creation from the man himself, Maniacbug:
Definitely would be worth making up a custom PCB like this if you were going to have more than a couple of these sensors going. Since even the Arduino Pro Mini’s are super cheap as well, maybe just make an adapter board that you could solder the nRF24L01 into that also had a coin cell holder on it… and then that plugged into some female headers on the pro mini.
btw: I can’t find a seller of those high power modules on ebay that isn’t pissing off 100 people a month… so I haven’t ordered some yet. If you have a good source let me know… been looking for about an hour now.