This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windsensor questions
#2
Question:
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 betterSmile.
 
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.
Reply


Messages In This Thread
Windsensor questions - by ddelorme - 2018-11-27, 04:15 PM
RE: Windsensor questions - by ddelorme - 2018-11-29, 05:40 PM
RE: Windsensor questions - by seandepagnier - 2018-12-02, 03:20 PM
RE: Windsensor questions - by ddelorme - 2018-12-04, 01:16 PM
RE: Windsensor questions - by ddelorme - 2018-12-11, 12:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)