Author Topic: Lazarus, Ubuntu Pi 4 and Morse Code  (Read 1623 times)

MrJohn

  • New Member
  • *
  • Posts: 24
Lazarus, Ubuntu Pi 4 and Morse Code
« on: August 05, 2025, 10:12:49 am »
Hi,  this is a request for advice rather than solving a problem.

I want to write a small program to decode Morse Code from a Morse key and display on a screen.  Therefore the requirement is to monitor an IO pin at about 35HZ and decode and display via HDMI,  I think a Pi would be perfect for this?

Do I have to install Ubuntu and Lazarus on the Pi to do this or can I do the development on my PC/Ubuntu/Lazarus?

MrJohn

  • New Member
  • *
  • Posts: 24
Re: Lazarus, Ubuntu Pi 4 and Morse Code
« Reply #1 on: August 14, 2026, 07:52:22 am »
Hmmm,  a year later.  I guess I asked the wrong question here. :-[

cdbc

  • Hero Member
  • *****
  • Posts: 2933
    • http://www.cdbc.dk
Re: Lazarus, Ubuntu Pi 4 and Morse Code
« Reply #2 on: August 14, 2026, 08:34:26 am »
Hi John
Well, all good things come to whom, that waits for them...  :D
On the newest and biggest Pis, people install fpc/lazarus and do their programming directly on the Pi, but with a 4, it'll prolly depend on the amount of RAM you can stuff onto it, it might be a bit cumbersome to program in Lazarus on it...  :P However, fpc + fp (fpc's TUI-IDE) will run pretty well...  8)
Then others have good results with coding, on a lappy or a stationary PC and then transfer the compiled programs to the Pi4 via usb etc. This option is considerably better for your coding-sessions, because of the "more muscles" on said computer.
For the Ubuntu question goes: Does it run lightly and happy on a Pi4?!? If not, you'll prolly be annoyed with it, people tend to be in both camps: 1) Ubuntu installed or 2) Using the Raspbian (or whatever it's called) OS... YMMV  ;D
Now the important part: There are many threads on this forum, about utilizing Pis for this and that, so SEARCH THE FORUM for knowledge and code bits, they come in different shapes and sizes, the projects people build with Pis and pascal...
Your project sounds straight-forward enough to be doable =^
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Thausand

  • Hero Member
  • *****
  • Posts: 600
Re: Lazarus, Ubuntu Pi 4 and Morse Code
« Reply #3 on: August 14, 2026, 11:05:01 am »
what is write cdbc is advice good. More write can find in wiki https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi.

All is depend memory (and storage) that have pi 4. if memory low then is better and make cross-compile.

Have note that many today linux is use wayland and that is give error for lazarus and gtk. Then have use qt or have install xwayland.
A docile goblin always follow HERMES.md

Thaddy

  • Hero Member
  • *****
  • Posts: 19636
  • Glad to be alive.
Re: Lazarus, Ubuntu Pi 4 and Morse Code
« Reply #4 on: August 14, 2026, 12:07:04 pm »
In general morsecode itself has no fixed timing, so I would develop the code for distinguishing between long and short first: use a dft or full fft for that and define ranges for the peaks. There's lots of example code for that.
Note that the wiki for the Pi's seems slightly behind, but if you take the (virtual) base address from the Raspberry Pi datasheet everything still works fine last time I tried.
Any "programmer" that knows only one programming language is not a programmer

 

TinyPortal © 2005-2018