HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Raspberry Pi GPIO/SPI/I2C => Topic started by: shaggyshelar on March 03, 2014, 03:40:59 PM

Title: How to turn On/Off LED connected to Raspberry PI?
Post by: shaggyshelar on March 03, 2014, 03:40:59 PM
Hi, I have downloaded the Raspberry PI img file and connected to Raspberry PI. Everything works properly and I am able to connect to server on my Raspberry pi using my HomeGenie app I downloaded on my Android phone.
Now I want to turn on/off LED connected to Raspberry Pi's GPIO pin 22/23 using a android app so how can I achieve it?
Title: Re: How to turn On/Off LED connected to Raspberry PI?
Post by: Gene on March 03, 2014, 04:54:56 PM
The easy way is to use the Raspberry GPIO interface.

1) enable GPIO interface from Configure->Interfaces
2) add GPIO 22 and 23 to a Control Group from Configure->Group&Modules
3) control GPIO 22 and 23 from the Control section

See attacched screenshots.
You'll also be able to script the GPIO switches by using a Wizard Script from Configure->Automation.

The hard way, without enabling Raspi GPIO interface, is by writing a C# program. See the example HomeGenie Leds program in the RaspberrySharp group of Configure->Automation section.