2022-03-07, 01:30 PM
(2022-03-06, 07:24 PM)seandepagnier Wrote:(2022-03-05, 08:32 PM)fsnew Wrote: On my PI I have installed an OpenPlotter+PI software. I have adjusted a motor.ino sketch on arduino so that I can drive the motor controller. The arduino board is linked trough USB to the Raspberry to exchange the data. At the moment the functions are limited only to drive the motor without rudderfeedback, rudder stops, voltage , temperature warnings.Why is that? motor.ino should not need significant changes
Opening Openplotter the AP control seems to work , the pilot is engaged , the compass heading is displayed and moving the sensor compass the autopilot reacts properly moving the motor. However I well know that I have to work extensively on the motor.ino sketch in order to have an acceptable working base.
Quote:My question is:Which exact display are you using?
1)-Having linked to the raspberry , trough GPIO SPI an external display ( even if different from the Nokia and jlx ones listed in the lcd and hat.py files) is it possible to have the data displayed on it as Andreas did, on my arrangement?
Quote:2)-Is it possible to change the display commands including an ST7735 driver?If you can get tftfb working.. then linux framebuffer output is supported. Otherwise you could simply write another driver for your display.
Quote:3)-Fitting in the above arrangement a keypad device and a jlx display , should the openplotter pilot work without any other changes to the files?In theory.. Lets hear what changes you end up needing to make to help improve pypilot.
Quote:4)-Opening the files in /usr/local/lib/pypilot3.7 the lcd.py seems to list the default drivers (nokia and jlx) but in any other file I have found the relative driver commands. Moreover running hat.py and lcd.py the data ( heading, standby) appear on the screen but not on the display ( of course I know the ST7735 driver display is not compatible but if I change it with a jlx one could I have the data displayed on it?There are 4 drivers supported:
nokia5110
jlx12864
linux framebuffer
glut (opengl window mostly for debugging)
You can pass the driver on the command line to use, or edit ~/.pypilot/hat.conf to specify which driver to use. If you changed to the jlx12864, then it will work once you specify this in the hat.conf. My hardware generally contains an i2c eeprom on i2c bus 0 which is programmed with a small configuration file which indicates the hardware attached, the screen type etc. Without this you have to manually edit the configuration file, as these spi displays (unfortunately) have no feedback or way to read data from them and so therefore no way to perform auto detection.
HI. Sean, I thank you very much for your reply. It seems that my hardware arrangement could be developed by me to get a marine autopilot based on a raspberry PI4B and an Arduino Uno to drive a motor controller and I feel encouraged to continue in the project. In the same time it's a chance for me to have confidence with Raspberry and Python softwares environment.
As said I am trying to do working a display 1.8 TFT SPI 128*160 V1.1 ( but I have other displays different however from Nokia 5110 e JLX12864, too) linked through GPIO to my raspberry Pi4 with the aim to get only limited data as already available through your Pypilot software. Moreover I would like to fit a Keypad function by simple buttons to activate the menu commands (Select, +10, -10, up, down as available).
As told I am trying to add or change the jlx12864 driver commands , coding the datasheet command registers for the driver ST7735R that drives my 1.8 TFT display, overwriting the jlx12864 ones. My issue is if that is possible and which files should eventually have to be adjusted. I could also buy new jlx12864 displays too but I would be sure that adding the keypad functions , all could be operate flawless.
My new help from you is about some details of your previous reply:
- Have I to install an i2c EEprom ? Could you kindly give some tricks for that?
-How does linux framebuffer work? Could it work on my 1.8 TFT ST7735 display too? What does tftfb working mean?
Excuse me if my questions denote bad knowledges of base software matters, I would not like you have to spend more time to reply to my post.
Best regards
Francesco