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 heading display
#1
I would like to build a remote compass display using the heading information from my tinypilot .  How can I gain access to that information using wifi?
Thanks for all your hard work, its an excellent job.
John
Reply
#2
There are several ways, depending on what your hardware for the remote display and intended setup is. More details needed for the best suggestion.
Reply
#3
I have built a display for course information using an ESP8266 and a 20 x 4 LCD display. This reads nmea  RMB data from openCPN via wifi. For the heading display I thought openCPN  receives heading information from pypilot so I tried to access it using the HDM sentence from openCPN but that didnt work.  What do you suggest?
Reply
#4
pypilot outputs HDM on port 20220. It can also send HDM to opencpn via signalk. If opencpn receives from signalk it does not output any nmea sentence from it.

So I suggest looking in the opencpn nmea debugger and see if it actually gets HDM. Or maybe you should bypass openpcn and connect directly to signalk with the esp, or even connect directly to pypilot you can get heading that way as well.
Reply
#5
Thanks Sean
I was trying read HDM using UPD. I think I can receive it using TCP. Now making good progress.
Thanks John
Reply
#6
pypilot supports udp for the esp32 wifi remote, but this is pypilot specific data, not nmea. So unless you really need it for latency purposes stick with tcp.
Reply
#7
I now have a ESP32 displaying NMEA HDM from pypilot. The NMEA data is very slow to react to a heading change, up to 20 secs.  The pypilot plugin reacts much quicker, is it possible for me to read the plugin data stream?
John
Reply
#8
20 seconds??

How are you routing the data from pypilot to the esp32? You can use netcat, eg:
nc 192.168.14.1 20220

and see the stream of hdm at 2hz

If you want to get the maximum rate of 20hz, you have to connect direct to pypilot and to get the lowest latency possible I use udp sockets

I support esp32 with the pypilot hat and that is what it uses, it displays the hdm on an lcd screen and implements a wifi remote running micropython so it can use the existing code.
Reply
#9
Thanks Sean, as you can guess I am new to this.
I received the nmea data via a network connection in opencpn.  I will now try to access the data directly from pypilot using netcat. 
Thanks again,  John
Reply
#10
The python scripts work on micropython on the esp32, but if you want raw access using port 23322 and send something like:

watch={"ap.heading":1.0}\n

this is with pypilot 0.2 and newer, with 0.1 version the format is different and you can't specify the rate
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)