Modify some code comments
In file "SenseLED.c"
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user