The arduino programming you need to work with the nrf24L01 module is terrible. By this I mean awfully complicated programming which tends to turn you off to programming altogether.
I was introduced to simple programming with the Sinclair zx81 computer. This used a simple programming language. Programming computers has gone downhill since then. I used the zx81 to run many different automated systems.
Anyway I have kept up to date by using arduino and have now finished many sketches(programs) in that language that have been loaded onto a Atmega 328p microcontroller. These I made very simple 1 page sketches by using mathematical equations.
Anyway I am going to continue the theme of simplicity in programming and you can't do that with the nrf24l01module.
I have found a " emax tiny 2.4ghz 8ch mini sbus output rc receiver compatible fr sky d8 mode". Not sure what all that means but the important point is this module has only 3 pins 5v,G and a data pin just like a 433mhz receiver. I suspect the gogglygook means pwm coding. In which case you can use the PulseIn function of arduino in the sketch to measure pulse length in transmissions on the 2.4ghz frequency.
The sbus output may be a problem for arduino.
Anybody got any suggestions for the decoding of 2.4ghz transmissions for rc model cars using the emax tiny?
The emax receiver is compatible only with a particular type of RC transmitter, and all the ugly details are hidden from you. There is essentially no possibility that it could be used with any other type of RC transmitter. Radio transmission protocols are all rather complicated and in many cases are proprietary.
For a beginner, there are much simpler approaches, for example Bluetooth or 433 MHz UART serial radios. They act like wires connecting two serial ports, so your job is very simple.
Use Serial.print() to send a message. Study the Serial Input Basics tutorial to learn how to receive and interpret that message.
Hi Peter,
first of all thank you for giving me a headsup about sbus-RC-receivers.
I did know that they exist and how the basic principle works but never looked into it closer
because all my RC-planes are equiped with "classical" receivers where each servo needs its own three wires.
Now that I have seen that there is a SBUS-library I will buy such an sbus-receiver and a taranis transmitter and start experimenting what distances a bridgeable with such a system.
which wireless technology can be used depends on the distance you want to bridge wireless.
For 20m something with 2,4GHz and small power works good.
For a distance of 100m modules that use 433MHz and have 100mW power will work much better than a 2,4Ghz tranceiver
Fullrange-2,4GHz transmitters normally used for flying bigger RC-planes (which can be 500m away from you) are indeed a possability for greater distances.
Google is always worth a 5-minute search.
I did find a library for decoding sbus-signals like this emax tiny 2.4ghz 8ch mini sbus output rc receiver compatible fr sky d8 mode" uses
You wrote that you want your programs to be as simple as possible and one page short.
and that you dont want ti use a library
well the sbus-demo-code is 13 lines short
here is the stripped down version without comments
#include "SBUS.h"
SBUS x8r(Serial1);
uint16_t channels[16];
bool failSafe;
bool lostFrame;
void setup() {
x8r.begin();
}
void loop() {
if(x8r.read(&channels[0], &failSafe, &lostFrame)){
x8r.write(&channels[0]);
}
}
and here with comments
#include "SBUS.h"
// a SBUS object, which is on hardware
// serial port 1
SBUS x8r(Serial1);
// channel, fail safe, and lost frames data
uint16_t channels[16];
bool failSafe;
bool lostFrame;
void setup() {
// begin the SBUS communication
x8r.begin();
}
void loop() {
// look for a good SBUS packet from the receiver
if(x8r.read(&channels[0], &failSafe, &lostFrame)){
// write the SBUS packet to an SBUS compatible servo
x8r.write(&channels[0]);
}
}
So please explain to me what is the reason for you to avoid using libraries?
best regards Stefan
petercl14:
Anyway I am going to continue the theme of simplicity in programming and you can't do that with the nrf24l01module.
I dont see why not, for instance the processors used in common Arduinos can be programmed with Great Cow Basic. All you would then need for simplicity in programming is to write an easy to use library for the nrf24L01 module.
The complexity you refer to for programming an nrf24L01 is common for a lot of radio type devices at the low level. The use of these devicec is usually simplified by someone producing an open source library.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.