Example 1: Programmatically controlling the LED
Example 2: Using the DHT11 - Humidity and Temperature Sensor with Raspberry Pi:
The example in Uugear (link) did not work because my DHT11 had the pins in different order the pins were marked + and - rather than S, V and G.
So I connected :
- + symbol in DHT11 ------> 3.3V
- - symbol in DHT11 ------> GND
- out symbol in DHT11 ------> pin GP4
Also I used this github library (easy to understand) : https://github.com/szazo/DHT11_Python
Example 3: IR Controlling your TV and AC with Raspberry Pi
These 2 tutorial were followed to do this example:
1. http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote (main)
2. http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/ (helped to resolve issues)
3. https://blog.bschwind.com/2016/05/29/sending-infrared-commands-from-a-raspberry-pi-without-lirc/ (to learn about IR reciever)
Extra Steps :The above tutorial 1 had 2 missing steps that I am documenting below.
Step 1: Run the following command before restart (or I was getting the error ):
 irsend: hardware does not support sending raspberry pi
lircd -d /dev/lirc0
Step 2: The key blocker I was facing was that the IRSEND command was working fine but the TV was not getting any signal. Eventually, the issue was fixed by doing the following (from the 2nd link above):
//edit the /boot/config.txt and add:
My TV Remote Control: irsend SEND_ONCE LG_AKB73715601 KEY_MENU
Notes: When trying to control the Air Condition using Raspberry Pi, I was unable to find the config files for my particular AC model from the current lirc repo. Eventually purchased and IR receiver LED and recorded the IR signals from original remote control using lirc record feature (already documented in the above links). Later it was very simple to fire the recorded keys and the AC was controlled successfully.