Control Pascal Tutorial

This is a new tutorial started Aug. 2015 (also linked on the wiki page). Our goal is to develop a tutorial that a child (ten years old?) or an engineer (who hasn't studied or done any programming) can use to get started with Free Pascal. We've done this already for about fifteen years (for electronics and Basic) using the Parallax What's a Microcontroller kit (you can read the PDFs here). New! We hope to combine the Basic Stamp kit with the least expensive PicoScope so students can "see" some of what is happening! This recent article shows how to use a scope to "see" Arduino timing. We have another page here (PicoScope), though it isn't for beginners.

We've also used an easy tutorial to get started on Arduino, and done similar things to show how to get started with Python for CNC work (ask if you'd like to see that).

New Oct. 2017: The SparkFun Inventor’s Kit has a very nice 88 page PDF (can also be viewed online)!

FreePascal From Square One Vol1 (rev 10/27/2016 279 page 2.9 MB PDF) is a great introduction to programming (Part 1) and to the core of Pascal (Part 3).  With the small distributions available below you can put off installing anything (Part 2) until later.

A corrected table of contents for the PDF above
Introduction: How This Book Came About. . . . . . . . . . . 7
Part 1: The Fundamental Ideas of Programming . . . . 11
 1. The Box That Follows a Plan . . . . . . . . . . . . . . . . . . 13
 2. The Nature of Software Development . . . . . . . . . . . 41
 3. The Secret Word Is “Structure” . . . . . . . . . . . . . . . . 67
Part 2: Installing and Using FreePascal . . . . . . . . . . . . 89
 4. Installing FreePascal and Lazarus . . . . . . . . . . . . . . 91 UF
 5. Configuring and Using the Lazarus Environment . 111 UF
Part 3: The Core of the Pascal Language . . . . . . . . . . 123
 6. Pascal Atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 UF
 7. Data and Data Types. . . . . . . . . . . . . . . . . . . . . . . 151
 8. Derived Types and Data Structures . . . . . . . . . . . 181
 9. Controlling the Flow of Program Execution . . . . . 221 UF
10. Procedures and Functions . . . . . . . . . . . . . . . . . . 251

There are only 10 kinds of people in the world. Those who understand binary and those who don’t. Figure out the 6 character English word (programming "string") here using this page, then search for that word and Android and see the first about page to see where the picture came from...

And if you are just starting out, Learning Computer Architecture with Raspberry Pi book (much by the same author as the PDF above) might be the next thing to study (after purchasing a Raspberry Pi).

Here is another recommended tutorial for Pascal.


The first tutorial below introduces the Pascal programming language, file managers, the command prompt, the Free Pascal compiler, and the minimal files needed to compile a program.
Win32 Hello World Tutorial: doc - PDF - web
(we hope to add tutorials for Linux soon!)
New May 2016 - If you are using Windows you can easily try Linux using LevinUx.

The second tutorial requires the DLP-TEMP-G 3-Channel Data/Temperature Acquisition Board.
Win32 Simple Serial Tutorial: doc - PDF - web
(we hope to add tutorials for Linux soon!)

No tutorial (yet) but if you have the DLP-TEMP-G you can monitor a (remote) location (with Internet access) and send emails and/or text messages if the temperature is outside of the limits. Some unfinished code is released here.  We hope to add a new page here that discusses different communication options for remote devices. If WiFi is available you can use an inexpensive Raspberry Pi Zero W. Moving up the ladder you might want to check out the Waspmote which is an industrial Arduino! If you use cellular there are warnings in this message thread.

No tutorial (yet) but you can use fpGUI to see how easy it is to create GUI programs.  You can also see how easy it is to create the Control Terminal GUI program which is useful for diagnosing communication issues!

We'd also like to add a tutorial for programming the Teensy (a complete USB-based microcontroller development system) using Free Pascal.  And if you are really into engineering you should check out our Comedi and PicoScope pages on the home page.

If you are just starting out hopefully something above got your interest, so if you'd like to do more Free Pascal programming you'll need to learn and install an IDE and possibly other tools (text editor, git, svn).

New! Here is a powerful IDE that is simple to install and use: ideU.

New! Here is a new project (Ultibo) for using the Raspberry Pi as a no OS embedded device!

We hope to add more instructions here soon.


Return to home page.

Please share your ideas, comments and suggestions. Thanks!