diff --git a/arduino/AqueponicsProject/AqueponicsProject.ino b/arduino/AquaponicsProject/AquaponicsProject.ino similarity index 91% rename from arduino/AqueponicsProject/AqueponicsProject.ino rename to arduino/AquaponicsProject/AquaponicsProject.ino index 205afee..55e42d7 100644 --- a/arduino/AqueponicsProject/AqueponicsProject.ino +++ b/arduino/AquaponicsProject/AquaponicsProject.ino @@ -1,10 +1,7 @@ /* - * - * - * - * Clock mechanism to execut an action every houres + * Clock mechanism to execute an action every hour * - * TODO Switch action reset houre to 9 + * TODO Switch action reset hours to 9 * TODO Safety extra sensor */ @@ -24,10 +21,10 @@ #define WATER_DOWN 8 // Pin of the water sensor 2 // Time definition -#define DAY_TIME 14 // Number of hours the day lasts (LAMP ON) -#define DAY_START 9 // Hour of the day that the day start +#define DAY_TIME 14 // Number of hours of daylight (LAMP ON) +#define DAY_START 9 // Hour of the day that the day starts #define PUMP_CYCLE 15 // Time between 2 pump cycles -#define WATER_UP_TIME 5 // Time to keep water up +#define WATER_UP_TIME 5 // Time to water at high level #define SIMULATION true //Boolean to activate the simulation (reduce time 1mn = 1s) @@ -152,8 +149,8 @@ void seconds_timer(void) // Every 60min increment the hours counter if (0 == minutesCounter % 60) { - hoursCounter ++; // Increment the hours counter - minutesCounter = 0; // Clear the minutes counter + hoursCounter ++; // Increments the hours counter + minutesCounter = 0; // Clears the minutes counter // At the end of the day reset the hours counter if (23 < hoursCounter) @@ -161,7 +158,7 @@ void seconds_timer(void) hoursCounter = 0; // Clear the hours counter } - // Execute following code one time every hours + // Execute following code once every hour hours_action(); } } diff --git a/arduino/AquaponicsProject/README.txt b/arduino/AquaponicsProject/README.txt new file mode 100644 index 0000000..75863f0 --- /dev/null +++ b/arduino/AquaponicsProject/README.txt @@ -0,0 +1,8 @@ +Libraries used: +TimerOne +https://github.com/PaulStoffregen/TimerOne + +Timer on is a collection of routines for configuring the 16 bit hardware timer called Timer1 on the ATmega168/328. There are 3 hardware timers available on the chip, and they can be configured in a variety of ways to achieve different functionality. The development of this library began with the need for a way to quickly and easily set the PWM period or frequency, but has grown to include timer overflow interrupt handling and other features. + +To install, unzip and copy the folder inside +C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries \ No newline at end of file diff --git a/arduino/AqueponicsProject/TimerOne.zip b/arduino/AquaponicsProject/TimerOne.zip similarity index 100% rename from arduino/AqueponicsProject/TimerOne.zip rename to arduino/AquaponicsProject/TimerOne.zip diff --git a/arduino/AqueponicsProject/README.txt b/arduino/AqueponicsProject/README.txt deleted file mode 100644 index a6743a6..0000000 --- a/arduino/AqueponicsProject/README.txt +++ /dev/null @@ -1,7 +0,0 @@ - - -Librairies: -TimerOne -https://github.com/PaulStoffregen/TimerOne -Copy after unzip inside -C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries \ No newline at end of file