Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Raspberry Pi / How to read write the GPIO in AGK2 - raspberry Pi

Author
Message
Jo Bach
9
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 17th Aug 2016 20:53
AGK Runs fine on the PI but...

I can't find a simple example (e.g. turning a led on and off) in the manual and forum about read or writing the GPIO.

I know it with the termial, but I want to do it with AGK2, like pressing a button in AGK2.

Can I do it with the standard basic or do I need C++?

thank you.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Aug 2016 06:20
You read/write the pins like a file with a special name...

pin1 = OpenToRead("GPIO:1")
in = ReadByte(pin1)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-03-29 11:58:44
Your offset time is: 2024-03-29 11:58:44