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
#51
Got it,

I had to edit .pypilot/hat.conf

replace nokia5110 with jlx12864 and reboot
Reply
#52
(2021-08-08, 05:42 PM)SYWindveer Wrote: As I can't get the display to work, I wonder if the EEPROM is required ( which I don't have yet )

JLX make two versions of this screen.  The EEPROM version stores font data for Chinese characters, so you don't need it.
Reply
#53
Hi. I am trying to enter pypilot files to edit hat.config in order to change the default display, but the files I find in the tree of /usr/local/lib/pypilot3.7 are not writeble. I have installed pypilot through openplotter settings and the autopilot works for me. My aim Is to have the data available on a display fit by SPI to my Rasperry pi4B, too. At the moment I am interfacing the pi on a Mac trough Vnc ssh to have access to the pi desktop. Any help?
Thanks
Francesco
Reply
#54
Which display are you using?

The hat.conf is usually located in ~/.pypilot and so it is writable there.
Reply
#55
Hi! I am trying to build my marine autopilot from scratch using a Raspberry Pi4 B 2G . The arrangement at the moment includes:

-R PI4;
-Arduino Uno ;
-Motor controller PWM DIR drived from the above Arduino Uno board;
-MPU9250 compass;
-Display for debugging fit to the above Arduino Uno Board;
-Display driver ST7735 linked to Raspberry PI.
-Brushed motor drived from the arduino motor controller.

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.
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.

My question is:
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?
2)-Is it possible to change the display commands including an ST7735 driver?
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?
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?

Sorry but I am a beginner in software knowledge .

Many thanks for any help.
Reply
#56
(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.
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.
Why is that? motor.ino should not need significant changes
Quote:My question is:
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?
Which exact display are you using?
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.
Reply
#57
(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.
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.
Why is that?  motor.ino should not need significant changes
Quote:My question is:
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?
Which exact display are you using?
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
Reply
#58
Check the pypilot/hat/gpio.py for which gpio pins are used for buttons.

edit pypilot/hat/ugfx/ugfx.cpp to add a driver for your screen. I would not accept a patch that overwrites the existing driver, you would have to create a new driver which should be easy enough.

The i2c eeprom is not required. It is useful for me, as I produce a lot of hardware, and any changes can be recorded here, so the user does not have to edit the hat.conf file.

the linux framebuffer is a possible output source. If you can get the kernel module which supports your screen working you could avoid writing the driver in ugfx.cpp Sorry it's fbtft not tftfb.

If you have esp32, I believe your display is already supported. So the esp32 communicates over wifi to the raspberry pi and acts as a control interface.
Reply
#59
Hi, Sean. Many thanks for your tricks. I am now continuing with my hardware arrangement trying to implement the keypad function, that Is now my main issue. About the display , if I won’t success in using my various displays, I ‘ll eventually buy a Jlx12864 one or go ahead using an esp32 ( I have a lot in my store) . As said, however, I have to work extensively to understand how and if my hardware/software system that includes an Arduino Uno driving a brushed 12 V motor trough a PWM DIR 20A motor driver , could operate as a valid autopilot. I hope in your kind assistance if I would have to face unsolvable troubles.
Best regards
Francesco
Reply
#60
(2020-11-16, 07:01 PM)Andreas29 Wrote: Hi,

tried to use an other LCD display this day but I was unsuccessful.

Use a jlx12864 with spi like the Nokia 5110.
Try to bring it up to work with a raspberry pi zero with tinypilot image from 27.10.2020
Nokia 5110 works, the other not.

There is a (eep)rom on the controller pcb. Do I have to connect some of the pins from this with the tynipilot?
The technical description from the factory is very poor. 

Is there something I have to change in the config-files of tinypilot or in the programs itselfs running on the pi zero(where?)
The connections are labeled a little bit different compared to the Nokia display but this is not the problem.

Best regards

Andreas

Hi, Andreas. I am trying to build a pypilot system on the base of your arrangement, using a RPI 4B instead of a RPI Zero. My intention is to replicate a keypad as in your arrangement using buttons to select the commands on Opencpn. My issue is how to modify the pypilot software in order to operate by the buttons keypad. I saw your schematics but I have no access to the pypilot software configuration appropriate to work by the keypad. The image of your software created on Raspberry Zero doesn't boot on my RPI 4B. So, could you give me some tricks or eventualy tell me which files should be modified or investigated to solve my problem?
I hope you can help me for this project.
I thank you very much.
Best regards

Francesco
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)