HOME      Other material for programmers
MAIN table of contents, Lazarus tutorials

I have notes for translators, if you would add a translation.

While this page is not (yet) available in languages other than English, my main Lazarus Tutorials page is available in many other languages.

Lazarus on Raspberry Pi Programming Tutorials

filename: index-pi.htm

Suggestion: Your browser has a "Find in this page" tool... probably worth using, if you are looking for something specific.

Do you want to know how to do specific things using the free Lazarus programming environment for Linux and Windows?
On a Raspberry Pi, under Raspbian?

This page tries to help!

It does have to be said that in matters Raspberry Pi, I've barely got past my first "Hello World". (This page started August 10th 2018.) But I do know a thing or two about computers, about Lazarus, about Arduinos. (They are very different from Pi's... but some of the things you need to know to use an Arduino transfers across to working with Pi's.

If you are still deciding "Pi? Arduino?", I can help. If you know you want to work in Lazarus, forget the Arduino, though.

I do have some notes about more general Raspberry Pi matters for you. I am a beginner, but maybe that will help me remember to mention some things you won't see elsewhere, because "everyone knows" them?

v v v v v v v v v v
FOR NOW... the next 2 paragraphs are "all" the GOOD STUFF, THE LAZARUS ON PI stuff on this page!!!

The Beef

Even though this page is only hours old, as I write this at 10 Aug 2018, it already has a .zip with the sourcecode of a Lazarus application to turn an LED on and off! It has internal documentation. Basically, it starts from the material at a FreePascal.org page about Lazarus on Pi's, and has a bit or two added to make that material WORK! Worked on my Pi 3 B, anyway. Compiled on Raspberry Pi with he easily installed (just some sudo apt-gets) Lazarus 1.6.2. This all done August 2018

And now... a .zip with the sourcecode of a Lazarus application to read the state of one of the GPIO pins. I.e. how you read inputs. It has internal documentation. Again, it starts from the material at a FreePascal.org page about Lazarus on Pi's, and has a bit or two added. Worked on my Pi 3 B. Compiled on Raspberry Pi with he easily installed (just some sudo apt-gets) Lazarus 1.6.2. This all done August 2018

FOR NOW... the previous two paragraphs are "all" the GOOD STUFF, THE LAZARUS ON PI stuff on this page!!!
   You have been honestly told!!
^ ^ ^ ^ ^ ^ ^ ^ ^ ^

My pages are browser friendly. Make your browser window as wide as you want it. The text will flow nicely. It is easier to read in a narrow window... and the rest of your screen will be free for your ooBase exercises! Hold down the control key ("ctrl") and press the plus sign, the minus sign, or zero to change the size of the text in Firefox and other good browsers. This and other hints explained on my Power Browsing page!

There are more notes at the bottom of the page about other offerings, my editorial philosophy, a button to email me, and a search engine to help you find things on my site.

I started my main Lazarus pages sometime before September 2011. For many years before that, I had been building my collection of Delphi Tutorials. The things there will also inform your Lazarus work. (I've even made a few links from this, my Lazarus tutorials index, to pages actually in the Delphi collection. (I hope that no confusion is caused?) The overlap between Delphi and Lazarus is so extensive that in some cases I will use a Lazarus tutorial to help Delphi programmers, and vice versa.

If you find discrepancies between what a Delphi tutorial says happens in Delphi, and what you observe in Lazarus, please bring them to my attention, so I can save others hassle?

A word about Pascal, the "foundation" of Lazarus and Delphi.......

(If you are interested in seeing links to others' work, bookmark this page so you can get back to it, and visit my page with links. Of course, almost everything that anyone ever wanted to know is already on the web in Prof. Salmi's superb FAQs.... if you can find them!!! These wonderful resources are worth seeking out. 1/2009, they were available here. Fetch tsfaqp50.zip, unzip it, look in TSFAQP.IDX for the FAQ's table of contents.

(Those FAQs seem to move around! There were at ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip, and then at ftp://garbo.uwasa.fi/pc/ts/tsfaqp36.zip. Hiding again? Try searching with Google for "timo salmi pascal faqs". I'm thankful they weren't written by Joe Smith!)

Pascal Tutorials:

Pascal for those who know Basic... Some notes from me for those who know Basic, and who haven't done much Pascal.

Making it work... Help with debugging.. and on preventing the need for it.. Also useful to Delphi programmers.

Editorial Philosophy

I dislike 'fancy' websites with more concern for a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive site WITH content deserves praise... as long as that pretty face doesn't cost download time. In any case....

I am trying to present this material in a format which makes it easy for you to USE it. There are two aspects to that: The way it is split up, and the way it is posted.

The way it is split up...

I have tried to split it up into 'bite-sized' pieces, and to indicate which pieces are basic and of general importance, and which address more specific issues which also happen to be complex, or require understanding of more fundamental issues. In other words, I try to show you how to walk before worrying about running.

The "Levels" into which the material is split is meant to help you find what you need as follows.

Things that are reasonably simple, or of general significance, or depend on few other concepts are in the lower levels. If a tutorial deals with complex or esoteric subjects, it gets assigned to a higher level. If you need to understand some basics before a tutorial will make sense to you, it goes in a higher level. If you have no experience, start with the low "level" tutorials. If you decide to jump in at a more advanced level, and things are not clear, it might be an idea to skim the topics in "lower" levels, if only to learn about my way of expressing the concepts. See also, below, the 'difference' between Delphi and Pascal.

The way it is posted...

For most readers, using the material online is your best bet. That way, you get the benefit of any updates to a page. However, that isn't always convenient. If you don't already have an HTML capable wordprocessor, load the free OpenOffice. It Really Does Work. Alternatively, you can save the pages from a browser, and re-load them to the browser from your hard-disc later, off-line.

If you choose to capture the tutorials for off line use, including editing for your own purposes, I would suggest that you create a folder for the tutorials so that you can retain my filenames with no risk of clashes:

Filenames: I've tried to be organized: Names start "Lt" for "Lazarus Tutorial". Next is a digit, for the level, then I've used letters one after the other, e.g. Lt1a, Lt1b, Lt1c. The letter doesn't mean much... it just shows when I got around to that particular topic! Sometimes the filename will have an uppercase "N" after the digit, e.g. Lt1Na, Lt1Nb, Lt1Nc. That is to indicate a "new" tutorial. If there is no "N", the tutorial derives from a Delphi tutorial I wrote some time ago. E.g. LT3r.htm would be a Lazarus version of my Delphi tutorial "Dt3r.htm".

Please remember the material is copyright. (TK Boyd, 2011 and later) The procedures above are suggested only for convenient personal use of the material, however, also....

Feel free to use this information in computer courses, etc, but a credit of the source, quoting the URL, should be present. If you simply copy the pages to other web pages you will do your readers a disservice: Your copies won't stay current. Far better to link to these pages, and then your readers see up-to-date versions. For those who care- thank you- I have posted a page with more information on what copyright waivers I extend, and suggestions for those who wish to put this material on CDs, etc. (There is at least one prison using the material for inmate education. I do understand that situations exist where an internet connection isn't possible!)

Speaking of giving credit where due... the following was a great help to my own programming: 'Borland Delphi How-To', from the Waite Group, by Frerking, Wallace and Niddery, ISBN 1-57169-019-0. Its approach suited my needs, and helped inspire the form of these tutorials: Most are self-contained explanations of how to accomplish a specific task, or use a particular component of the language.

The relationships between Lazarus, Delphi and Pascal....

In the beginning, there was Pascal, even before there was Windows. Gasp. A wonderful company, long deceased through excessive hubris, called Borland did a great deal to move the computer revolution forward with some wonderful products, notably Turbo Pascal. And they supported the educator and hobbyist.

Then Windows came along. And not long after, Borland created Delphi... sort of "Pascal for Windows".

Delphi used to be available to hobbyists and educators. Much less available today. But that's okay, because the Open Source movement, which has accomplished so many wonderful things, has given us Lazarus.... sort of a "free Delphi".

You can't just recompile a Delphi project with Lazarus, but if you know how to program with Delphi, you can do many of the same things with Lazarus... and your application can be ported to Linux, too! So Lazarus is sort of a free Delphi and Kylix.

Lazarus and Delphi

Lazarus and Delphi are based on Pascal. They are for creating applications for Windows, using Pascal.. with a lot of enhancements. If you are very new to programming, you might make progress faster if you start with a non-Windows Pascal. There are free ones around, details of one can be found in my free Pascal tutorials, which I would commend to Delphi users with little experience with Pascal. (The one I recommend, freepascal, is the "engine" that underlies Lazarus.)

In the tutorials here, you should find all you need for Lazarus programming. However, even if you never intend to program for anything other than Windows, if you are new to programming, looking at some of the low level Pascal tutorials might help you to grasp important ideas for your Lazarus work.

(A version of the following note appeared at my Delphi site in May 2007) Kylix is a product Borland brought out years ago. It was a "Delphi for Linux". You take something written in Delphi (or write something from scratch, using the same skills), run it through the Kylix compiler, and, Hey! Presto!... You get an application to run under Linux.

I had hoped that Kylix would thrive, but it seems moribund. But Lazarus, oh please, seems to be the answer for those of us thinking that we need to move to Linux.

And, lastly, now for something (almost) completely different: Want a bit of fun? If you have the excellent, free, Open Office installed on your Windows or Linux machine, you can write applications similar to many of the applications in this tutorial! I've produced a little demo, consisting of a single "document" for Open Office's wordprocessor, "Writer". If you have Open Office on your machine, and download my demonstration, you will see a "page" of "wordprocessor" material with a button, an edit box, two spin boxes, and some labels, for output. You will see text manipulation, message boxes, and arithmetic. Almost like something created with Lazarus or Delphi! Fun! (The details of how the controls were made "live" are also given.) The demo was written for Open Office version 2.

   Search this site or the web      powered by FreeFind

Site search Web search
Site Map    What's New    Search

The search engine is not intelligent. It merely seeks the words you specify. It will not do anything sensible with "What does the 'could not compile' error mean?" It will just return references to pages with "what", "does", "could", "not".... etc.

In addition to the tutorials for which this page serves as Table of Contents, I have other sites with material you might find useful.....

Delphi Tutorials (mentioned above).
Tutorials about the free database supplied with Open Office.
Some pages for programmers.
Using the parallel port with programs written in Delphi.

If you visit 1&1's site from here, it helps me. They host my websites, and I wouldn't put this link up for them if I wasn't happy with their service. They offer things for the beginner and the corporation.

Learn more about 1&1 Web Hosting

Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run a Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages.

And if you liked that, or want different things, here are some more pages from the editor of these tutorials....

Click here to visit the homepage of my biggest site.

Click here to visit the homepage of Sheepdogsoftware.co.uk. Apologies if the "?FrmTut" I added to that link cause your browser problems. Please let me know, if so?

Click here to visit editor's pages about using computers in Sensing and Control, e.g. weather logging.

To email this page's editor, Tom Boyd.... Editor's email address. Suggestions welcome!

Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes. There were two "unknown attributes" in Google+ button code. Sigh.

Why does this page cause a script to run? Because of the Google panels, the code for the search button, etc. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....