2015-06-20 08:15 AM
How can I turn on or turn off a LED through button function
2015-06-20 08:37 AM
Configure the respective GPIO pins as inputs/outputs, sit in a loop monitoring the key input, and then transition the state of the LED output.
Might I suggest you review software library examples for the chip/board you're using.