This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//02_hikari_led | |
//暗さによって違う光り方をする | |
//SchooMyとかいてあるところまですすもう | |
#define cdsPin 5 | |
#define ledPin 10 | |
#define ON LOW | |
#define OFF HIGH | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//02_distance_speaker | |
//近づいたエリアによって違う音がなる | |
//SchooMyとかいてあるところまですすもう | |
#define echoPin 19 | |
#define trigPin 18 | |
#define SPEAKER 10 | |
#define do 262 | |
#define re 294 | |
#define mi 330 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//02_distance_led | |
//近づいたエリアによって違う光り方をする | |
//SchooMyとかいてあるところまですすもう | |
#define echoPin 19 //INPUTA | |
#define trigPin 18 //INPUTA | |
#define ledPin 10 | |
#define ON LOW | |
#define OFF HIGH | |
double Duration = 0; //受信した間隔 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//01_hikari_speaker | |
//暗くなったら鳴る | |
//SchooMyとかいてあるところまですすもう | |
#define cdsPin 5 | |
#define SPEAKER 10 | |
#define do 262 | |
#define re 294 | |
#define mi 330 | |
#define fa 349 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//01_hikari_led | |
//暗くなったら光る | |
//SchooMyとかいてあるところまですすもう | |
#define cdsPin 5 | |
#define ledPin 10 | |
#define ON LOW | |
#define OFF HIGH | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//01_distance_speaker | |
//近づいたら鳴る | |
//SchooMyとかいてあるところまですすもう | |
#define echoPin 19 | |
#define trigPin 18 | |
#define SPEAKER 10 | |
#define do 262 | |
#define re 294 | |
#define mi 330 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//01_distance_led | |
//近づいたら光る | |
//SchooMyとかいてあるところまですすもう | |
#define echoPin 19 | |
#define trigPin 18 | |
#define ledPin 10 | |
#define ON LOW | |
#define OFF HIGH | |
double Duration = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//設定した時間内に行われた動作をカウントし、条件を満たしていると音がなる | |
//30秒以内に人が5回以上通ったら、音が鳴る | |
#define echoPin 19 | |
#define trigPin 18 | |
#define SPEAKER 10 | |
double Duration = 0; | |
double Distance = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//設定した時間内に行われた動作をカウントし、条件を満たしていると光る | |
//30秒以内に人が5回以上通ったら、光る | |
#define echoPin 19 | |
#define trigPin 18 | |
#define ledPin 10 | |
#define ON LOW | |
#define OFF HIGH | |
double Duration = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//設定した時間内に行われた動作をカウントし、条件を満たしていると鳴る | |
//30秒以内に人が5回以上暗くなったら、鳴る | |
#define cdsPin 5 | |
#define SPEAKER 10 | |
int count=0; | |
int stay=0; | |
int start_time=0; |