Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dichiarazione del pin a cui è connessa la fotoresistenza const int photor = 11;
- const int IRread = 2;
- void setup() {
- //Avvio della seriale
- Serial.begin(9600);
- //Fotoresistenza impostata come INPUT
- pinMode(photor,INPUT);
- pinMode(IRread,INPUT);
- }
- void loop() {
- if(digitalRead(IRread)==LOW){
- Serial.println("IR Ricevuto");
- delay(500);
- for(int y = 0; y < 4; y++){ for(int i = 0;i<5;i++){
- Serial.print((abs(digitalRead(photor)-1))); delay(1000);
- }
- Serial.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment