2018-11-29, 05:40 PM
Question:
Is there a reason why the buff is set to 128 as below
The reason i ask is because the max buffer size i can send with a nrf24l01 is 32 bytes smaller is better.
the general idea is have the Arduino send nmea to rpi via nrf24l01 when rpi gets request to change state of anchor light send 2 byte code to arduino that then changes state of pin controlling mosfet for anchor light and or some other task like change adjustment for wind vane.
The rpi will receive the nmea and forward it to a port and check state of pin or other request and transmit code to Arduino for action and then go back to receiving.
Is there a reason why the buff is set to 128 as below
Code:
}
char buf[128];
snprintf(buf, sizeof buf, "ARMWV,%d.%02d,R,%d.%02d,N,A", (int)lpdir, (uint16_t)(lpdir*100.0)%100U, (int)knots, (int)(knots*100)%100);
// Serial.println(lpdir*100);
// Serial.println((int)(uint16_t)(lpdir*100.0)%100U);
send_nmea(buf);
The reason i ask is because the max buffer size i can send with a nrf24l01 is 32 bytes smaller is better.
the general idea is have the Arduino send nmea to rpi via nrf24l01 when rpi gets request to change state of anchor light send 2 byte code to arduino that then changes state of pin controlling mosfet for anchor light and or some other task like change adjustment for wind vane.
The rpi will receive the nmea and forward it to a port and check state of pin or other request and transmit code to Arduino for action and then go back to receiving.