I haven't actually done this yet, but if you're getting a bandwagon going I'd like to join it. I've got a prototype heating controller working well via a bash script, but now want to make it a bit more grown up by porting it to FP. (And I mean FP, not Lazarus; it won't need any window-based front end).

I want to SSH into the remote Raspi and use the Raspi-based Lazarus GUI as a reporter and controller. The aim is to self-learn Raspi and its Linux, prior to adding such things to our existing wildlife school-demonstration activities. For that reason, I want to try to keep the cost down, the Raspi may seem cheap enough but adding third-party peripherals makes prices soar.

The only code I can turn up in Lazarus without using external ADC, or 1-wire master controller chips, which I want for reasonably consistent and accurate temperature measurement, is for ON/OFF operation, which I also want to use, and that latter bit seems easy enough - <http://elinux.org/RPi_Low-level_peripherals> .

WIRINGPI, written in C, seems popular around the forums. It has Arduino-like coding but there is an FPC wrapper and example LAZWIRINGPI, for that, for FPC/Lazarus users, which is self-explanatory.

There have also been a few tutorials on web-based Javascript applications.

I have Arduinos and know how to link them in, thanks to some excellent tutorials around these forums, if I use LM35 probes, but for this exercise I'd prefer to go the direct 1-wire route if ever I can find out how to do it. Meantime, I am using stand-alone Arduinos and broadcasting barbecue controllers, without the remote visuals.

Hope this rambling info may have been of some use to you.

A possible alternative might be to use a more sophisticated ARM-based MK802 version IV, with its built-in facilities, one of which is arriving soon. I propose to attempt to repeat the exercise using it, though the price might put it beyond the reach of local schoolkids.

If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries

OK, let me lay out where I am. Or at least where the plan says I am...

I'm installing a heating system, controlled by the Pi. I have DS18B20 temperature sensors connected to the Pi's GPIO4 (WiringPi 7). That pin is hardwired for the DS18B20, but you can daisy chain several (they are each addressable by their unique ID numbers). Enough DS18B20s will let the controller collect readings of room temp, solar panel temp, hot water cylinder etc.

Having collected the data the FP program does its logic, and uses a Sainsmart relay board to switch on various mains devices - mostly pumps for different bits of the heating circuit.

I have a prototype wired up on a breadboard (with 7 leds where the relay will go) and a little bash script to record the room temperature, switch on the circuits as required, and display a nice little text-only screen to show ambient temperature and what's currently on/off. I can SSH into the Pi to set it up and modify it, and I'm going to provide a webpage (served up by a Lighttpd server on the Pi) to give me a means of checking and setting the whole system from any device on the network - even my Android smartphone.

All very neat. Clearly bash is OK for proof-of-concept but a little too klunky for production use, so I want to switch to FP. And I say FP not Lazarus because I don't want the processing overhead of windows, buttons, graphic object event handlers etc for a program that just sits and gets on with its job quietly. FP is perfect for it (I used to code in Turbo Pascal back in the last century).

Total cost of the bits (apart from the Pi) is about £20 so far, including 10 DS18B20s from China. I don't plan on spending much more.

BTW I am also hoping to develop this into something I can use for teaching 11-year olds at school.

I'm installing a heating system, controlled by the Pi. I have DS18B20 temperature sensors connected to the Pi's GPIO4 (WiringPi 7). That pin is hardwired for the DS18B20, but you can daisy chain several (they are each addressable by their unique ID numbers). Enough DS18B20s will let the controller collect readings of room temp, solar panel temp, hot water cylinder etc.

Fine.

I have a prototype wired up on a breadboard (with 7 leds where the relay will go) and a little bash script to record the room temperature, switch on the circuits as required, and display a nice little text-only screen to show ambient temperature and what's currently on/off. I can SSH into the Pi to set it up and modify it, and I'm going to provide a webpage (served up by a Lighttpd server on the Pi) to give me a means of checking and setting the whole system from any device on the network - even my Android smartphone.

Seems, like me, your hardware is sufficiently organised.

All very neat. Clearly bash is OK for proof-of-concept but a little too klunky for production use, so I want to switch to FP. And I say FP not Lazarus because I don't want the processing overhead of windows, buttons, graphic object event handlers etc for a program that just sits and gets on with its job quietly. FP is perfect for it (I used to code in Turbo Pascal back in the last century).

I started with Dartmouth Basic, then to Forth, via compiled Basic to Delphi. PDP8's, homebrew 8085 kits, then Sinclairs, now use other-peoples bright ideas for PCs and now Linux.

Your bash code might be a help.

BTW I am also hoping to develop this into something I can use for teaching 11-year olds at school. Does it look like we are treading a similar path...?

Very similar paths, my primary one is for egg incubators, for endangered-species rehab and release, hence the need to measure temperatures and control rotator motors and heaters. A second need is for humidity control (increasing it) and producing warm vapour.
The hardware bit seems simple enough, and the use of GPIO pin 4 a given. We're also agreed on the use of DS18B20s for the 1-wire temp measurement. I am using solid-state relays in the Arduino scenario, but expect no real problems using Raspi's 3.3v GPIO pin ON/OFFSs to drive them. What is currently holding me back is lack of detailed fpc/Lazarus GPIOpin4 coding for the 1-wire initiation, reads, writes, and clearance. The fpsystem.pas code from 'used' unix and baseunix units also seems necessary (unless someone knows better) to effect this.

If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries

From 2006-ish, I have stumbled across a 'tutorial' for using 1-wire devices to measure temperature using a DS1820, written in Delphi4, and for the Windows version (what other sort was there in those days?). The author refers repeatedly to programming errors he has made, and for corrective work needing to be done, but in the absence of anything demonstrably better, when combined with the elinux.org GPIO low-level peripherals pages, may prove to be a potential gem. <http://sheepdogguides.com/dst2a.htm>

If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries

The good folks from Cambridge University have already been there and done that, with direct drive from the GPIO, no need for master-controller, using w1_gpio et al, for relatively short but adequate cable lengths between the Raspi and the probe tip.
An excellent tutorial from them at:-
<http://www.cl.cam.ac.uk/freshers/raspbe ... ndix-three>
Q.E.D.

enjoy! I am!

If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries

I know others did work for many years on Linux + Delphi, and Lazarus is "just" a "free Delphi".

With PCs, instead of using a bit on a bank of GPIO pins, a lot of the "work" was done with an adapter. They came in various "flavors"... for serial port, parallel port and USB. USB device costs about $25.

Would love to hear that Lazarus + TMEX work well on a Raspberry. And which adapter you found suitable.