Calling all DIY LED "Junkies" - Your opinions wanted! - Page 8
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 10-21-2012, 04:46 AM   #106
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

So, found my first issue, haha...

I'm trying to upload the sketch, and I am getting an error.

I'm not sure what I'm missing here. I have the Time.h file, so I'm not sure what it means by "no such directory". Am I missing a file? It's bound to be something idiotically simple. This is my first go with any kind of coding, so I feel like I'm playing with fire a bit. Here's what it looks like:



I saved it as a separate file and renamed it "B" in case I screwed something up. Which I probably did.
theblondskeleton is offline   Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 10-21-2012, 06:44 PM   #107
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

Ok, I had apparently installed the libraries incorrectly. That's fixed. Now, I'm getting a new set of errors, and I don't know what the fix is:

SmartyCat_6_channel_codeB:84: error: 'byte second' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:93: error: previous declaration of 'int second(time_t)'
SmartyCat_6_channel_codeB:84: error: 'byte month' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:99: error: previous declaration of 'int month(time_t)'
SmartyCat_6_channel_codeB:84: error: 'byte year' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:101: error: previous declaration of 'int year(time_t)'
SmartyCat_6_channel_codeB:268: error: expected unqualified-id before '/' token
SmartyCat_6_channel_codeB:268: error: expected constructor, destructor, or type conversion before '/' token
SmartyCat_6_channel_codeB.cpp: In function 'void loop()':
SmartyCat_6_channel_codeB:345: error: cannot resolve overloaded function 'second' based on conversion to type 'byte*'
SmartyCat_6_channel_codeB:349: error: 'DS1307_HR' was not declared in this scope
SmartyCat_6_channel_codeB:353: error: 'DS1307_MIN' was not declared in this scope
SmartyCat_6_channel_codeB:357: error: 'DS1307_SEC' was not declared in this scope
SmartyCat_6_channel_codeB:361: error: 'DS1307_MTH' was not declared in this scope
SmartyCat_6_channel_codeB:365: error: 'DS1307_DATE' was not declared in this scope
SmartyCat_6_channel_codeB:369: error: 'DS1307_YR' was not declared in this scope

Anyone? I'm a hopeless noob, here. I have never done any coding, and I just want this thing to work, haha...
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 06:59 PM   #108
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

I looks to me like you're trying to compile and load a "library" file. Library files can be identified by the ".h" at the end of the file name. Make sure to place that file and any others with the same ".h" into the Arduino 23 "Library" folder. The actual Program "Sketch" will have ".cpp" at the end of the file name. When you open and then "verify/compile" the sketch, the libraries that are called out in that sketch will be accessed and integrated into the actual binary code that is transferred to the chip.

Here's some code that "Sink" wrote. It makes setting the time a breeze. Just copy and paste this into the Arduino23 IDE and name it the "Time_set" sketch. Load this one first to set the time and then load the "Smartycat" sketch( be sure to adjust the start/stop/fade duration/max led intensity values to your liking before loading)

Code:
/*
 * Name:	timeset.pde
 * Author:	User "sink" at plantedtank.net forums
 * URL:		http://bitbucket.org/akl/tank-control
 *
 * This code sets the time on a DS1307 RTC chip attached to an Arduino
 * microcontroller board.  The time is set to the system time when the
 * sketch was compiled (using preprocessor macros), so make sure that:
 *
 *     1. Your system (PC) time is accurate.
 *     2. You recompile the sketch and then upload immediately.
 *
 * The time is skewed forward some seconds to accomodate for compilation and
 * upload time.  If you find the time is consistently off by the same amount,
 * you can modify the adjustment constant below.
 *
 * This code requires the following libraries: Wire, Time, DS1307RTC
 *
 * The latest version of this code can always be found at above url.
 */

/*
 * Copyright (c) 2011, User "sink" at plantedtank.net forums
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.

 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.  
 */

#include <Time.h>
#include <Wire.h>
#include <DS1307RTC.h>

/*
 * Time adjustment forward in seconds.  Used to compensate for
 * compilation/upload time.
 */
const int kAdjustment = 20;

/*
 * Utility function for pretty digital clock time output
 * From example code in Time library -- author unknown
 */
void printDigits(int digits) {
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

/*
 * Display time
 * Adapted from example code in Time library -- author unknown
 */
void digitalClockDisplay() {
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(month());
  Serial.print("/");
  Serial.print(day());
  Serial.print("/");
  Serial.print(year()); 
  Serial.println(); 
}

void setup() {

  // convert compilation time and set system clock
  char const *date = __DATE__;
  char const *time = __TIME__;
  int sec, min, hour, day, month, year;
  
  char s_month[5];
  static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
  sscanf(date, "%s %d %d", s_month, &day, &year);
  month = (strstr(month_names, s_month)-month_names)/3;
  sscanf(time, "%d:%d:%d", &hour, &min, &sec);

  setTime(hour, min, sec, day, month+1, year);
  adjustTime(kAdjustment); // crude fwd correction
  time_t t = now();

  // set RTC
  RTC.set(t);

  Serial.begin(115200);
}

void loop () {
  digitalClockDisplay();  
  Serial.println(); 
  delay(1000);
}
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 07:18 PM   #109
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Quote:
Originally Posted by theblondskeleton View Post
Ok, I had apparently installed the libraries incorrectly. That's fixed. Now, I'm getting a new set of errors, and I don't know what the fix is:

SmartyCat_6_channel_codeB:84: error: 'byte second' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:93: error: previous declaration of 'int second(time_t)'
SmartyCat_6_channel_codeB:84: error: 'byte month' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:99: error: previous declaration of 'int month(time_t)'
SmartyCat_6_channel_codeB:84: error: 'byte year' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:101: error: previous declaration of 'int year(time_t)'
SmartyCat_6_channel_codeB:268: error: expected unqualified-id before '/' token
SmartyCat_6_channel_codeB:268: error: expected constructor, destructor, or type conversion before '/' token
SmartyCat_6_channel_codeB.cpp: In function 'void loop()':
SmartyCat_6_channel_codeB:345: error: cannot resolve overloaded function 'second' based on conversion to type 'byte*'
SmartyCat_6_channel_codeB:349: error: 'DS1307_HR' was not declared in this scope
SmartyCat_6_channel_codeB:353: error: 'DS1307_MIN' was not declared in this scope
SmartyCat_6_channel_codeB:357: error: 'DS1307_SEC' was not declared in this scope
SmartyCat_6_channel_codeB:361: error: 'DS1307_MTH' was not declared in this scope
SmartyCat_6_channel_codeB:365: error: 'DS1307_DATE' was not declared in this scope
SmartyCat_6_channel_codeB:369: error: 'DS1307_YR' was not declared in this scope

Anyone? I'm a hopeless noob, here. I have never done any coding, and I just want this thing to work, haha...
It looks to me like you may have the "wrong" library installed in your library folder. I can compile that copy of the sketch without issue, so I'd imagine that there has to be an incompatible library that's installed on your pc. I'll try to put together a folder with all the needed "stuff" to get you up and running. Might take some time though - I gotta chase the kids today
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 07:27 PM   #110
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

This may be the issue: I have a Mac. I've seen in the forums that the names for some things are different (I really have no clue about this stuff). Would this account for the errors?
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 08:01 PM   #111
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Quote:
Originally Posted by theblondskeleton View Post
This may be the issue: I have a Mac. I've seen in the forums that the names for some things are different (I really have no clue about this stuff). Would this account for the errors?
It may have something to do with it, but I'm not sure. Have you tried loading some of the more basic sketches, like "Blink", just to see what happens? The red LED is already connected to digital pin 13 on the Smartycat, just like an "off the shelf" Arduino, so there's no need for any other connections. Just run the sketch and see what happens.
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 08:32 PM   #112
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

I did - Blink functions perfectly. No errors The code you posted from Sink runs and installs with no issues, but still getting errors with the SmartyCat sketch.
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 09:08 PM   #113
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Quote:
Originally Posted by theblondskeleton View Post
I did - Blink functions perfectly. No errors The code you posted from Sink runs and installs with no issues, but still getting errors with the SmartyCat sketch.

That's weird. Try this copy. There are only two Libraries included, so if it doesn't compile properly, maybe the library you have is wrong or corrupted in some way.


Code:
/*
// ATMEG328P-AU Microcontroller LED lighting controller for aquarium use. 
// The programming code uses a DS1307 Real Time clock to set the LED lighting schedule. Current date and time can be accessed with the serial monitor set to 9600 baud.
// sunrise/sunset time,length of fade duration, and the length of the day are selectable via the programmed schedule.  
//  Circuit description
// PWM pins described below connected to dimming circuits on drivers spread among 6 seperate channels.
// DS1307 RTC ( real time clock) connected via I2C protocol.
*/



// Pins to control each channel LEDs. Change these if you're using different pins.

int oneLed = 3;       // LED PWM arduino pin for channel one.

int twoLed = 5;       // LED PWM arduino pin for channel two 

int threeLed = 6;     // LED PWM arduino pin for channel three

int fourLed = 9;      // LED PWM arduino pin for channel four

int fiveLed = 10;     // LED PWM arduino pin for channel five

int sixLed = 11;      // LED PWM arduino pin for channel six


#include <WProgram.h>
#include <DS1307.h> 
// written by  mattt on the Arduino forum and modified by D. Sjunnesson



// Set up RTC

#include "Wire.h"

#define DS1307_I2C_ADDRESS 0x68



// RTC variables

byte second, rtcMins, oldMins, rtcHrs, oldHrs, dayOfWeek, dayOfMonth, month, year;



// Other variables. These control the behavior of lighting. Change these to customize behavior.

int minCounter = 0;         // counter that resets at midnight. Don't change this.



int oneStartMins = 540;     // minute to start channel 1. Change this to the number of minutes past midnight you want to start

int twoStartMins =420;      // minute to start channel 2. Change this to the number of minutes past midnight you want to start                         

int threeStartMins =540;    // minute to start channel 3. Change this to the number of minutes past midnight you want to start 

int fourStartMins =420;     // minute to start channel 4. Change this to the number of minutes past midnight you want to start 

int fiveStartMins =420;     // minute to start channel 5. Change this to the number of minutes past midnight you want to start 

int sixStartMins =420;      // minute to start channel 6. Change this to the number of minutes past midnight you want to start 


int onePhotoPeriod = 720;   // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day

int twoPhotoPeriod = 960;   // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day                           

int threePhotoPeriod = 720; // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day

int fourPhotoPeriod = 960;  // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day

int fivePhotoPeriod = 960;  // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day

int sixPhotoPeriod = 960;   // photoperiod in minutes, for this channel. Change this to alter the total legnth of the day


int fadeDuration = 180;      // duration of the fade on and off for sunrise and sunset. Change
                            
//    this to alter how long the fade lasts.

int oneMax = 100;           // max intensity for this channel. Change if you want to limit max intensity.

int twoMax = 100;           // max intensity for this channel. Change if you want to limit max intensity. 

int threeMax = 100;         // max intensity for this channel. Change if you want to limit max intensity.

int fourMax = 100;          // max intensity for this channel. Change if you want to limit max intensity.

int fiveMax = 100;          // max intensity for this channel. Change if you want to limit max intensity.

int sixMax = 100;           // max intensity for this channel. Change if you want to limit max intensity.

/****** LED Functions ******/

/***************************/

//function to set LED brightness according to time of day

//function has three equal phases - ramp up, hold, and ramp down

void setLed(int mins,    // current time in minutes
            
int ledPin,  // pin for this channel of LEDs
            
int start,   // start time for this channel of LEDs
            
int period,  // photoperiod for this channel of LEDs
            
int fade,    // fade duration for this channel of LEDs
            
int ledMax   // max value for this channel
            
)  {
  
if (mins <= start || mins <= mins > start + period)  {
    
analogWrite(ledPin, 0);
  
}// This is when the led's are off, thus ledVal =0
  
if (mins > start && mins <= start + fade)  {
    
analogWrite(ledPin, map(mins - start, 0, fade, 0, ledMax));
  
}// This is sunrise. Leds slowly brighten to full intensity
    
if (mins > start + fade && mins <= start + period - fade)  {
   
analogWrite(ledPin, ledMax);
  
}//This is when the led's are at maximum intensity
    
if (mins > start + period - fade && mins <= start + period)  {
    
analogWrite(ledPin, map(mins - start - period + fade, 0, fade, ledMax, 0));
  
}// This is sunset. LEDs slowly fade out.

}



/***** RTC Functions *******/

/***************************/

// Convert normal decimal numbers to binary coded decimal

byte decToBcd(byte val)

{
  
return ( (val/10*16) + (val%10) );

}



// Convert binary coded decimal to normal decimal numbers

byte bcdToDec(byte val)

{
  
return ( (val/16*10) + (val%16) );

}



// 1) Sets the date and time on the ds1307

// 2) Starts the clock

// 3) Sets hour mode to 24 hour clock

// Assumes you're passing in valid numbers.



/* //remove the forward slash and asterisk at the far left to activate the time date setting code




void setDateDs1307(byte second, // 0-59 
                   
byte minute, // 0-59
                   
byte hour, // 1-23
                   
byte dayOfWeek, // 1-7
              
byte dayOfMonth, // 1-28/29/30/31
                   
byte month, // 1-12
                   
byte year) // 0-99

{
   
Wire.beginTransmission(DS1307_I2C_ADDRESS);
   
Wire.send(0);
   
Wire.send(decToBcd(second));
   
Wire.send(decToBcd(minute));
   
Wire.send(decToBcd(hour));
   Wire.send(decToBcd(dayOfWeek));
   
Wire.send(decToBcd(dayOfMonth));
   
Wire.send(decToBcd(month));
   
Wire.send(decToBcd(year));
   
Wire.endTransmission();
     
                             

}

*/ //remove the forward slash and asterisk at the far left to activate the time date setting code



// Gets the date and time from the ds1307 via the I2C protocol.

void getDateDs1307(byte *second,
          
byte *minute,
          
byte *hour,
          
byte *dayOfWeek,
          
byte *dayOfMonth,
          
byte *month,
          
byte *year)

{
  
Wire.beginTransmission(DS1307_I2C_ADDRESS);
  
Wire.send(0);
  
Wire.endTransmission();

  

Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  
*second     = bcdToDec(Wire.receive() & 0x7f);
  
*minute     = bcdToDec(Wire.receive());
  
*hour       = bcdToDec(Wire.receive() & 0x3f);
  
*dayOfWeek  = bcdToDec(Wire.receive());
  
*dayOfMonth = bcdToDec(Wire.receive());
  
*month      = bcdToDec(Wire.receive());
  
*year  = bcdToDec(Wire.receive());

}



void setup()  { 
    


// init I2C  
  
Serial.begin(9600);
  
Wire.begin();
} 
// these functions only occur once.



/***** Main Loop ***********/

/***************************/

void loop() { 

 
 
  

// get time from RTC and put in hrs and mins variables
  
getDateDs1307(&second, &rtcMins, &rtcHrs, &dayOfWeek, &dayOfMonth, &month, &year);
  
minCounter = rtcHrs * 60 + rtcMins;
 
Serial.print(RTC.get(DS1307_HR,true)); //read the hour and also update all the values by pushing in true
  
Serial.print(":");
  
Serial.print(RTC.get(DS1307_MIN,false));//read minutes without update (false)
  
Serial.print(":");
  
Serial.print(RTC.get(DS1307_SEC,false));//read seconds
  
Serial.print("      "); // some space for a more happy life
  
Serial.print(RTC.get(DS1307_MTH,false));//read month
  
Serial.print("/");
  
Serial.print(RTC.get(DS1307_DATE,false));//read date
  
Serial.print("/");
  
Serial.print(RTC.get(DS1307_YR,false)); //read year 
  
Serial.println();


//set LED values
  
setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod, fadeDuration, oneMax);
  
setLed(minCounter, twoLed, twoStartMins, twoPhotoPeriod, fadeDuration, twoMax);
  
setLed(minCounter, threeLed, threeStartMins, threePhotoPeriod, fadeDuration, threeMax);
  
setLed(minCounter, fourLed, fourStartMins, fourPhotoPeriod, fadeDuration, fourMax);
 
setLed(minCounter, fiveLed, fiveStartMins, fivePhotoPeriod, fadeDuration, fiveMax);
   
setLed(minCounter, sixLed, sixStartMins, sixPhotoPeriod, fadeDuration, sixMax);
 
// Get ready for next iteration of loop
  
delay(1000);

}
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 09:27 PM   #114
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

Ok, so here's a bit of a breakdown of what's going on.

I cut and pasted the code you posted and verified it. This is what came up:

'RTC' was not declared in this scope

SmartyCat_6_channel_codeB.cpp:65:21: error: DS1307.h: No such file or directory
SmartyCat_6_channel_codeB.cpp: In function 'void loop()':
SmartyCat_6_channel_codeB:337: error: 'RTC' was not declared in this scope
SmartyCat_6_channel_codeB:337: error: 'DS1307_HR' was not declared in this scope
SmartyCat_6_channel_codeB:341: error: 'DS1307_MIN' was not declared in this scope
SmartyCat_6_channel_codeB:345: error: 'DS1307_SEC' was not declared in this scope
SmartyCat_6_channel_codeB:349: error: 'DS1307_MTH' was not declared in this scope
SmartyCat_6_channel_codeB:353: error: 'DS1307_DATE' was not declared in this scope
SmartyCat_6_channel_codeB:357: error: 'DS1307_YR' was not declared in this scope

So, I add this: #include <DS1307RTC.h> and this is what I get:

'class DS1307RTC.h' has no member named 'get'

In file included from SmartyCat_6_channel_codeB.cpp:1:
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:9:18: error: Time.h: No such file or directory
SmartyCat_6_channel_codeB.cpp:67:21: error: DS1307.h: No such file or directory
In file included from SmartyCat_6_channel_codeB.cpp:1:
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:17: error: 'time_t' does not name a type
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:18: error: 'time_t' has not been declared
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:19: error: 'tmElements_t' has not been declared
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:20: error: 'tmElements_t' has not been declared
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:23: error: 'uint8_t' does not name a type
/Users/seankelly/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.h:24: error: 'uint8_t' does not name a type
SmartyCat_6_channel_codeB.cpp: In function 'void loop()':
SmartyCat_6_channel_codeB:339: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:339: error: 'DS1307_HR' was not declared in this scope
SmartyCat_6_channel_codeB:343: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:343: error: 'DS1307_MIN' was not declared in this scope
SmartyCat_6_channel_codeB:347: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:347: error: 'DS1307_SEC' was not declared in this scope
SmartyCat_6_channel_codeB:351: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:351: error: 'DS1307_MTH' was not declared in this scope
SmartyCat_6_channel_codeB:355: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:355: error: 'DS1307_DATE' was not declared in this scope
SmartyCat_6_channel_codeB:359: error: 'class DS1307RTC' has no member named 'get'
SmartyCat_6_channel_codeB:359: error: 'DS1307_YR' was not declared in this scope

So, I add: #include <Time.h> and I end up with:

SmartyCat_6_channel_codeB.cpp:69:21: error: DS1307.h: No such file or directory
SmartyCat_6_channel_codeB:76: error: 'byte second' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:93: error: previous declaration of 'int second(time_t)'
SmartyCat_6_channel_codeB:76: error: 'byte month' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:99: error: previous declaration of 'int month(time_t)'
SmartyCat_6_channel_codeB:76: error: 'byte year' redeclared as different kind of symbol
/Users/seankelly/Documents/Arduino/libraries/Time/Time.h:101: error: previous declaration of 'int year(time_t)'
SmartyCat_6_channel_codeB.cpp: In function 'void loop()':
SmartyCat_6_channel_codeB:337: error: cannot resolve overloaded function 'second' based on conversion to type 'byte*'
SmartyCat_6_channel_codeB:341: error: 'DS1307_HR' was not declared in this scope
SmartyCat_6_channel_codeB:345: error: 'DS1307_MIN' was not declared in this scope
SmartyCat_6_channel_codeB:349: error: 'DS1307_SEC' was not declared in this scope
SmartyCat_6_channel_codeB:353: error: 'DS1307_MTH' was not declared in this scope
SmartyCat_6_channel_codeB:357: error: 'DS1307_DATE' was not declared in this scope
SmartyCat_6_channel_codeB:361: error: 'DS1307_YR' was not declared in this scope

My head hurts, haha... Does this help at all, or am I just making things more difficult? should I shoot Sink a message?
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 10:07 PM   #115
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Ok, I think you have the wrong version of the DS1307 RTC library version installed. Try the ones attached. You should be able to place both of these folders (unzipped of course) into your library folder and the Arduino IDE should be able to pick the correct one.
Attached Files
File Type: zip DS1307.zip (94.8 KB, 82 views)
File Type: zip DS1307RTC.zip (2.3 KB, 64 views)
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 10:15 PM   #116
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

Win that was it. Verified with no problems. Thanks, O2! Now, to get it all wired up
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-21-2012, 10:23 PM   #117
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Quote:
Originally Posted by theblondskeleton View Post
Win that was it. Verified with no problems. Thanks, O2! Now, to get it all wired up
Cool! I's no 'Puter expert neither, but sometimes even a blind squirrel gets a nut!
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-22-2012, 02:42 AM   #118
theblondskeleton
Planted Tank Enthusiast
 
theblondskeleton's Avatar
 
PTrader: (13/100%)
Join Date: Aug 2009
Location: Vancouver, WA, USA
Posts: 545
Default

Well now I have a bit of a wiring issue - I think. The emitters were working fine until I installed my splash guard. After that, some weird stuff was going on. I was unplugging the jumpers from the inputs, and the lead for channel one touched the heat sink - and the emitters for that channel turned on. Sure enough, I checked all of them and all four channels were doing the same thing. I'm not really sure what to think, so I left it. I don't want to hijack this thread any more than I already have so I'll leave it at that until I can get it repaired. It may be next week before I get things up again, as I have no idea where to begin.
theblondskeleton is offline   Reply With Quote Quick reply to this message
Old 10-22-2012, 05:06 AM   #119
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 658
Default

Quote:
Originally Posted by theblondskeleton View Post
Well now I have a bit of a wiring issue - I think. The emitters were working fine until I installed my splash guard. After that, some weird stuff was going on. I was unplugging the jumpers from the inputs, and the lead for channel one touched the heat sink - and the emitters for that channel turned on. Sure enough, I checked all of them and all four channels were doing the same thing. I'm not really sure what to think, so I left it. I don't want to hijack this thread any more than I already have so I'll leave it at that until I can get it repaired. It may be next week before I get things up again, as I have no idea where to begin.
Send me a PM describing the "weird stuff" that was going on.
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers,iAqua Aquarium Controller , and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 10-22-2012, 06:08 PM   #120
skanderson
Planted Member
 
PTrader: (0/0%)
Join Date: Jul 2010
Location: baraboo, wi
Posts: 153
Default

ok starting to wire up my build and have a few questions. firstly i have 3 meanwell power supplies that i got cheap a while ago and was wondering if i could use one to power the chip. i have a s-320-24 meanwell. i puts out 24 volts at 12.5 amps. next i see that there are 2 power inputs on the driver. do i need to supply power to one or both. my ftdi to usb adaptor is on the way so im sure i will have questions on programming when i get that going. i will be running 3 lines of 6 cree xmls at around 2 amps ea. i am a little confused about the pwm part of the driver. wont i be able to dim it based on programming the driver and if not what do i need to wire to where to get this thing to auto dim up and down. thanks for all the help, i will post pics of the build on here as well as par numbers once the unit is up and running.
skanderson is offline   Reply With Quote Quick reply to this message
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in

Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.



Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012