Flying a drone with RC commands from a Teensy - anyone done this? Need help.

Status
Not open for further replies.

kdharbert

Well-known member
There is a project with code that supplies RC control commands to drones from an NRF24L01 here:
https://github.com/goebish/nrf24_multipro

I want to be able to use a Teensy 4.1 to run it, but the project is based on an Arduino Uno and software SPI.

There are already a lot of compatibility issues with the drones themselves, and now there is the added mess of the hardware port.

Questions:
1. Any best practices regarding switching to hardware SPI on Teensy?
2. Has anyone ever used this code base before on an Uno?
3. Has anyone ever tried to use this code base with a Teensy?
 
I put some more work into converting the project below for compatibility with Teensy 4x.

It is made for Arduino Uno and uses both RF24 and bitbanging for SPI communication with an NRF24L01. The RF24 portion is working with Teensy4.1, but I haven't been able to substitute the hardware SPI calls into the package such that they work with the NRFL2401.

Many of the calls to the NRF2401 that are executed by the package using the included softspi module, can be substituted with calls from the RF24 module, but not all. The calls that use the softspi module cover the protected member functions of the RF24 module. I can't substitute in protected member functions without going to the trouble of including my own modified version. Any advice on how to proceed?

I suspect that the softspi functions in the package can be adjusted with Teensy-compatible SPI calls very easily for a quick and dirty solution. However, presently, I'm not doing it right. I'm betting a resident expert here can modify this portion easily such that the rest of the calls in the module to softspi functions end up calling hardware SPI functions that work with teensy units. I'm thinking its only a few lines...but again, I'm not doing it right.

Here's the module:
https://milankragujevic.com/control...ible-drone-from-a-pc-using-python-and-arduino
 
I adjusted the RF24 code to make the private functions public. I was then able to substitute all the RF24 calls in and see my drone bind using a Teensy 4.1.
 
Status
Not open for further replies.
Back
Top