
LED
LED

Button
Button
Resistor
Resistor

1. Turning on an LED
1.1. GPIO Connections
Connect the LED to GPIOX on the Gemstone, which is available for Input/Output, as shown below.
1.2. Creating a Shell Script
After connecting to the Gemstone, create a script file for the LED blink operation.led-blink.sh file using the nano text editor in the terminal interface.
led-blink.sh file.
CTRL+X, then Y to exit the nano editor and save the file.
1.3. Running the Shell Script
Make theled-blink.sh file executable using the chmod command.
led-blink.sh script.
2. Reading a Button and Turning on an LED
2.1. GPIO Connections
Connect the LED to GPIOX and the button to GPIOY on the Gemstone, as shown below.
2.2. Creating a Shell Script
Create the script file.button-led.sh file using the nano text editor in the terminal interface.
button-led.sh file.
Press CTRL+X, then Y to exit the nano editor and save the file.
2.3. Running the Shell Script
Make thebutton-led.sh file executable using the chmod command.
button-led.sh script.


