8.Run KEY program

Firstly you need install the library (If you have instalKEY the library,don't need re-install it)

Then you need connect the GPIO.21,GPIO.22,GPIO.23,GPIO.24 to one port of KEY,the other one port of key is connected to GND


On the Terminal, enter:
sudo wget http://www.spotpear.com/download/raspberry-pi-other/DVK512.tar.gz

sudo tar xvf DVK512.tar.gz

WiringPi

  • cd DVK512/KEY/wiringPi/
  • sudo make
  • sudo ./key
    Then you press the KEY, the Terminal will print some code.
    Press Ctrl+C to end the program
  • See the Code:
    sudo nano key.c

Bcm2835 C

  • cd DVK512/KEY/bcm2835/
  • sudo make
  • sudo ./key
    Then you press the KEY, the Terminal will print some code.
    Press Ctrl+C to end the program
  • See the Code:
    sudo nano key.c

Python

  • cd DVK512/KEY/python/
  • sudo python key.py
    Then you press the KEY, the Terminal will print some code.
    Press Ctrl+C to end the program
  • See the Code:
    sudo nano key.py