Forum > Embedded
LCD Displays on Pi or Beaglebone
jcdammeyer:
A number of years ago I bought a 4DCAPE-43T for the Beaglebone Black. I think Rev 7 Wheezy at the time.
https://www.mouser.ca/datasheet/2/451/en4-4dcape-all_datasheet_r_1_1-1627121.pdf
Support from the company was really not there and I think it's been discontinued.
It's always been my plan to use Lazarus for this or other LCD displays that are non-HDMI as say instrument panels or information panels. The trouble is in many cases, like for this one, they configure the cape display as the user interface. But a full Linux screen isn't wanted nor all the borders etc.
I would rather develop the Lazarus application to run on the Pi or Beagle and create a frame that has all the stuff I want and has the same dimensions as the LCD display. So if it's 320x280 then that's the size of the frame and all the components are inside that. If it's an SPI based LCD display then a call to paint should theoretically be able to grab what is essentially an array 320x280 of say 16 bit or 24 bit RGB values.
And dump it out to the display. In the case of the Beagle Bone I believe this display can be directly addressed through the device ports but from an abstract perspective the starting point needs to be painting the frame or portions of the frame. Speed can be increased by only painting the button that's been pressed. As in only that small chuck of screen image needs to be transferred.
Is there already an infrastructure in place for this sort of thing? I really don't want an HDMI 800x600 screen to the the Linux User Interface screen.
So which subject heading under Forum here is the best place to discuss this? It requires knowledge of Beagle/Pi hardware (SPI devices for example) and the painting of parts or whole of a frame. In fact the Beagle or Pi might even be of the headless type that doesn't have a user display. ie. command line. But still I'd like the graphical features that Lazarus provides rather than a GTK or other tool box. With those we lose what Lazarus gives us for program development.
Thanks
John
jcdammeyer:
Perhaps I can add onto this a bit. The two attached screen shots show two images I'd like put onto an LCD display. The one with the standard window border is a python program. The chart is a Lazarus program. Needless to say the Lazarus once was simple to make.
The Python uses the TKinter library but won't run from an SSH session because there is no graphics screen. Haven't tried the Lazarus one but I suspect it will be the same.
So how does one run a Lazarus program and make use of all the excellent components from a command line that won't support graphics. But captures the graphical image to send out via SPI or direct to ports on the processor.
And if this is the wrong subforum please point me in the right direction.
DonAlfredo:
https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi#PXL_.28Platform_eXtended_Library.29_for_low_level_native_access_to_GPIO.2C_I.C2.B2C.2C_SPI.2C_PWM.2C_UART.2C_V4L2.2C_displays_and_sensors
jcdammeyer:
--- Quote from: DonAlfredo on July 18, 2020, 08:06:40 am ---https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi#PXL_.28Platform_eXtended_Library.29_for_low_level_native_access_to_GPIO.2C_I.C2.B2C.2C_SPI.2C_PWM.2C_UART.2C_V4L2.2C_displays_and_sensors
--- End quote ---
Thanks! I'll play with that a bit.
John
jcdammeyer:
I captured the Mandelbrot example and compiled it on the Beagle and PC with Lazarus and made the small changes required to compile it with Delphi 10.3.3
Running it from the command line on the beagle in a console window creates the form and draws the figure. I think if I wanted that output on a say a small adafruit lcd SPI bus LCD display then I'd have to override the paint method to send the the imagebuffer canvas out.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TMainForm.FormPaint(Sender: TObject);begin Canvas.Draw(0, 0, ImageBuffer);end; But running that same application from an SSH terminal
debian@ebb:~/lazarus/Mandelbrot$ ./mandelbrot
(mandelbrot:11924): Gtk-WARNING **: cannot open display:
Which suggests that even if I did change paint to deal with hardware a command line version of Debian wouldn't even allow the Lazarus application to run.
I did find
https://sourceforge.net/projects/asphyre/
with examples for output to SPI LCD. displays. But then I'm back into the Python etc. world where the graphical objects are placed with coding rather than the convenience of Lazarus.
Is there a solution where FormPaint or Paint or Repaint can be set for custom hardware and still load in a non-window environment? If I plug in the 4DCAPE-43T the HDMI has to be disabled to run it. And I don't want the entire window environment sent to it.
Or am I stuck with not using the 4DCAPE-43T and use a system that has graphical and just doesn't have a USB keyboard/mouse and HDMI monitor connected. And have it start up running the Lazarus app that has paint overridden?
Thanks
John
Navigation
[0] Message Index
[#] Next page