Thanks everyone,
but still no luck.
I turned on verbose logging but didn't see any new info to put in a command prompt.
I am working with Arduino 11 now.
I looked at the temporary build folder and the .cpp / .h 's there seem fine, do not look garbled. I can not analyze the .o
here is the exact code I am currently working with.
All the files are included as part of the tank_final project and reside in the same folder as the .pde file.
Files are "tank.cpp" "tank.h" and the main window
With this exact setup on Arduino 11 I still see:
error: variable or field 'readTime' declared void
"tank.h" :
#define SHIFT_OUT 4
#define SHIFT_REGISTER_CLOCK 5
#define SHIFT_CLOCK 6
#define SENSOR_CLOCK 2
#define SENSOR_DATA 3
#define readHumMask B00000101
#define readTempMask B00000011
#define clearMask B00011110
#define readStatusMask B00000111
#define writeStatusMask B00000110
#define softResetMask B00011110
#define heatOn B00000100
#define heatOff 0
typedef struct {
int hour;
int minute;
int second;
int month;
int day_of_week;
int day;
int year;
} time;
// TIME
void readTime(time *retTime);
"tank.cpp" :
#include <Wire.h>
void readTime(time *retTime) {
int hour;
int minute;
int second;
int month;
int day_of_week;
int day;
int year;
// Below required to reset the register address to 0.
Wire.beginTransmission(104); // transmit to device #104, the ds 1307
Wire.send(0x00);
Wire.endTransmission(); // stop transmitting
Wire.requestFrom(104, 7); // request 7 bytes from slave ds1307, we'll assume it'll send them all even though it doesn't have to
second = Wire.receive();
minute = Wire.receive();
hour = Wire.receive();
day_of_week=Wire.receive();
day = Wire.receive();
month = Wire.receive();
year = Wire.receive();
// Convert all the BCD values that might have "tens" to decimal. Most arduino folks do this w/shifts but this just looks easier to me.
hour=hour/16 * 10 + hour % 16;
minute=minute/16 * 10 + minute % 16;
second=second/16 * 10 + second % 16;
day=day/16 * 10 + day % 16;
month=month/16 * 10 + month % 16;
year=2000 + year/16 * 10 + year % 16;
Serial.print(hour);
Serial.print(":");
if (minute < 10) { Serial.print("0"); }
Serial.print(minute);
Serial.print(":");
if (second < 10) { Serial.print("0"); }
Serial.print(second);
Serial.print(" ");
Serial.print(dow[day_of_week-1]); // array is 0-6, but the dow register holds 1-7, so subtract 1.
Serial.print(", ");
Serial.print(month);
Serial.print("/");
Serial.print(day);
Serial.print("/");
Serial.print(year);
Serial.print("\n");
retTime->hour = hour;
retTime->minute = minute;
retTime->second = second;
retTime->month = month;
retTime->day_of_week = day_of_week;
retTime->day = day;
retTime->year = year;
}
Main Window:
#include <Wire.h>
#include "Tank.h"
//remove later, for testing
byte mask1 = B10101010;
byte mask2 = B01010101;
char* dow[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
void setup() {
Wire.begin();
Serial.begin(9600);
// shift register (LED) outputs
pinMode(SHIFT_REGISTER_CLOCK, OUTPUT);
pinMode(SHIFT_CLOCK, OUTPUT);
pinMode(SHIFT_OUT, OUTPUT);
}
void loop() {
//time curTime;
//envStatus environment;
//write_led_mask(mask1);
delay(1000);
//write_led_mask(mask2);
delay(1000);
Serial.println("SSS on sensor");
// remember deal with the heat and what not
Serial.println("TTT on time");
}