-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misinformation #29
Comments
Can u show us some come ? Sometimes there is something not related to the |
arduino code. (deleted the SPI RF24 and RF24Network includes) const uint16_t master = 00; const uint16_t this_node = stem_a; byte out_payload; bool previous_eight; void setup(void) { pinMode(8,INPUT_PULLUP); pinMode(A4,OUTPUT); unsigned long currentMillis = millis(); void loop() { if((currentMillis - previousMillis) > light_time) { void RF_in() { void RF_out(byte message, byte to) { //bool light_blue_on() { //} void sleep() { void check_input_states() { if(seven != previous_seven) { if(six != previous_six) { if(five != previous_five) { RPi code (python) #!/usr/bin/env python import time network = RF24Network(radio) this_node = 00 other_node = 01 interval = 2000 #ms - How often to send 'hello world' to the other unit millis = lambda: int(round(time.time() * 1000)) radio.begin() while 1: RPi (c) /* /**
#include /**
// CE Pin, CSN Pin, SPI Speed // Setup for GPIO 22 CE and GPIO 25 CSN with SPI Speed @ 1Mhz // Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz // Setup for GPIO 22 CE and CE1 CSN with SPI Speed @ 8Mhz RF24Network network(radio); const uint16_t master = 00; const uint16_t this_node = master; unsigned char out_payload; const unsigned long interval = 2000; //ms // How often to send 'hello world to the other unit unsigned long last_sent; // When did we last send? struct payload_t { // Structure of our payload void RF_in() { int main(void)//int argc, char** argv)
}
} |
I can't see something that will define the problem .
|
ok thanks, is there a way i can insert code because its hard to read? |
What u mean insert code ?
|
"I've released that the arduino still believes that the message was received two or three transmissions after I've stopped the RPi program" The RPi is not even sending anything in the code you posted. It also looks like the arduino is sending data very rapidly. The radios have three 32-byte buffers, so if you fill them up, it will take three reads to empty them. See https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks for help inserting code. |
What I meant by that statement was the arduino stated the message was received by the RPi when testing the bool statement (bool ok = network.write(header,&message,sizeof(message));). If its the radios that have the 3 32-byte buffers why doesn't this happen when sending to another arduino? Sorry if it doesn't make sense Im still learning and don't understand everything. |
Well, you can't really 'stop the program' on an Arduino, you can only power it off, along with the radio. Example:
Test to prove if this is the case or not:
|
Thank you, the RPi doesn't acknowledge any received payloads when radio.stopListening() or radio.powerDown() is used. I'll use that before exiting. Earlier you said " It also looks like the arduino is sending data very rapidly." Are you referring to date rate or frequency of sends? And is it more reliable to use a lower date rate and smaller payload size? |
I am referring to frequency of sends. On top of that . If you have linear code ( straigt execution line ) the. As
|
The sends will not be so frequent as its monitoring doors and turning Will a lower date rate eg. 250kbps significantly slow down a linear code On Thursday, December 4, 2014, Georgios Spanos notifications@github.com
|
I was also referring to frequency of sends. Using slower data rates will noticeably affect response times, since transmissions at 250Kbps will take four times as long as with 1Mbps. I haven't done much specific testing regarding payload size vs reliability, but the network DEV library uses dynamic paylods, so smaller payloads should go through faster. The RF24Network library also has its own buffers, so will store up to 5 additional payloads in addition to the 3 stored by the radio modules (this code in dev needs cleanup). |
This discussion gives me ideas about parallel programming. I will check the
|
The dev RF24Network library is it working? I am only transmitting one byte and the dynamic payload sounds good including the additional buffer. |
"The dev RF24Network library is it working? " |
Ok fair enough, |
hey,
I have been playing around with transmitting back and forth between an arduino(address 01) and RPi(address 00, using RF24Network library in both c++ and python wrapper) using my code. I've released that the arduino still believes that the message was received two or three transmissions after I've stopped the RPi program. It does not depend on time either as I have closed the RPi program waited a minute and observed the same results. The amount of misinformed receives haves the same result no matter how long in between transmissions from arduino after closing RPi script (tested up to 10 seconds in between sends). This doesn't happen when sending message from arduino to arduino.
The text was updated successfully, but these errors were encountered: