Good day! I am doing my project hope anyone can help me with this.
In our case, we have 3 MPU6050 with arduino each and will get the Total Pitch, Yaw, and Roll through LabVIEW and manipulate the data that we need and will serve as our controller. But now that we have done it, we want to transmit the Total Pitch, Yaw, and Roll wirelessly using NRF24l01 to control the servos. If you have any idea how to do it, I would gladly appreciate if you share it with me. Thank you so much!
attached here my main program from this project in labview and the transmitter and receiver file
//TRANSMITTER/CONTROLLER SIDE
#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
const int CE = 9;
const int CSN = 10;
RF24 radio (CE , CSN );
const uint64_t canal[2]= {0xE8E8F0F0E1LL,0xE8E8F0F0E2LL};
int data;
void setup() {
Serial.begin(9600);
radio.begin();
radio.setRetries(5,10);
radio.openWritingPipe(canal[0]);
radio.openReadingPipe(1,canal[1]);
radio.setPALevel(RF24_PA_MAX);
}
void loop() {
// TRANSMIT
radio.stopListening();
while (Serial.available()){
data= Serial.read();
}
radio.write(&data,sizeof(data));
}
//RECEIVER/ACTUATOR SIDE
#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
const int CE = 9;
const int CSN = 10;
RF24 radio (CE , CSN );
const uint64_t canal[2]= {0xE8E8F0F0E1LL,0xE8E8F0F0E2LL};
int data;
void setup() {
Serial.begin(9600);
radio.begin();
radio.setRetries(5,10);
radio.openWritingPipe(canal[1]);
radio.openReadingPipe(1,canal[0]);
radio.setPALevel(RF24_PA_MAX);
}
void loop() {
//RECEIVE
radio.startListening();
if (radio.available())
radio.read(&data,sizeof(data));
Serial.println(data);
delay(50);
}
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
Yup.
LabVIEW could send it by Ethernet to another PC(you could even send it by serial, but over ethernet). By Wifi. By you name it. Lots of ways, in LabVIEW, all outside the scope of the Sensor forum.
However, let's see if anyone else throws in an answer.
Me, I'd be wondering why all the hoops. You're making this complex. You could buy Arduinos with built in Wifi and send data from them to LabVIEW, then LabVIEW to your output Arduinos.
Or, are you stuck with hardware someone's already got, so that constrains your approach? There's an area on this forum for Project Advice/Design, where this might be a better topic.
I am sorry for that, its just the system hidden my post so I posted again another topic. The duplicate topic is deleted now. Thank you and I'm sorry for the inconvenience
It's just that we are required to communicate and use the LabVIEW program in this project and the controller must be wirelessly transmitted using the nrf24l01
Hi, my answer to all this is we have to transmit the controller data to the receiver side using the nrf24l01 because it is required tool for us to use in this project. I hope there is a way through this, thank you
You could follow the NRF24L01 tutorial I linked, and learn to send yaw, pitch and roll angles (one line of comma separated numbers, for example) to the Arduino that controls the servos.
The Simple one way transmission example is all you need, although you would substitute formatted values for the message sent.
Hi, can I ask on how to do it? do you have any available code or tutorial? I am using the arduino library <MPU6050_light.h> to get the Pitch, Roll, and Yaw angles.
I will try to use this concept . Thank you so much in advance!