[fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

Bo Berglund bo.berglund at gmail.com
Sun Apr 2 10:13:13 CEST 2023

On Sat, 1 Apr 2023 20:30:02 -0400, Travis Siegel via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:

>Generally, raspberry pi devices connected to other devices will (by 
>default) use python for their programming.  The python libs have all the 
>setup and tear down code built in.  You can use C as well, so I see no 
>reason why FPC couldn't be used.  It's probably going to take some work 
>though.  You'll need to either find the appropriate python files, and 
>port them to FPC, or convert the C headers into something pascal can 

I have never used Oython, looked at it a while back and was taken aback by the
idea that whitespace in source code has meaning....

>I've never made the attempt to do this, though now that you 
>bring this up, I might just take a crack at it.  Up until now, I've used 
>C (since I'm not a fan of python) when talking to raspberry connected 
>devices, but I'm pretty sure I've seen posts where folks were using 
>other languages such as PHP or Java to talk to the pi devices, so those 
>header files have most certainly been ported to other languages. It's 
>possible someone already did the pascal port, though I can't point to 

I wonder if Chat-GPT can help here?
Never tried it myself but my daughter tells me it can do things google cannot.

>I've not been messing with my raspberry pis for the last year or 
>so because of moving, and things are just now getting back to normal (I 
>hate moving), and I need a new pi anyhow, so perhaps I will get back to 
>it this year, but the reason I say this, is because I've not kept up 
>with the pi forums, so I don't know what's happening around the pi 
>ecosystems lately, which is why I can't answer the question directly, 
>though it's certainly more than possible.

If you have missed it the RaspberryPi Foundation is one of these that have been
hardest hit by the Covid pandemic's disruption of supply lines and semiconductor
shortage! They use state-of-the-art level of silicon for their newer models and
these are the hardest hit by the manufacturing problems in Taiwan.
Expected resume of deliveries second half of 2023...
Meanwhile only small quantities of RPi4 devices can be made and are on

Right now there is *no* availability of RPi4 devices for the general public at

Older models may appear in very small batches now and then..

Sometimes you may find a couple of RPiZero W devices for purchase, but then they
are limited to a single item per customer (while stock lasts, which usually is a
day or two).

Here is a RPiForum thread about this dilemma (last page of 16) :

And here is the PiLocator, which tries to keep track of where there are actual
devices to buy:

Except it seems like it is off-line right now, it worked a week ago when I could
find and buy a PiZero.

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list