Noob Trying To Find GPIO Missing Link lazarus / 13-General ---------------------------------------------------------------------- Scamper_Neil · 2013-06-12 21:58 Hi, Apologies if i've posted this in the wrong place.....it's my 2nd post, be gentle with me  Brief background.....complete noob at linux, C, C++ &  Lazarus....trying to make a car dashboard with a Raspberry Pi, 10" monitor,  Gertboard & some other electronics 'Stuff'. Basically for Step 1, i've created the Graphical side of the dashboard with Lazarus & all looks groovy. For Step 2, I've had a tinker with the Gertboard & electronic 'thingies', now i can get LED's / push buttons / relays etc.. to work how i need. For my application i need to use GPIO Interrupts, i.e. recieve notification (in lazarus) when a GPIO pin state changes, then change parts of the graphical interface (change label colours & text). For example... when the left hand indicator is switched on the car i can get the GPIO pin state to change, this should ideally be picked up in Lazarus & then change the background colour of the label on the screen to green... (I'm starting out slowly, PWM monitoring of the Revcounter & Speedo is yet to be looked at !)  Due to the graphical overhead size i don't want to start using timer based polling as i'll have no CPU left for screen refreshes & stuff, especially when i've got GPIO pins looking for LH indicator, RH Indicator, Main beam light, Dipped Headlight, Fog Light, Battery Warning Light, Oil Pressure Light etc... . Looked into WiringPi, RPI.GPIO & similar add-ons but most of these are written in either Python, C or C++ & here comes the noob bit......How can i get the returned GPIO state from the C / C++ program into Lazarus, so i can update the Graphical side. ????? If anyone can shed some light on what i need to do it would be appreciated, i've spent the best part of a week googling , reading & drowning in really complex (to me anyway) programming jargon, & i'm still none the wiser.... Cheers in advance, Neil Ideally info pitched at the average 8 year old intellect level would be appreciated.....most of the stuff i've found goes off about Kernel (?) drivers & my tiny mind is slowly getting fried. Given an example to reverse engineer, i can usually work out what to do. ---------------------------------------------------------------------- avra · 2013-06-14 18:01 https://projects.drogon.net/raspberry-pi/wiringpi/functions/ read following info: QuoteInterrupts With a newer kernel patched with the GPIO interrupt handling code, (ie. any kernel after about June 2012), you can now wait for an interrupt in your program. This frees up the processor to do other tasks while you’re waiting for that interrupt. The GPIO can be set to interrupt on a rising, falling or both edges of the incoming signal. Note: Jan 2013: The waitForInterrupt() function is deprecated – you should use the newer and easier to use wiringPiISR() function below.