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
#include <Servo.h> | |
Servo tragac; //It creates a servo object that manages the servo. | |
int istokPin = 1; //It adds analog pins connected to the light sensor | |
int zapadPin = 2; | |
int istokVal = 0; //It creates variables that store sensor values. | |
int zapadVal = 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
#include <Servo.h> //It adds the library to the program. | |
#include <LiquidCrystal.h> | |
Servo rampa; //It creates a servo object that manages the servo. | |
int izlaz = 0; //Pin attached to the sensor at the exit. | |
int ulaz = 1; //Pin attached to the sensor at the entrance. | |
int spusteno = 177; //Position of the ramp down. | |
int dignuto = 90; //Position of the ramp up. |
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
int crvenoGlavna = 2; | |
int zutoGlavna = 1; | |
int zelenoGlavna = 0; | |
int crvenoSporedna = 5; | |
int zutoSporedna = 4; | |
int zelenoSporedna = 3; | |
int senzor1 = 6; | |
int senzor2 = 7; |
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
#include <FadeLed.h> //It adds library for LED diode management. | |
FadeLed leds[5] = {3, 5, 6, 9, 10}; //It adds LED pins to the "leds" object. | |
unsigned long millisLast; //variable millisLast | |
int resPin = A1; //It defines photoresistor pin. | |
int resValue = 0; //A variable for storing the value of photoresistors. | |
int sensPin1 = 2; //It defines infrared sensor pins. | |
int sensPin2 = 4; |