more G-Labs products

Author Topic: How to turn On/Off LED connected to Raspberry PI?  (Read 2336 times)

March 03, 2014, 03:40:59 PM
Read 2336 times

shaggyshelar

  • *
  • Information
  • Newbie
  • Posts: 1
  • Geek From Heart
    • Sagar Shelar
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?

March 03, 2014, 04:54:56 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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.