diff --git a/02-Hardware-Schematics/Equipment-list b/02-Hardware-Schematics/Equipment-list new file mode 100644 index 0000000..195cc22 --- /dev/null +++ b/02-Hardware-Schematics/Equipment-list @@ -0,0 +1,18 @@ +What you need for this project + +One Arduino Leonardo + http://www.amazon.fr/dp/B00ENSOHJ0 +One Relay Board + - 2 Relay board for system withous lamp + http://www.amazon.fr/dp/B00AZEVS5M + - 4 Relays for full system + http://www.amazon.fr/dp/B00AZEVSQG +One 5V USB power +One 12V power +2 12V pumps +2 Water sensors + http://www.amazon.fr/dp/B009DYP2H0 +Some BreadBoard cables Fem/Fem and Male/Fem + http://www.amazon.fr/dp/B00ENSOHJ0 + http://www.amazon.fr/dp/B00ENSOGWS +Strip LED grow lights \ No newline at end of file diff --git a/schematics/RelayBoard.fzz b/02-Hardware-Schematics/Schematics-Full.fzz similarity index 100% rename from schematics/RelayBoard.fzz rename to 02-Hardware-Schematics/Schematics-Full.fzz diff --git a/schematics/lib/OPENMolo 4 Relay breakout board.fzpz b/02-Hardware-Schematics/lib/OPENMolo 4 Relay breakout board.fzpz similarity index 100% rename from schematics/lib/OPENMolo 4 Relay breakout board.fzpz rename to 02-Hardware-Schematics/lib/OPENMolo 4 Relay breakout board.fzpz diff --git a/arduino/AquaponicsProject/AquaponicsProject.ino b/03-Software-Arduino/01-Arduinoponics-Source/Aquaponics-Source.ino similarity index 100% rename from arduino/AquaponicsProject/AquaponicsProject.ino rename to 03-Software-Arduino/01-Arduinoponics-Source/Aquaponics-Source.ino diff --git a/arduino/AquaponicsProject/README.txt b/03-Software-Arduino/01-Arduinoponics-Source/README.txt similarity index 100% rename from arduino/AquaponicsProject/README.txt rename to 03-Software-Arduino/01-Arduinoponics-Source/README.txt diff --git a/arduino/AquaponicsProject/TimerOne.zip b/03-Software-Arduino/01-Arduinoponics-Source/TimerOne.zip similarity index 100% rename from arduino/AquaponicsProject/TimerOne.zip rename to 03-Software-Arduino/01-Arduinoponics-Source/TimerOne.zip diff --git a/03-Software-Arduino/README b/03-Software-Arduino/README new file mode 100644 index 0000000..26d6975 --- /dev/null +++ b/03-Software-Arduino/README @@ -0,0 +1,9 @@ +Source code details + +Creat a dedicated folder depending of the setup/course + + +01-Arduinoponics-Source + - Main source code with all functions and elements +02-Arduinoponics-Basics + - Special very simple version \ No newline at end of file diff --git a/arduino/blink.ino b/arduino/blink.ino deleted file mode 100644 index d779d9f..0000000 --- a/arduino/blink.ino +++ /dev/null @@ -1,29 +0,0 @@ -/* - Blink - Turns on an LED on for one second, then off for one second, repeatedly. - - Most Arduinos have an on-board LED you can control. On the Uno and - Leonardo, it is attached to digital pin 13. If you're unsure what - pin the on-board LED is connected to on your Arduino model, check - the documentation at http://www.arduino.cc - - This example code is in the public domain. - - modified 8 May 2014 - by Scott Fitzgerald - */ - - -// the setup function runs once when you press reset or power the board -void setup() { - // initialize digital pin 13 as an output. - pinMode(13, OUTPUT); -} - -// the loop function runs over and over again forever -void loop() { - digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) - delay(1000); // wait for a second - digitalWrite(13, LOW); // turn the LED off by making the voltage LOW - delay(1000); // wait for a second -} \ No newline at end of file diff --git a/arduino/ledCycle/ledCycle.ino b/arduino/ledCycle/ledCycle.ino deleted file mode 100644 index c74dc30..0000000 --- a/arduino/ledCycle/ledCycle.ino +++ /dev/null @@ -1,42 +0,0 @@ -int LEDPin = 8; - -long anHour = 1000 * 60 * 60; -long twelveHours = 12 * anHour; - -int aSecond = 1000; -/* - * setup() - this function runs once when you turn your Arduino on - * We set the motors pin to be an output (turning the pin high (+5v) or low (ground) (-)) - * rather than an input (checking whether a pin is high or low) - */ -void setup() -{ - pinMode(LEDPin, OUTPUT); -} - -/* - * loop() - this function will start after setup finishes and then repeat - * we call a function called motorOnThenOff() - */ - -void loop() // run over and over again -{ - ledsOnThenOff(); -} - -/* - * motorOnThenOff() - turns motor on then off - * (notice this code is identical to the code we used for - * the blinking LED) - */ -void ledsOnThenOff(){ - digitalWrite(LEDPin, HIGH); - delay(aSecond); - digitalWrite(LEDPin, LOW); - delay(aSecond); - - digitalWrite(LEDPin, HIGH); - delay(anHour); - digitalWrite(LEDPin, LOW); - delay(anHour); -} diff --git a/arduino/ledCycleInterrupt/ledCycleInterrupt.ino b/arduino/ledCycleInterrupt/ledCycleInterrupt.ino deleted file mode 100644 index bccd7a7..0000000 --- a/arduino/ledCycleInterrupt/ledCycleInterrupt.ino +++ /dev/null @@ -1,73 +0,0 @@ -// avr-libc library includes -#include -#include -#define LEDPIN 8 - -int daycycle = 14; // number of hours the day lasts (LEDs ON) -int nightcycle = 10; // number of hours the day lasts (LEDs OFF) - -long hourseconds = 3600; // number of seconds in an hour -unsigned long daycycleseconds = hourseconds * daycycle; -unsigned long nightcycleseconds = hourseconds * nightcycle; - -volatile boolean isday = true; -volatile unsigned long current = 0; - -void setup() -{ - pinMode(LEDPIN, OUTPUT); - // initialize Timer1 - cli(); // disable global interrupts - TCCR1A = 0; // set entire TCCR1A register to 0 - TCCR1B = 0; // same for TCCR1B - - // set compare match register to desired timer count: - OCR1A = 15624; - - // turn on CTC mode: - TCCR1B |= (1 << WGM12); - - // Set CS10 and CS12 bits for 1024 prescaler: - TCCR1B |= (1 << CS10); - TCCR1B |= (1 << CS12); - - // enable timer compare interrupt: - TIMSK1 |= (1 << OCIE1A); - - // enable global interrupts: - sei(); - - // switches LEDs ON - digitalWrite(LEDPIN, HIGH); -} - -void loop() -{ -// nothing for now -} - -ISR(TIMER1_COMPA_vect) -{ - current++; - if(isday){ - if(current == daycycleseconds){ - apply(); - } - } - else{ - if(current == nightcycleseconds){ - apply(); - } - } -} - -void apply(){ - current = 0; - isday = !isday; // switching day/night - switchLeds(); -} - -void switchLeds(){ - digitalWrite(LEDPIN, !digitalRead(LEDPIN)); -} - diff --git a/arduino/pump.ino/pump.ino.ino b/arduino/pump.ino/pump.ino.ino deleted file mode 100644 index 93a2c72..0000000 --- a/arduino/pump.ino/pump.ino.ino +++ /dev/null @@ -1,93 +0,0 @@ -/* ----------------------------------------------------------- - * | Arduino Experimentation Kit Example Code | - * | CIRC-03 .: Spin Motor Spin :. (Transistor and Motor) | - * ----------------------------------------------------------- - * - * The Arduinos pins are great for driving LEDs however if you hook - * up something that requires more power you will quickly break them. - * To control bigger items we need the help of a transistor. - * Here we will use a transistor to control a small toy motor - * - * http://tinyurl.com/d4wht7 - * - */ - -int motorPin = 9; // define the pin the motor is connected to - // (if you use pin 9,10,11 or 3you can also control speed) - -/* - * setup() - this function runs once when you turn your Arduino on - * We set the motors pin to be an output (turning the pin high (+5v) or low (ground) (-)) - * rather than an input (checking whether a pin is high or low) - */ -void setup() -{ - pinMode(motorPin, OUTPUT); -} - - -/* - * loop() - this function will start after setup finishes and then repeat - * we call a function called motorOnThenOff() - */ - -void loop() // run over and over again -{ - motorOnThenOff(); - //motorOnThenOffWithSpeed(); - //motorAcceleration(); -} - -/* - * motorOnThenOff() - turns motor on then off - * (notice this code is identical to the code we used for - * the blinking LED) - */ -void motorOnThenOff(){ - int onTime = 2500; //the number of milliseconds for the motor to turn on for - int offTime = 1000; //the number of milliseconds for the motor to turn off for - - digitalWrite(motorPin, HIGH); // turns the motor On - delay(onTime); // waits for onTime milliseconds - digitalWrite(motorPin, LOW); // turns the motor Off - delay(offTime); // waits for offTime milliseconds -} - -/* - * motorOnThenOffWithSpeed() - turns motor on then off but uses speed values as well - * (notice this code is identical to the code we used for - * the blinking LED) - */ -void motorOnThenOffWithSpeed(){ - - int onSpeed = 200; // a number between 0 (stopped) and 255 (full speed) - int onTime = 2500; //the number of milliseconds for the motor to turn on for - - int offSpeed = 50; // a number between 0 (stopped) and 255 (full speed) - int offTime = 1000; //the number of milliseconds for the motor to turn off for - - analogWrite(motorPin, onSpeed); // turns the motor On - delay(onTime); // waits for onTime milliseconds - analogWrite(motorPin, offSpeed); // turns the motor Off - delay(offTime); // waits for offTime milliseconds -} - -/* - * motorAcceleration() - accelerates the motor to full speed then - * back down to zero -*/ -void motorAcceleration(){ - int delayTime = 50; //milliseconds between each speed step - - //Accelerates the motor - for(int i = 0; i < 256; i++){ //goes through each speed from 0 to 255 - analogWrite(motorPin, i); //sets the new speed - delay(delayTime); // waits for delayTime milliseconds - } - - //Decelerates the motor - for(int i = 255; i >= 0; i--){ //goes through each speed from 255 to 0 - analogWrite(motorPin, i); //sets the new speed - delay(delayTime); // waits for delayTime milliseconds - } -} diff --git a/schematics/ledstrip.fzz b/schematics/ledstrip.fzz deleted file mode 100644 index 2c394a1..0000000 Binary files a/schematics/ledstrip.fzz and /dev/null differ diff --git a/schematics/lib/AquaponicsLib.fzb b/schematics/lib/AquaponicsLib.fzb deleted file mode 100644 index 7cd0c6a..0000000 --- a/schematics/lib/AquaponicsLib.fzb +++ /dev/null @@ -1,9 +0,0 @@ - - - Axel - - - - - - diff --git a/schematics/pump.fzz b/schematics/pump.fzz deleted file mode 100644 index 72736bc..0000000 Binary files a/schematics/pump.fzz and /dev/null differ