Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #15 on: October 11, 2012, 01:09:27 pm » |
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13;
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }
// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(43200000); // wait for 12 hours digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(43200000); // wait for 12 hours } This is a modied version of the very first arduino project, blink. it originally blinks an LED on pin 13. The only thing I did to change this program was to change the timing from 1 second, to 12 hours. My guess is that you will need more than 40ma, so you will need to use transistors or relays to switch to higher current devices, but the code is still the same. Honestly, i think the cheapo 24 hour switch thing like someone previously mentioned would be more appropriate. Like the previous code example, this would only do the flowering lights, which is really all you need, the other room would be lighted 24/7, and not need anything to control that. I would be interested to find out how well LEDs work for growing. Most setups that i have seen require their own service panel, lots of expensive lights that use crazy amounts of current, and enclosures with fans to keep the lights from heating everything too much. How many LEDs are you using? Im guessing it must be thousands. Thanks so much! ive been looking for something JUST LIKE THIS!!! 
|
|
|
|
|
Logged
|
|
|
|
|
Eugene, Oregon
Offline
Sr. Member
Karma: 8
Posts: 387
|
 |
« Reply #16 on: October 11, 2012, 01:21:25 pm » |
Yer welcome buddy. Good luck.
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #17 on: October 12, 2012, 12:16:39 pm » |
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13;
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }
// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(43200000); // wait for 12 hours digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(43200000); // wait for 12 hours } This is a modied version of the very first arduino project, blink. it originally blinks an LED on pin 13. The only thing I did to change this program was to change the timing from 1 second, to 12 hours. My guess is that you will need more than 40ma, so you will need to use transistors or relays to switch to higher current devices, but the code is still the same. Honestly, i think the cheapo 24 hour switch thing like someone previously mentioned would be more appropriate. Like the previous code example, this would only do the flowering lights, which is really all you need, the other room would be lighted 24/7, and not need anything to control that. I would be interested to find out how well LEDs work for growing. Most setups that i have seen require their own service panel, lots of expensive lights that use crazy amounts of current, and enclosures with fans to keep the lights from heating everything too much. How many LEDs are you using? Im guessing it must be thousands. Im using about 30 leds would it be sufficient? lol just a test
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #18 on: October 16, 2012, 07:49:48 am » |
its not bright enough how do I Fix this?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #19 on: October 16, 2012, 07:52:50 am » |
Im using this code with 30 leds but its not bright enough? I Dont have any more relays ect, If i put the brightness on a scale of 1 - 10 its 5, but when I hook it up to a 9v battery its bright  /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13;
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }
// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(43200000); // wait for 12 hours digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(43200000); // wait for 12 hours }
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #20 on: October 16, 2012, 07:56:24 am » |
How are the LEDs being powered?
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #21 on: October 16, 2012, 07:56:48 am » |
Didn't you ask this in your existing thread?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #22 on: October 16, 2012, 07:59:56 am » |
Didn't you ask this in your existing thread?
Yes, Sorry, its just that I didnt think nobody would look at it.
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #23 on: October 16, 2012, 08:00:56 am » |
By a 9v Battery but when I Connect the leds directly to the battery its bright... when the 9v battery is connected to the arduino its really low brightness
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #24 on: October 16, 2012, 08:02:58 am » |
How, exactly, are the battery, arduino and LEDs connected together?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #25 on: October 16, 2012, 08:03:28 am » |
Im not using any resistors, or relays, because I dont have any... I Dont think I need it because the leds are connected together
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #26 on: October 16, 2012, 08:05:22 am » |
That didn't really answer the question.
|
|
|
|
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #27 on: October 16, 2012, 08:05:53 am » |
How, exactly, are the battery, arduino and LEDs connected together?
The 9v Battery is connected to the arduino, The LEDS Are connected to pin 13. and GND
|
|
|
|
|
Logged
|
|
|
|
|
France
Online
God Member
Karma: 19
Posts: 621
Scientia potentia est.
|
 |
« Reply #28 on: October 16, 2012, 08:34:38 am » |
Make a clear wiring schema in MS Paint or whatever, Virtual Breadboard is good too  From what I understand, you connected 60 LEDs to a single pin..? That is really bad because one pin can deliver like 20-25 mA only. You risk damaging your Arduino! You should use a relay!
|
|
|
|
« Last Edit: October 16, 2012, 08:39:57 am by guix »
|
Logged
|
|
|
|
|
Grand Rapids Mi
Offline
Jr. Member
Karma: 0
Posts: 52
|
 |
« Reply #29 on: October 16, 2012, 09:01:03 am » |
Im making the schematic right now...
|
|
|
|
|
Logged
|
|
|
|
|
|