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:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LCD Display
#76
(2022-04-25, 09:56 PM)ironman Wrote: I tested this succesfully in the following way. I installed pypilot on an RP4 openplotter image from github, then ran pypilot at the prompt in one terminal window, pypilot_hat in another window, pypilot_web in a third window. Then I connected a browser to the :33333 port for the hat config screen, and another browser window to the :8000 port for the autopilot screen. I connected GPIO26 to a switch to ground and clicked the switch. In the hat config screen, this was visible and I connected it to the 'engage' function. From then on, I could see that the AP slide in the autopilot screen was switched to 'on' each time I clicked the switch.

So here is a positive scenario that you could replicate. If you succeed, work from here, changing one thing at a time, towards what you want. If you don't succeed, Francesco: post output! Attached mine.

Some notes:
  • something went wrong in the installation from github; I removed the whole git clone directory and started again. Then, pypilot would start (at the prompt).
  • Pypilot nowadays complains a lot about 'autopilot iteration running too slow' but that seems to be the latest fashion; just filter the message (e.g., run at the prompt: pypilot | grep -v "autopilot iteration running too slow")
  • the test was done without motor controller or imu
  • to get pypilot_hat running I had to set pi:ir to false in the hat.conf. At first, this file is not present but it is when you run pypilot_hat a second time.
Good luck!

Hi, you are very kind. You are encouraging me in proceeding on my attempts. So, if i'I am right, I would not need an LCD or hat device to operate a keypad and I am trying to check through the steps you kindly listed above. However I have to solve some problems related to the lack of connection to the pypilot server in browser remote mode. I would report below some outputs in order to check which are my essential issues.
ps. I have installed pypilot as a plugin through Openplotter settings and not from github. Is it a fundamental difference?
Many thanks for your kind assistance. 


wifi access point: wlan9
wifi client: wlan0 
dnsmasq (dhcp-server): running
hostapd (AP): running
dhcpcd: running
avahi-daemon: running
IP address
wlan0 192.168.1.181
wlan9 10.10.10.1

GPIO (pigpiod) (server)
TCP openplotter.local:8888
TCP 192.168.1.181:8888
TCP 10.10.10.1:8888

Pypilot server (server)
TCP openplotter.local:21311
TCP 192.168.1.181:21311
TCP 10.10.10.1:21311

Pypilot Signal K output (client)
UDP openplotter.local:20220
UDP 192.168.1.181:20220
UDP 10.10.10.1:20220

Autopilot browser controller (server)
TCP openplotter.local:8080
TCP 192.168.1.181:8080
TCP 10.10.10.1:8080

Autopilot browser controller remote (server)
TCP openplotter.local:33333
TCP 192.168.1.181:33333
TCP 10.10.10.1:33333

Pypilot NMEA 0183 output (server)
TCP openplotter.local:20220
TCP 192.168.1.181:20220
TCP 10.10.10.1:20220

VNC Remote Desktop (server)
TCP openplotter.local:5900
TCP 192.168.1.181:5900
TCP 10.10.10.1:5900

Signal K - Admin (server)
TCP openplotter.local:3000
TCP 192.168.1.181:3000
TCP 10.10.10.1:3000

Signal K - NMEA 0183 output (server)
TCP openplotter.local:10110
TCP 192.168.1.181:10110
TCP 10.10.10.1:10110

pi@openplotter:~ $ pypilot_hat
have gpio for raspberry pi
no lirc available
have gpio for raspberry pi
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
assuming original 26 pin tinypilot
loading config file: /home/pi/.pypilot/hat.conf
config failed: [Errno 2] No such file or directory: '/home/pi/.pypilot/hat.conf'
Using driver default
using glut
no languages 'NullTranslations' object has no attribute 'ugettext'
No hat config, arduino not found
failed to configure buzzer 'bool' object is not subscriptable
connected
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)

Hi, Sean, thanks for your reply. Here they are some outputs. I don't why it failed to enable unit. Is it because it doesn't find the hardware (arduino, hat, lcd)?


pi@openplotter:~ $ sudo systemctl enable pypilot_hat
Failed to enable unit: Unit file pypilot_hat.service does not exist.

pi@openplotter:~ $ sudo systemctl start pypilot_hat
Failed to start pypilot_hat.service: Unit pypilot_hat.service not found.

pi@openplotter:~ $ pypilot_hat
have gpio for raspberry pi
no lirc available
have gpio for raspberry pi
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
assuming original 26 pin tinypilot
loading config file: /home/pi/.pypilot/hat.conf
config failed: [Errno 2] No such file or directory: '/home/pi/.pypilot/hat.conf'
Using driver default
using glut
no languages 'NullTranslations' object has no attribute 'ugettext'
No hat config, arduino not found
failed to configure buzzer 'bool' object is not subscriptable
connected
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)

pi@openplotter:~ $ failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)

(2022-04-24, 01:58 PM)seandepagnier Wrote: The pypilot_hat service reads from the gpio pins as well as many other functions.   So without an alternative script , you will need the pypilot_hat service even if you dont have pypilot hat hardware or arduino.  It typically will try to detect the arduino and if it is not found, proceed without it (and remote control reception)   The usual way to enable services on debian systems is with systemctl:
sudo systemctl enable pypilot_hat
sudo systemctl start pypilot_hat

For debugging you can "disable" and "stop" the service.     If you are able to link the key to the action, does it display the action programmed on localhost:33333?    Does it show a connection to the autopilot?   Is pypilot service also running?

If you can show a screenshot and also maybe the output from running pypilot_hat directly?  Any hints about connecting?

Hi, Sean thank you. Here are some outputs. I don't know why it failed to enable unit. Is it because it doesn't find the hat hardware(hat, lcd, arduino)?


pi@openplotter:~ $ sudo systemctl enable pypilot_hat
Failed to enable unit: Unit file pypilot_hat.service does not exist.

pi@openplotter:~ $ sudo systemctl start pypilot_hat
Failed to start pypilot_hat.service: Unit pypilot_hat.service not found.

pi@openplotter:~ $ pypilot_hat
have gpio for raspberry pi
no lirc available
have gpio for raspberry pi
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
assuming original 26 pin tinypilot
loading config file: /home/pi/.pypilot/hat.conf
config failed: [Errno 2] No such file or directory: '/home/pi/.pypilot/hat.conf'
Using driver default
using glut
no languages 'NullTranslations' object has no attribute 'ugettext'
No hat config, arduino not found
failed to configure buzzer 'bool' object is not subscriptable
connected
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
pi@openplotter:~ $ failed to run web server: [Errno 98] Address already in use: ('0.0.0.0', 33333)
Reply


Messages In This Thread
LCD Display - by Andreas29 - 2020-11-16, 07:01 PM
RE: LCD Display - by Andreas29 - 2020-11-17, 09:03 AM
RE: LCD Display - by rastam4n - 2020-11-17, 06:33 PM
RE: LCD Display - by Andreas29 - 2020-11-17, 09:05 PM
RE: LCD Display - by kaa39518 - 2020-12-06, 09:10 AM
RE: LCD Display - by rastam4n - 2020-11-18, 12:05 AM
RE: LCD Display - by CapnKernel - 2020-11-19, 12:38 AM
RE: LCD Display - by Andreas29 - 2020-11-18, 07:42 AM
RE: LCD Display - by CapnKernel - 2020-11-18, 02:09 PM
RE: LCD Display - by SYWindveer - 2020-11-18, 10:17 PM
RE: LCD Display - by rastam4n - 2020-11-19, 02:01 AM
RE: LCD Display - by Andreas29 - 2020-11-19, 08:11 AM
RE: LCD Display - by Jean-Marc Douroux - 2020-11-20, 04:06 PM
RE: LCD Display - by seandepagnier - 2020-11-21, 04:48 PM
RE: LCD Display - by Onno - 2020-11-24, 03:03 PM
RE: LCD Display - by seandepagnier - 2020-11-24, 11:19 PM
RE: LCD Display - by rastam4n - 2020-11-24, 11:38 PM
RE: LCD Display - by xfactor99 - 2020-11-25, 07:36 AM
RE: LCD Display - by Onno - 2020-11-25, 08:27 AM
RE: LCD Display - by Andreas29 - 2020-11-25, 07:56 AM
RE: LCD Display - by seandepagnier - 2020-11-25, 05:12 PM
RE: LCD Display - by rastam4n - 2020-11-25, 05:40 PM
RE: LCD Display - by seandepagnier - 2020-11-25, 10:15 PM
RE: LCD Display - by Andreas29 - 2020-12-09, 07:34 AM
RE: LCD Display - by seandepagnier - 2020-12-10, 05:45 AM
RE: LCD Display - by Andreas29 - 2020-12-10, 07:41 AM
RE: LCD Display - by seandepagnier - 2020-12-10, 08:07 PM
RE: LCD Display - by Andreas29 - 2020-12-11, 09:12 AM
RE: LCD Display - by Huevo - 2021-03-31, 11:36 PM
RE: LCD Display - by seandepagnier - 2021-04-02, 01:43 AM
RE: LCD Display - by Huevo - 2021-04-03, 02:02 PM
RE: LCD Display - by seandepagnier - 2021-04-04, 12:44 AM
RE: LCD Display - by Huevo - 2021-04-09, 08:32 PM
RE: LCD Display - by ironman - 2021-04-09, 09:51 PM
RE: LCD Display - by Huevo - 2021-04-10, 04:37 PM
RE: LCD Display - by seandepagnier - 2021-04-10, 05:14 PM
RE: LCD Display - by Huevo - 2021-04-11, 10:01 AM
RE: LCD Display - by ironman - 2021-04-11, 10:27 AM
RE: LCD Display - by seandepagnier - 2021-04-11, 03:55 PM
RE: LCD Display - by ironman - 2021-04-11, 09:53 PM
RE: LCD Display - by Huevo - 2021-04-12, 12:43 PM
RE: LCD Display - by xfactor99 - 2021-04-12, 08:49 PM
RE: LCD Display - by seandepagnier - 2021-04-12, 08:19 PM
RE: LCD Display - by Huevo - 2021-04-12, 10:11 PM
RE: LCD Display - by seandepagnier - 2021-04-13, 07:24 AM
RE: LCD Display - by Huevo - 2021-04-14, 02:04 PM
RE: LCD Display - by seandepagnier - 2021-04-14, 03:35 PM
RE: LCD Display - by Huevo - 2021-04-14, 09:22 PM
RE: LCD Display - by SYWindveer - 2021-08-08, 05:42 PM
RE: LCD Display - by CapnKernel - 2021-10-19, 06:01 AM
RE: LCD Display - by seandepagnier - 2021-08-08, 06:32 PM
RE: LCD Display - by SYWindveer - 2021-08-08, 09:10 PM
RE: LCD Display - by F. Scognamiglio - 2022-02-22, 02:39 PM
RE: LCD Display - by seandepagnier - 2022-02-23, 01:00 AM
RE: LCD Display - by fsnew - 2022-03-05, 08:32 PM
RE: LCD Display - by seandepagnier - 2022-03-06, 07:24 PM
RE: LCD Display - by fsnew - 2022-03-07, 01:30 PM
RE: LCD Display - by seandepagnier - 2022-03-07, 07:45 PM
RE: LCD Display - by fsnew - 2022-03-10, 10:53 AM
RE: LCD Display - by fsnew - 2022-04-20, 08:06 PM
RE: LCD Display - by fsnew - 2022-04-06, 08:55 PM
RE: LCD Display - by Max1947 - 2022-04-07, 11:07 AM
RE: LCD Display - by fsnew - 2022-04-07, 11:15 AM
RE: LCD Display - by seandepagnier - 2022-04-20, 11:11 PM
RE: LCD Display - by fsnew - 2022-04-21, 08:17 PM
RE: LCD Display - by ironman - 2022-04-22, 08:01 AM
RE: LCD Display - by fsnew - 2022-04-22, 02:16 PM
RE: LCD Display - by ironman - 2022-04-22, 10:37 PM
RE: LCD Display - by fsnew - 2022-04-23, 09:01 AM
RE: LCD Display - by seandepagnier - 2022-04-24, 01:58 PM
RE: LCD Display - by ironman - 2022-04-25, 09:56 PM
RE: LCD Display - by fsnew - 2022-04-29, 12:27 PM
RE: LCD Display - by ironman - 2022-04-29, 04:05 PM
RE: LCD Display - by fsnew - 2022-05-27, 06:36 PM
RE: LCD Display - by seandepagnier - 2022-04-26, 04:21 PM
RE: LCD Display - by ironman - 2022-04-26, 09:05 PM
RE: LCD Display - by seandepagnier - 2022-04-28, 11:02 PM
RE: LCD Display - by ironman - 2022-04-29, 09:49 AM
RE: LCD Display - by seandepagnier - 2022-05-28, 03:06 PM
RE: LCD Display - by fsnew - 2022-05-30, 11:29 AM
RE: LCD Display - by seandepagnier - 2022-05-31, 10:34 PM
RE: LCD Display - by fsnew - 2022-06-01, 07:58 PM
RE: LCD Display - by seandepagnier - 2022-06-02, 12:20 PM
RE: LCD Display - by fsnew - 2022-06-06, 05:18 PM
RE: LCD Display - by seandepagnier - 2022-06-06, 06:51 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)