Newer RF24 Library

I couldn't get pynrf24 to talk to RF24 running on an Arduino. I followed the link from pynrf24 to RF24, but actually there's a more active fork of RF24, with some support for plugging in new platforms.

So now I've switched to this more active RF24 library. The general idea is to add Chibios support and submit a pull request.

The getting started example didn't work until I explicitly set the channel to 0x60, which was a bit irritating - I spent the best part of an afternoon checking I could really get two devices talking to each other, rather than adding the Chibios support I need.

The RF24 library supposedly also includes a python wrapper. I haven't managed to get it to talk to the python client as yet, so hopefully the python wrapper will prove convenient.

I suppose what I should actually do is take all this into the office and show it will work there, in a noisier environment. There's one argument against that - and that is that so far I haven't been able to use high power mode with the Arduino Nano, presumably because the 3.3V regulator in the Arduino is too wimpy. Another Arduino Nano, and a Leonardo I tried just died as soon as you transmitted. I'm pretty sure the Nucleo board I'm planning to experiment with next won't have that problem.

The interface these libraries provide is sending a fixed payload, up to 32 bytes. If you call write with a smaller payload, it is packed with zeros and sent. Also write is synchronous: it waits for an acknowledge from the remote. I guess the idea for the balancing robot is to strip zeros in the response stream, and have a writing thread which sends up to 32 bytes from an input buffer. I think I'll need to work out if There's enough bandwidth to be able to reliably send commands. Perhaps the client could pull commands regularly.

Popular posts from this blog

3D Printer ramblings

Balance Bot V2

Robot arm