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
Pypilot control ideas
#5
(2020-02-20, 07:38 PM)seandepagnier Wrote: How did you manage the RF remote?   My solution uses an arduino to sample the receiver and communicate via spi to the raspberry.

I'm using RXB6 connected to arduino as RF received 
My arduino connected to RPI with usb and it's virtual serial port i assigned to kplex in "both" direction mode (because i wanted arduino to receive and parse some NMEA from RPI).
Then i little cheated and made new NMEA sentence intended to manage pypilot that arduino will send to kplex
For example:

$APXXX,ap.enabled,true*05
or 
$APXXX,ap.heading_command,323*0A
and etc...  

So all i did on RPI side is added new node-red flow to receive this NMEA, parse and send to pypilot signalk server
[Image: 158225731844159854.jpg]
with function code
Code:
var th = msg.payload.replace("\$APXXX,","").slice(0, -5).split(",");

msg.payload = '{\"name\": \"'+th[0]+'\", \"method\": \"set\", \"value\": '+th[1]+'}\n'
return msg;


I guess maybe this is not the right way to do such thing... I think that i'm able to just parse serial from arduino in node-red and forward commands to pypilot signalk server (without using kplex).
But in future i hope to replace arduino nano with arduino mega and use it to multiplex NMEA from various instruments and send it to RPI

(2020-02-19, 07:56 PM)Saqqara Wrote: Would you mind sharing your code and more about how it is wired up?

I will try to draw the wirings and describe things... Smile
Reply


Messages In This Thread
Pypilot control ideas - by beholder77 - 2020-02-19, 02:28 PM
RE: Pypilot control ideas - by Saqqara - 2020-02-19, 04:51 PM
RE: Pypilot control ideas - by Saqqara - 2020-02-19, 07:56 PM
RE: Pypilot control ideas - by seandepagnier - 2020-02-20, 07:38 PM
RE: Pypilot control ideas - by beholder77 - 2020-02-21, 05:16 AM
RE: Pypilot control ideas - by kp.sov69 - 2020-02-21, 08:31 PM
RE: Pypilot control ideas - by beholder77 - 2020-02-24, 04:36 PM
RE: Pypilot control ideas - by Zakko89 - 2020-02-24, 12:05 PM
RE: Pypilot control ideas - by seandepagnier - 2020-02-25, 02:35 AM
RE: Pypilot control ideas - by kp.sov69 - 2020-02-25, 11:34 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)