diff --git a/Code/C_Code/23.1.1_SenseLED/SenseLED.c b/Code/C_Code/23.1.1_SenseLED/SenseLED.c index 395e0c1..898fee1 100644 --- a/Code/C_Code/23.1.1_SenseLED/SenseLED.c +++ b/Code/C_Code/23.1.1_SenseLED/SenseLED.c @@ -22,11 +22,11 @@ int main(void) while(1){ - if(digitalRead(sensorPin) == HIGH){ //sensor has pressed down + if(digitalRead(sensorPin) == HIGH){ //if read sensor for high level digitalWrite(ledPin, HIGH); //led on printf("led on...\n"); } - else { //sensor has released + else { digitalWrite(ledPin, LOW); //led off printf("...led off\n"); } diff --git a/Code/Python_Code/22.1.1_MatrixKeypad/MatrixKeypad.py b/Code/Python_Code/22.1.1_MatrixKeypad/MatrixKeypad.py index 66dc61d..1141fab 100644 --- a/Code/Python_Code/22.1.1_MatrixKeypad/MatrixKeypad.py +++ b/Code/Python_Code/22.1.1_MatrixKeypad/MatrixKeypad.py @@ -4,6 +4,7 @@ # Author : freenove # modification: 2016/07/13 ######################################################################## +import RPi.GPIO as GPIO import Keypad #import module Keypad ROWS = 4 # number of rows of the Keypad COLS = 4 #number of columns of the Keypad diff --git a/Tutorial.pdf b/Tutorial.pdf index 31f0f4f..fbad36a 100644 Binary files a/Tutorial.pdf and b/Tutorial.pdf differ