diff --git a/Code/Python_Code/00.0.0_Hello/Hello.py b/Code/Python_Code/00.0.0_Hello/Hello.py index fca6461..6421cee 100644 --- a/Code/Python_Code/00.0.0_Hello/Hello.py +++ b/Code/Python_Code/00.0.0_Hello/Hello.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : Hello.py # Description : Print "Hello World!". -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/27 ######################################################################## diff --git a/Code/Python_Code/01.1.1_Blink/Blink.py b/Code/Python_Code/01.1.1_Blink/Blink.py index 92449ba..1a10acf 100644 --- a/Code/Python_Code/01.1.1_Blink/Blink.py +++ b/Code/Python_Code/01.1.1_Blink/Blink.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : Blink.py # Description : Basic usage of GPIO. Let led blink. -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/01.1.1_Blink/Blink2.py b/Code/Python_Code/01.1.1_Blink/Blink2.py index 00ec1f4..3d8a0de 100644 --- a/Code/Python_Code/01.1.1_Blink/Blink2.py +++ b/Code/Python_Code/01.1.1_Blink/Blink2.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : Blink.py # Description : Basic usage of GPIO. Let led blink. -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/26 ######################################################################## from gpiozero import LED diff --git a/Code/Python_Code/02.1.1_ButtonLED/ButtonLED.py b/Code/Python_Code/02.1.1_ButtonLED/ButtonLED.py index ef77cff..8b98fae 100644 --- a/Code/Python_Code/02.1.1_ButtonLED/ButtonLED.py +++ b/Code/Python_Code/02.1.1_ButtonLED/ButtonLED.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : ButtonLED.py # Description : Control led with button -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/02.2.1_Tablelamp/Tablelamp.py b/Code/Python_Code/02.2.1_Tablelamp/Tablelamp.py index b22e217..a4e7969 100644 --- a/Code/Python_Code/02.2.1_Tablelamp/Tablelamp.py +++ b/Code/Python_Code/02.2.1_Tablelamp/Tablelamp.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : Tablelamp.py # Description : a DIY MINI table lamp -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/03.1.1_LightWater/LightWater.py b/Code/Python_Code/03.1.1_LightWater/LightWater.py index acf8583..4fc8595 100644 --- a/Code/Python_Code/03.1.1_LightWater/LightWater.py +++ b/Code/Python_Code/03.1.1_LightWater/LightWater.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : LightWater.py # Description : Use LEDBar Graph(10 LED) -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/06.1.1_Doorbell/Doorbell.py b/Code/Python_Code/06.1.1_Doorbell/Doorbell.py index 4ea30cf..e62517f 100644 --- a/Code/Python_Code/06.1.1_Doorbell/Doorbell.py +++ b/Code/Python_Code/06.1.1_Doorbell/Doorbell.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : Doorbell.py # Description : Make doorbell with buzzer and button -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/19.1.1_LEDMatrix/LEDMatrix.py b/Code/Python_Code/19.1.1_LEDMatrix/LEDMatrix.py index fa9b6b1..724bbb1 100644 --- a/Code/Python_Code/19.1.1_LEDMatrix/LEDMatrix.py +++ b/Code/Python_Code/19.1.1_LEDMatrix/LEDMatrix.py @@ -2,7 +2,7 @@ ############################################################################# # Filename : LEDMatrix.py # Description : Control LEDMatrix with 74HC595 -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/23.1.1_SenseLED/SenseLED.py b/Code/Python_Code/23.1.1_SenseLED/SenseLED.py index 6d52c94..8f816a3 100644 --- a/Code/Python_Code/23.1.1_SenseLED/SenseLED.py +++ b/Code/Python_Code/23.1.1_SenseLED/SenseLED.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : SenseLED.py # Description : Control led with infrared Motion sensor. -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/24.1.1_UltrasonicRanging/UltrasonicRanging.py b/Code/Python_Code/24.1.1_UltrasonicRanging/UltrasonicRanging.py index 17f539a..c21def7 100644 --- a/Code/Python_Code/24.1.1_UltrasonicRanging/UltrasonicRanging.py +++ b/Code/Python_Code/24.1.1_UltrasonicRanging/UltrasonicRanging.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : UltrasonicRanging.py # Description : Get distance via UltrasonicRanging sensor -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_Code/25.1.1_MPU6050/MPU6050RAW.py b/Code/Python_Code/25.1.1_MPU6050/MPU6050RAW.py index 5aa41fe..e964f06 100644 --- a/Code/Python_Code/25.1.1_MPU6050/MPU6050RAW.py +++ b/Code/Python_Code/25.1.1_MPU6050/MPU6050RAW.py @@ -2,7 +2,7 @@ ######################################################################## # Filename : MPU6050RAW.py # Description : Read data of MPU6050. -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import MPU6050 diff --git a/Code/Python_Code/27.2.1_LightWater03/LightWater03.py b/Code/Python_Code/27.2.1_LightWater03/LightWater03.py index 4b9bcfe..cf4fe9d 100644 --- a/Code/Python_Code/27.2.1_LightWater03/LightWater03.py +++ b/Code/Python_Code/27.2.1_LightWater03/LightWater03.py @@ -2,7 +2,7 @@ ############################################################################# # Filename : LightWater03.py # Description : Control LED with 74HC595 on the DIY circuit board -# Author : www.freenove.com +# auther : www.freenove.com # modification: 2019/12/28 ######################################################################## import RPi.GPIO as GPIO diff --git a/Code/Python_GPIOZero_Code/06.2.1_Alertor/Alertor.py b/Code/Python_GPIOZero_Code/06.2.1_Alertor/Alertor.py index 0360e13..266c588 100644 --- a/Code/Python_GPIOZero_Code/06.2.1_Alertor/Alertor.py +++ b/Code/Python_GPIOZero_Code/06.2.1_Alertor/Alertor.py @@ -22,11 +22,8 @@ def loop(): stopAlertor() print ('alertor turned off <<<') def alertor(): - for x in range(0,361): # Make frequency of the alertor consistent with the sine wave - sinVal = math.sin(x * (math.pi / 180.0)) # calculate the sine value - toneVal = 2000 + sinVal * 500 # Add to the resonant frequency with a Weighted - b.play(Tone(toneVal)) # Change Frequency of PWM to toneVal - time.sleep(0.001) + buzzer.play(Tone(220.0)) + time.sleep(0.1) def stopAlertor(): buzzer.stop()