# DIY Aquarium Touchscreen Controller



## Mike in MD

After seeing some amazing DIY controllers, I'm gonna have a go at it. Just had my Arduina Mega and 3.2" touchscreen delivered yesterday. 
The plan is to monitor Temp, pH, dissolved Oxygen and eventually filter output flow. Want to also be able to control my heater, Co2, and LEDS with this controller.
I have never written code before, so this is going to be a learn as I go project 

Used an existing sketch (Jarduino 1.1) to test everything out, and to give me an idea on how all the code ties in together.










Mike


----------



## drhemlock2

*hello*

i am very interested in what you are doing as i wish to do this myself and i am just starting in arduino myself what code are you using (sketch) if you would can you post it or provide a link to get it.
thanks
doc
:fish:


----------



## Mike in MD

drhemlock2 said:


> i am very interested in what you are doing as i wish to do this myself and i am just starting in arduino myself what code are you using (sketch) if you would can you post it or provide a link to get it.
> thanks
> doc
> :fish:


This is a link to the sketch I used to check everything out. I'm gonna give it a shot at writing my own though 

Jarduino 1.1


----------



## boxhead1990

Im gunna keep my eye on this one you reckon it would be able to control c02 solenoid aswell? ?

If so I might have to get someone to assemble one with an austtalian adapter 

Sent from my ST25a using Tapatalk 2


----------



## Mike in MD

boxhead1990 said:


> Im gunna keep my eye on this one you reckon it would be able to control c02 solenoid aswell? ?
> 
> If so I might have to get someone to assemble one with an austtalian adapter
> 
> Sent from my ST25a using Tapatalk 2


Yessir


----------



## boxhead1990

Il deffs keep watching this then 

Sent from my ST25a using Tapatalk 2


----------



## drhemlock2

thanks got it now going to check it out seems i blew it on installing a water heater the other day should have doulbe checked for leaks. so have to repair the problem maybe next month i can get some of the hardware for this cool project. seems whenever i try and go the cheap way i end up spending more oh well.
doc


----------



## mistergreen

Cool. Is this the Nintendo ds touchscreen?


----------



## Mike in MD

mistergreen said:


> Cool. Is this the Nintendo ds touchscreen?


I am using a SainSmart 3.2" TFT LCD Display+SainSmart TFT LCD Adjustable Shield for the Arduino 2560


----------



## Mike in MD

drhemlock2 said:


> thanks got it now going to check it out seems i blew it on installing a water heater the other day should have doulbe checked for leaks. so have to repair the problem maybe next month i can get some of the hardware for this cool project. seems whenever i try and go the cheap way i end up spending more oh well.
> doc


I know that feeling, just finally got the last of the weepers fixed on my tank over the weekend 
Now to wait on the RTC to get delivered so I can get this project moving forward.


----------



## boxhead1990

That happens to me aswell so iv spent decent money on my equipment this time round

Sent from my ST25a using Tapatalk 2


----------



## Mike in MD

Finally had some time to start playing aroud with this controller build. Pogramming it isn't as hard as it looks. This layout will change, just getting the feel for everything right now 










Gonna get the time and date working next, then the SD card. Once that's done I have to order my probes and shields then the fun begins.
Mike


----------



## boxhead1990

Looks good

Sent from my ST25a


----------



## Mike in MD

Just about got the Home screen the way I want it


----------



## Mike in MD

boxhead1990 said:


> Looks good
> 
> Sent from my ST25a


Thanks,
It's gonna be a slow process for me, I'm learning the code as I go.
Mike


----------



## flc

Looks like a fun project!

Where are you getting your sensors from?


----------



## Mike in MD

flc said:


> Looks like a fun project!
> 
> Where are you getting your sensors from?


Plan on getting them from Atlas Scientific.
Mike


----------



## Mike in MD

Time and date now working










Need to clean up my code and start building my menu pages. Will eventually have icons on the lower right hand corner of screen for navigation

Mike


----------



## iano7000

Looks good so far. I might have to steal the idea of Room Temperature for my own design.


----------



## Bryanmc1988

you should make a guide thread on your steps and how you made one... i would love to make my own controller but i'm not sure how to even get all that reading and etc u got from... if you do make a guide ... let me know i would most likely do one also


----------



## Mike in MD

Bryanmc1988 said:


> you should make a guide thread on your steps and how you made one... i would love to make my own controller but i'm not sure how to even get all that reading and etc u got from... if you do make a guide ... let me know i would most likely do one also


Once I get everything set up and working, I plan on doing that. It'll be a ways down the road, this is kinda a rainy day project right now due to work.
Mike


----------



## Mike in MD

Got the set Time/Date screen working last night. Still have to add option for 12/24 hr format, and get it to return to main screen.










Ordering my Temp, pH probes and relays next week, hoping to have most of it working by the end of the month


----------



## boxhead1990

Il be ordering my touchscreen and mainboard next week hopefully so im deffinatly interested in seeing what sheilds you use with it 

Il be using mine to control 2 parastaltic pumps for my macro's and micros mainly

So im interested in how your interface is programed and such

Sent from my ST25a


----------



## Mike in MD

boxhead1990 said:


> Il be ordering my touchscreen and mainboard next week hopefully so im deffinatly interested in seeing what sheilds you use with it
> 
> Il be using mine to control 2 parastaltic pumps for my macro's and micros mainly
> 
> So im interested in how your interface is programed and such
> 
> Sent from my ST25a


Most of what I have is placeholders right now. I'm still getting a feel for the programming end of it. I have the clock fully working, and when I go on vacation next month I will be getting pretty much everything else working.
Right now I have the 3.2'' Touchscreen, touchscreen shield, DS1307 breakout board, Arduino Mega 2560, and 2 temp probes. Still have to get the pH and O2 breakout boards, relays and SD card. I can PM you the code I have right now, but it needs a lot of cleaning up
Mike


----------



## boxhead1990

Well im a few weeks from having mine yet il pm you when I get it as your pretty much taking the same route im gunna be going down so il borrow some code when iv gotten it all in the mail 

Cheers

Sent from my ST25a


----------



## Mike in MD

boxhead1990 said:


> Well im a few weeks from having mine yet il pm you when I get it as your pretty much taking the same route im gunna be going down so il borrow some code when iv gotten it all in the mail
> 
> Cheers
> 
> Sent from my ST25a


Sounds good, I'll keep an eye out for it roud:


----------



## boxhead1990

By anychance have you worked out how to drive led in a cost effective way from it at all I keep turning up dead ends shield wise

Sent from my ST25a


----------



## Mike in MD

boxhead1990 said:


> By anychance have you worked out how to drive led in a cost effective way from it at all I keep turning up dead ends shield wise
> 
> Sent from my ST25a


I'm still checking into DIY drivers. I want to be able to dim down to 0%.
Mike


----------



## boxhead1990

Have a look around someone built one from a atx power supply but im not sute how they got it to dim tho

I think it was on this forum possably aswell

Sent from my ST25a


----------



## Mike in MD

boxhead1990 said:


> Have a look around someone built one from a atx power supply but im not sute how they got it to dim tho
> 
> I think it was on this forum possably aswell
> 
> Sent from my ST25a


I'm using Meanwells on my DIY LED's right now, they just don't dim past 11%. O2surplus has quite a few DIY drivers he has done, thinking about getting a board made for one of his designs.
Mike


----------



## boxhead1990

Ahh yeah im gunna keep hunting around for a driver

Sent from my ST25a


----------



## RossMartin

I'm really interested in doing something like this. Could you please list the parts you are using and where you got them from??

Thanks

Ross


----------



## boxhead1990

There listed a bit further up but he hasnt finished it yet

Sent from my ST25a


----------



## boxhead1990

Ordered most of my arduino stuff today
I grabed the same touchscreen and mega kit
Real time shield
And a led driver shield. It's got 6 channels and has a input of up to 30v so I'm curious to get the unit to have a play around looks like I'm gunna be running parallel instead of in series with it and I think I got a motor shiel too just need my dosing pumps(in a fortnight a time il order them)

I can pm you a link to the driver shield if you are interested was only aus $22


----------



## Mike in MD

boxhead1990 said:


> Ordered most of my arduino stuff today
> I grabed the same touchscreen and mega kit
> Real time shield
> And a led driver shield. It's got 6 channels and has a input of up to 30v so I'm curious to get the unit to have a play around looks like I'm gunna be running parallel instead of in series with it and I think I got a motor shiel too just need my dosing pumps(in a fortnight a time il order them)
> 
> I can pm you a link to the driver shield if you are interested was only aus $22


That would be cool, would like to check it out :thumbsup:


----------



## Mike in MD

RossMartin said:


> I'm really interested in doing something like this. Could you please list the parts you are using and where you got them from??
> 
> Thanks
> 
> Ross


Ordered most of my parts from here

http://imall.iteadstudio.com/

The post below has the link to the guide I used to get started

http://www.plantedtank.net/forums/showpost.php?p=2027652&postcount=3


----------



## mrblah

did you use wire.h for your ds1307 ? I've had trouble with jarduino's code and knock off ds13072's


----------



## catfishbi

U have to have double E to do this  to hard for me T.T


----------



## Mike in MD

mrblah said:


> did you use wire.h for your ds1307 ? I've had trouble with jarduino's code and knock off ds13072's


Sorry it took a bit to answer, been preoccupied with storm prep.
I used the DS1307 library only, had to solder a wire to the +5V pad on the Arduino to power the breakout board


----------



## SteveRoehrs

*Diy2*

Hey sounds like I'm not alone then!
I'm planning on doing the same thing - mainly for light control, maybe an automatic feeder in the near future. I had already blown (burnt, smoked, nearly started a fire) two of the fluoro ballasts so I've replaced them with LED strips. Pics are here if you're interested: http://electronicmenagerie.blogspot.com.au/

I want to try and build a cutdown version of jarduino, just using an atmega328P (ie the chip in the Arduino Uno), some transistors for PWM driving (dimming) the lights, a few temperature sensors, and a small LCD with buttons. LCDs big enough to have a touch screen end up taking up most of the pins and not leaving many for I/O - and the flash is smaller on a Uno so it could be a squeeze. I'll post here to let you know how it goes.

Boxhead - where in Oz are you? I'm in Adelaide.

cheers
Steve


----------



## boxhead1990

I was wondring if that storm had come through yet

Sent from my GT-S5830 using Tapatalk 2


----------



## Mike in MD

boxhead1990 said:


> I was wondring if that storm had come through yet
> 
> Sent from my GT-S5830 using Tapatalk 2


Done been here and gone. We made it through without losing power, NJ and NY got hammered really bad


----------



## boxhead1990

Ahh yeah my cousin was on holiday in hawaii(hondalulu???) when that sunami come through

So there was deffs [censored][censored][censored][censored] going diwn this week 

Good that you didnt loose power that woulda sucked

Sent from my GT-S5830 using Tapatalk 2


----------



## boxhead1990

Iv got mu arduino and touchscreen today yay 

Sent from my GT-S5830 using Tapatalk 2


----------



## Mike in MD

boxhead1990 said:


> Iv got mu arduino and touchscreen today yay
> 
> Sent from my GT-S5830 using Tapatalk 2


Good deal 
I start my vacation this Saturday coming up. I have to plumb my wet/dry in on my 65, then I have 8 days to concentrate on writing code on mine.
Mike


----------



## boxhead1990

Sweet and i couldnt get that jarduino sketch to work either

All i could is get the lcd test i found to work n thats it haha

Sent from my GT-S5830 using Tapatalk 2


----------



## Darkblade48

An interesting thread that I'll be following. I had the initial ideas to just build a simple pH controller to control CO2, but then thought, why not go all the way and have something similar to a reef controller?

Then that snowballed into "Let's have a touchscreen LCD too!"....and here I am today. :icon_roll

I'd be interested to see the coding that you have done so far too; I haven't actually started coding yet, but have gathered all the parts (lying at home)...


----------



## boxhead1990

Im slowly trying to work it all out iv bought most of what i need just waiting for it all to come in the post and trying to figure out these sketches

Sent from my GT-S5830 using Tapatalk 2


----------



## boxhead1990

Mike in MD said:


> Good deal
> I start my vacation this Saturday coming up. I have to plumb my wet/dry in on my 65, then I have 8 days to concentrate on writing code on mine.
> Mike


I got my driver sheild but they havent supplied me with anything to tell me much more then the ebay add lol 


Pretty disapointing as i have no idea on how i can possably test it............



Sent from my GT-S5830 using Tapatalk 2


----------



## Mike in MD

Pm me in the AM and we'll get ya going. I have to work late tonight 
Mike

Sent from my SGH-T679 using Tapatalk 2


----------



## boxhead1990

Oh il just pm you now have no idea whay the time differance is im in brisbane australia lol

Sent from my GT-S5830 using Tapatalk 2


----------



## Mike in MD

boxhead1990 said:


> Oh il just pm you now have no idea whay the time differance is im in brisbane australia lol
> 
> Sent from my GT-S5830 using Tapatalk 2


Apparently a BIG difference, it's 2AM here 
PM'd ya back
Mike


----------



## boxhead1990

here il copy and paste this here 

this is the error im getting and when i look at it all i have no bloody clue what im looking at and what half of alot of the stuff i have been reading is telling me to do.....

and here is the only sketch iv been able to get to work out of all the ones thats in there as examples ect:


#define LCD_RS 38 
#define LCD_WR 39 
#define LCD_CS 40 
#define LCD_REST 41

#define DCLK 6
#define CS 5 
#define DIN 4 
#define DOUT 3
#define IRQ 2 

unsigned int TP_X,TP_Y;
void spistar() //SPI Start
{
digitalWrite(CS,HIGH);
digitalWrite(DCLK,HIGH);
digitalWrite(DIN,HIGH);
digitalWrite(DCLK,HIGH);

}
//**********************************************************
void WriteCharTo7843(unsigned char num) //SPI Write Data
{
unsigned char count=0;
unsigned char temp;
unsigned nop;
temp=num;
digitalWrite(DCLK,LOW);
for(count=0;count<8;count++)
{
if(temp&0x80)
digitalWrite(DIN,HIGH);
else
digitalWrite(DIN,LOW);

temp=temp<<1; 

digitalWrite(DCLK,LOW); 
nop++;
nop++;
digitalWrite(DCLK,HIGH);
nop++;
nop++;
}
}

//**********************************************************
unsigned int ReadFromCharFrom7843() //SPI Read Data
{ 
unsigned nop;
unsigned char count=0;
unsigned int Num=0;
for(count=0;count<12;count++)
{
Num<<=1;
digitalWrite(DCLK,HIGH);//DCLK=1; _nop_();_nop_();_nop_(); 
nop++;
digitalWrite(DCLK,LOW);//DCLK=0; _nop_();_nop_();_nop_();
nop++;
if(digitalRead(DOUT)) Num++;
}
return(Num);
}

void AD7843(void) 
{
digitalWrite(CS,LOW); 
WriteCharTo7843(0x90); 
digitalWrite(DCLK,HIGH);
digitalWrite(DCLK,LOW); 
TP_Y=ReadFromCharFrom7843();
WriteCharTo7843(0xD0); 
digitalWrite(DCLK,HIGH);
digitalWrite(DCLK,LOW);
TP_X=ReadFromCharFrom7843();
digitalWrite(CS,HIGH);
}



void Lcd_Writ_Bus(char VH,char VL)
{
unsigned char i,temp,data; 
data=VH;
for(i=22;i<=29;i++)
{
temp=(data&0x01);
if(temp)
digitalWrite(i,HIGH);
else
digitalWrite(i,LOW);
data=data>>1;
} 
data=VL; 
for(i=37;i>=30;i--)
{
temp=(data&0x01);
if(temp)
digitalWrite(i,HIGH);
else
digitalWrite(i,LOW);
data=data>>1;
}	
digitalWrite(LCD_WR,LOW);
digitalWrite(LCD_WR,HIGH);
}


void Lcd_Write_Com(char VH,char VL) 
{ 
digitalWrite(LCD_RS,LOW);
Lcd_Writ_Bus(VH,VL);
}

void Lcd_Write_Data(char VH,char VL)
{
digitalWrite(LCD_RS,HIGH);
Lcd_Writ_Bus(VH,VL);
}

void Lcd_Write_Com_Data(int com,int dat)
{
Lcd_Write_Com(com>>8,com);
Lcd_Write_Data(dat>>8,dat);
}

void Address_set(unsigned int x1,unsigned int y1,unsigned int x2,unsigned int y2)
{
Lcd_Write_Com_Data(0x0044,(x2<<8)+x1);
Lcd_Write_Com_Data(0x0045,y1);
Lcd_Write_Com_Data(0x0046,y2);
Lcd_Write_Com_Data(0x004e,x1);
Lcd_Write_Com_Data(0x004f,y1);
Lcd_Write_Com(0x00,0x22); 
}

void Lcd_Init(void)
{
digitalWrite(LCD_REST,HIGH);
delay(5); 
digitalWrite(LCD_REST,LOW);
delay(15);
digitalWrite(LCD_REST,HIGH);
delay(15);

Lcd_Write_Com_Data(0x0000,0x0001); delay(1); //打开晶振
Lcd_Write_Com_Data(0x0003,0xA8A4); delay(1); //0xA8A4
Lcd_Write_Com_Data(0x000C,0x0000); delay(1); 
Lcd_Write_Com_Data(0x000D,0x080C); delay(1); 
Lcd_Write_Com_Data(0x000E,0x2B00); delay(1); 
Lcd_Write_Com_Data(0x001E,0x00B7); delay(1); 
Lcd_Write_Com_Data(0x0001,0x2B3F); delay(1); //驱动输出控制320*240 0x6B3F
Lcd_Write_Com_Data(0x0002,0x0600); delay(1);
Lcd_Write_Com_Data(0x0010,0x0000); delay(1);
Lcd_Write_Com_Data(0x0011,0x6070); delay(1); //0x4030 //定义数据格式 16位色 
Lcd_Write_Com_Data(0x0005,0x0000); delay(1);
Lcd_Write_Com_Data(0x0006,0x0000); delay(1);
Lcd_Write_Com_Data(0x0016,0xEF1C); delay(1);
Lcd_Write_Com_Data(0x0017,0x0003); delay(1);
Lcd_Write_Com_Data(0x0007,0x0233); delay(1); //0x0233 
Lcd_Write_Com_Data(0x000B,0x0000); delay(1);
Lcd_Write_Com_Data(0x000F,0x0000); delay(1); //扫描开始地址
Lcd_Write_Com_Data(0x0041,0x0000); delay(1);
Lcd_Write_Com_Data(0x0042,0x0000); delay(1);
Lcd_Write_Com_Data(0x0048,0x0000); delay(1);
Lcd_Write_Com_Data(0x0049,0x013F); delay(1);
Lcd_Write_Com_Data(0x004A,0x0000); delay(1);
Lcd_Write_Com_Data(0x004B,0x0000); delay(1);
Lcd_Write_Com_Data(0x0044,0xEF00); delay(1);
Lcd_Write_Com_Data(0x0045,0x0000); delay(1);
Lcd_Write_Com_Data(0x0046,0x013F); delay(1);
Lcd_Write_Com_Data(0x0030,0x0707); delay(1);
Lcd_Write_Com_Data(0x0031,0x0204); delay(1);
Lcd_Write_Com_Data(0x0032,0x0204); delay(1);
Lcd_Write_Com_Data(0x0033,0x0502); delay(1);
Lcd_Write_Com_Data(0x0034,0x0507); delay(1);
Lcd_Write_Com_Data(0x0035,0x0204); delay(1);
Lcd_Write_Com_Data(0x0036,0x0204); delay(1);
Lcd_Write_Com_Data(0x0037,0x0502); delay(1);
Lcd_Write_Com_Data(0x003A,0x0302); delay(1);
Lcd_Write_Com_Data(0x003B,0x0302); delay(1);
Lcd_Write_Com_Data(0x0023,0x0000); delay(1);
Lcd_Write_Com_Data(0x0024,0x0000); delay(1);
Lcd_Write_Com_Data(0x0025,0x8000); delay(1);
Lcd_Write_Com_Data(0x004f,0); //行首址0
Lcd_Write_Com_Data(0x004e,0); //列首址0
Lcd_Write_Com(0x00,0x22);	

}

void Pant(char VH,char VL)
{
int i,j;
digitalWrite(LCD_CS,LOW); 
Address_set(0,0,239,319);
for(i=0;i<320;i++)
{
for (j=0;j<240;j++)
{
Lcd_Write_Data(VH,VL);
}

}
digitalWrite(LCD_CS,HIGH); 
}

void setup()
{
for(int p=22;p<42;p++)
{
pinMode(p,OUTPUT);
}
for(int p=2; p<7;p++)
pinMode(p,OUTPUT);
pinMode(DOUT,INPUT);
pinMode(IRQ,INPUT);

Lcd_Init(); 
Pant(0x00,0xff); 
}

void loop()
{
Pant(0xff, 0xff);
delay(500);

unsigned char flag;
unsigned char ss[6];	
unsigned int lx,ly;
spistar(); 

while(1)
{
flag = digitalRead(IRQ); 
if (flag == 0)
{ 
digitalWrite(LCD_CS,LOW); 
AD7843();
lx=((TP_X-340)*10/144);
//if(lx>237) lx=237;
ly=320-((TP_Y-320)/11);
//if(ly<0) ly=0;
Address_set(lx,ly,lx+2,ly+2);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
Lcd_Write_Data(0,255);
digitalWrite(LCD_CS,HIGH); 
}
}
}


----------



## boxhead1990

oops forgot to copy the error thingy

anyways here it is



In file included from Jarduino_v1_1.cpp:79:
/writeAnything.h: In function 'int EEPROM_writeAnything(int, const T&)':
writeAnything.h:2: error: expected initializer before '*' token
writeAnything.h:5: error: 'p' was not declared in this scope
/writeAnything.h: In function 'int EEPROM_readAnything(int, T&)':
writeAnything.h:11: error: 'byte' was not declared in this scope
writeAnything.h:11: error: 'p' was not declared in this scope
writeAnything.h:11: error: expected primary-expression before ')' token
writeAnything.h:11: error: expected primary-expression before 'void'
Jarduino_v1_1.cpp: At global scope:
Jarduino_v1_1.pde:-1: error: 'ITDB02' does not name a type
Jarduino_v1_1.pde:-1: error: 'ITDB02_Touch' does not name a type
Jarduino_v1_1.pde:-1: error: expected constructor, destructor, or type conversion before 'extern'
Jarduino_v1_1.pde:-1: error: 'OneWire' does not name a type
Jarduino_v1_1.pde:-1: error: 'DallasTemperature' does not name a type
Jarduino_v1_1.pde:-1: error: 'DeviceAddress' does not name a type
Jarduino_v1_1.pde:-1: error: 'DeviceAddress' does not name a type
Jarduino_v1_1.pde:-1: error: 'DeviceAddress' does not name a type
Jarduino_v1_1.cpp: In function 'void SaveRTC()':
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_SEC' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_MIN' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_HR' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_DATE' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_MTH' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'DS1307_YR' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void TimeDateBar(boolean)':
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void checkTempC()':
Jarduino_v1_1.pde:-1: error: 'sensors' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'waterThermometer' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'hoodThermometer' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'sumpThermometer' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void clearScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void printButton(char*, int, int, int, int, boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'SmallFont' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void printLedChangerP(char*, int, int, int, int, boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'SmallFont' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void printLedChangerM(char*, int, int, int, int, boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'SmallFont' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void printHeader(char*)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void setFont(boolean, byte, byte, byte, byte, byte, byte)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'SmallFont' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void waitForIt(int, int, int, int)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void waitForItSq(int, int, int, int)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void drawBarGraph()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void drawBarandColorValue()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void ledChangerGadget()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void TimeSaver(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void screenSaver()':
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void genSetSelect()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void feedingTimeOnOff()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void mainScreen(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void screenReturn()':
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void menuScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void clockScreen(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void timeChange()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void timeCorrectFormat()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void tempScreen(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void ledTestOptionsScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void testArrayScreen(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.cpp: In function 'void testIndLedScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void ledColorViewScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void ledValuesScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void ledChangeScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void WaveMakerButtons()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void WaveMakerScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void viewWaveTimes()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void WaveMakerStatusScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void WaveMakerSettingsScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void synchronousSynch()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void viewWaveTimesPage()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void waveModePlusMinus()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void generalSettingsScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void autoFeederScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void feedingTimeOutput()':
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void setFeederTimesScreen(boolean)':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void AboutScreen()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void processMyTouch()':
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'CENTER' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void setup()':
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'LANDSCAPE' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'PREC_MEDIUM' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'sensors' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'waterThermometer' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'hoodThermometer' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'sumpThermometer' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope
Jarduino_v1_1.cpp: In function 'void loop()':
Jarduino_v1_1.pde:-1: error: 'myTouch' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'myGLCD' was not declared in this scope
Jarduino_v1_1.pde:-1: error: 'RTC' was not declared in this scope


----------



## Mike in MD

Lets get the screen working and go from there.

First off, you need to go to file - examples - ITDB02_Touch - Touch calibration.

Go through the steps, and it will give you 4 numbers. Write these numbers down, you'll need them for the next step

Next, go to libraries - ITDB02_Touch Folder, open it and go to ITDB02_Touch.cpp
You want to edit this file. Open the file and look for this line:

#define PixSizeX	-15.38
#define PixOffsX	213
#define PixSizeY	11.15
#define PixOffsY	311

Enter the 4 numbers that you got from your touch screen calibration here, then save the file.

Next, open the Jarduinio sketch, make sure this one line looks like below:

//TOUCH PANEL and ITDB02 MEGA SHIELD 
//(Mega Shield utilizes pins 5V, 3V3, GND, 2-6, 20-41, & (50-53 for SD Card))
ITDB02 myGLCD(38,39,40,41); //May need to add "ITDB32S" depending on LCD controller
ITDB02_Touch myTouch(6,5,4,3,2);

Once you do this it should compile and be able to upload.

Mike


----------



## boxhead1990

I tryed that and it comes up with a million error codes aswell

Sent from my GT-S5830 using Tapatalk 2


----------



## Mike in MD

Which LCD do you have? Also, do you have the LCD shield for the Mega?


----------



## boxhead1990

this is the following error codes

and i ordered it all as a kit off ebay 


its all the same saitek kit that you listed as far as i no

and i even tryed the sketches that they list with it in a link and only one i could get to work with it was the one above 

getting really frustrating thats for sure

this is the item description

 Attention please:SD card does not support Mega 2560, but Arm, 51 MCU​ please use the Arduino Software version is:Arduino 0023​ We offer the sample code for arduino​ Tip: ​ there is a film on the LCD, if there is scratch on the film when you receive the item, pls try to remove the film with your finger nail from the corner of the LCD, thanks​  before get it to work, firstly need to connect the TFT shield with mega 2560, then connect LCD with TFT shiled , and need to put the sample code into Mega 2560. these points are necesssary.
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​*   ​​​ ​​​ ​ Package include: ​  1x ATmega2560-16AU mega board for Arduino​  1x LCD TFT Mega 2560 Shield v1.2
 1x 3.2" TFT LCD Touch Screen Module
  ​ ​ ​
​
*


----------



## Mike in MD

I would get a hold of the seller and let him know that you got a bad kit (mainboard). Most of the Chinese mainboard "knockoffs" have issues. 

This is the Mainboard that you want to get.


----------



## boxhead1990

that looks exactly like the one i bought and i can get it to do all those blink things and stuff in examples


i just have no idea why i cant get it to load programes like everyone else 
i mean i shoulnt have so many issues getting this jarduino stuff to simply just work


----------



## Mike in MD

boxhead1990 said:


> that looks exactly like the one i bought and i can get it to do all those blink things and stuff in examples
> 
> 
> i just have no idea why i cant get it to load programes like everyone else
> i mean i shoulnt have so many issues getting this jarduino stuff to simply just work


Exactly, that is why I am leading towards the mainboard being bad or having other issues. You should have not had any issues loading any of the examples. I got the Jarduino sketch to load up my first try. 
If you look at the upper left hand corner of my board, you will see "Made in Italy" This is the real Arduino board, anything else is a knockoff and you are taking a chance with it. I ordered my mainboard off of Amazon.com.

Edit: It could be a firmware issue also


----------



## boxhead1990

yeah mine doesnt have made in itally on it its about the only diffwerance i can find with it 


maybe it is a firmware issue how the hell do i change the firmware ????


----------



## Mike in MD

boxhead1990 said:


> yeah mine doesnt have made in itally on it its about the only diffwerance i can find with it
> 
> 
> maybe it is a firmware issue how the hell do i change the firmware ????


You would have to check the manufactures website, and download it from there. As far as uploading it, I have no clue.....


----------



## boxhead1990

Il have a look into it tomorow see what i can turn up

Sent from my GT-S5830 using Tapatalk 2


----------



## mistergreen

Try loading a sample sketch to see if its a defective arduino.


----------



## boxhead1990

it does load the blink and one of the screen test's which displays a blue box that moves across the screen


----------



## mistergreen

Here you go 
http://arduino.cc/en/Hacking/DFUProgramming8U2


----------



## boxhead1990

cheers


----------



## Drowki

hey bud, my parts came in and I put the three pieces together. I followed the instructions for the Aquarium Controller. Now I am stuck, all I am getting is a white LCD screen. I tried various examples and they all do not work. 

Anything I could be doing possibly wrong?


----------



## boxhead1990

Above there's a link that you can try, it has a lot of usegfull info too

Sent from my MZ601 using Tapatalk 2


----------



## Mike in MD

Drowki said:


> hey bud, my parts came in and I put the three pieces together. I followed the instructions for the Aquarium Controller. Now I am stuck, all I am getting is a white LCD screen. I tried various examples and they all do not work.
> 
> Anything I could be doing possibly wrong?


What parts did you order? Depending on shield/lcd combo you need to make sure the sketch is modified for them. Ill be away from my computer today, ill try to post tonite what lines need modified.

Sent from my SGH-T679 using Tapatalk 2


----------



## Drowki

Mike in MD said:


> What parts did you order? Depending on shield/lcd combo you need to make sure the sketch is modified for them. Ill be away from my computer today, ill try to post tonite what lines need modified.
> 
> Sent from my SGH-T679 using Tapatalk 2


 
Hehheh the ones you told me:

Arduino Mega 2560 R3 (Amazon.com)
ITDB02 Arduino MEGA Shield
ITDB02-3.2S


----------



## Darkblade48

I assume all the coding compiles fine?

If so, then it might be a hardware issue. Check to make sure you have everything plugged in, etc (the basics).

Some things to consider:

Is the sample code made for an older version of the Arduino coding software (i.e. 0023)?

Did you update your libraries?

If anything, I would check the sample code to see if it was made with an older version, and if it was, compile and upload to try that instead.


----------



## Mike in MD

Drowki said:


> Hehheh the ones you told me:
> 
> Arduino Mega 2560 R3 (Amazon.com)
> ITDB02 Arduino MEGA Shield
> ITDB02-3.2S


Ooops I forgot LOL!!!!
Did you download and install Arduino 0023???


----------



## mistergreen

Make sure to select the correct board in the arduino app under /tools/board


----------



## drewsuf82

This thread is subbed


----------



## drhemlock2

*white screen problems*

having done a lot of research on this project(jarduino) it appears that several types of boards (Touch screens) are supported. in the sketch you have several of them commented out. what needs to be done is to comment out the one that is currently being used (not commeted out) then compile the sketch until you get one that works. then there is somecalibration that needs to be down with the Touch Screen to make it all line up.
doc
the way you comment things out in the code is by using "//" or "/*at first of code */ at the end of code. i hope this helps if not i can find out what other settings will work for you. i hope
doc


----------



## Drowki

mistergreen said:


> Make sure to select the correct board in the arduino app under /tools/board


I selected the board, and installed the driver. I would think the screen would not just appear white. I tried putting other codes in there and tests, and it doesnt work.


----------



## Mike in MD

Drowki said:


> I selected the board, and installed the driver. I would think the screen would not just appear white. I tried putting other codes in there and tests, and it doesnt work.


Have you cleared the EEPROM? You have to modify the example sketch to "4096" and run it. Then try uploading again.
Mike


----------



## Mike in MD

For those who have the Sainsmart Mega shield and cannot get the SD card working, I came across a website which shows the modification that is needed to get it working.
It requires a steady hand and some surgery on the board :icon_roll
I can confirm that it does work.
I have a bad DS1307 board, waiting for it to be delivered. I have a bug in the time code I need to work out. I do have my temp probes working now


----------



## mistergreen

On simple lcds, you adjust the contrast with a pot so you can see. Would it be the same for this screen?


----------



## Mike in MD

mistergreen said:


> On simple lcds, you adjust the contrast with a pot so you can see. Would it be the same for this screen?


Yes, if you look at the above picture, the blue pot is the screen adjustment


----------



## mistergreen

On a side topic.. How is this keeping date and time?
In a standalone app (not plugged into the computer), is it better to use an external clock like the DS1307 real time clock?

I remember the internal arduno time keeping drifts a bit and need periodic syncing.
It runs on the cycle of the processor with isn't 100% accurate?


----------



## Darkblade48

mistergreen said:


> On a side topic.. How is this keeping date and time?
> In a standalone app (not plugged into the computer), is it better to use an external clock like the DS1307 real time clock?
> 
> I remember the internal arduno time keeping drifts a bit and need periodic syncing.
> It runs on the cycle of the processor with isn't 100% accurate?


If it is based on the Jarduino, then a DS1307 is probably used (that is what I am using as well for my own side project).

I assume that ultimately, you will want to use the controller as a standalone unit and not have it connected to a computer anyway, so a RTC would be required.

The Arduino has a way to keep track of time (the millis() function) but it resets everytime the unit loses power (i.e. it only keeps track of how long the unit has been powered on). It's not really useful for keeping time, especially if you lose power, but it can be useful to avoid using delays in code.


----------



## mistergreen

Don't most devices lose time if there's no power? You can attach a battery to the arduino in case it loses power. It handy so you don't have to reset all of the settings.


----------



## Darkblade48

mistergreen said:


> Don't most devices lose time if there's no power? You can attach a battery to the arduino in case it loses power. It handy so you don't have to reset all of the settings.


Yes, most devices will lose time if there is no power. The battery does not go directly to the Arduino per se, instead, the DS1307 RTC has space for a 2032 button battery, so it will be able to keep track of time even in case there is a power loss.

The 5V line in is so that the Arduino can query the IC for the correct date/time. Then you can throw it all onto an LCD (or have the microcontroller query the RTC if it requires that information, i.e. for a timer).


----------



## Bryanmc1988

so i got my parts into the mail a few days ago and was messing around with the codes and made a temp control for 3 tanks so that i can run 1 control for 3 tanks if needed... 


hey mike i see that you have edit a code with a ph monitor and was wondering if its working or just a dead display for now... if its working would you mind sharing your code? maybe i can grab some things you have laying around within your code...


also has anyone coded a timer to run with the arduino for say a co2 solenoid and for lighting on/off timer? if thats a yes, please share =)


----------



## Darkblade48

Bryanmc1988 said:


> also has anyone coded a timer to run with the arduino for say a co2 solenoid and for lighting on/off timer? if thats a yes, please share =)


I'm working on a pH controller that turns on/off a relay (that is hooked up to a solenoid). So far, it works fine with hard-coded pH values. 

I'm working on editing a TFT LCD for input, so that the user can adjust the pH as required, and then have the values saved to EEPROM, etc, so that the pH controller will work fine.

Of course, temperature monitor and RTC is there as well, so I can control lights, etc.

I think the lighting on/off timer shouldn't be too hard; again, just have the TFT LCD accept inputs, and have the on/off schedule values written to EEPROM so that it'll be there even if power is lost.


----------



## Bryanmc1988

Darkblade48 said:


> I'm working on editing a TFT LCD for input, so that the user can adjust the pH as required, and then have the values saved to EEPROM, etc, so that the pH controller will work fine.


That is easy to do I have it coded for a temp control and can invert it to a ph no problem but for the light timer might be hard to do and I would also need help for reading the ph probe to read the ph like the temp probe which to think about it, I think I can also invert the temp probe to work with the arduino but now sure how it would show up as I don't have a ph probe to test with


----------



## megamax42

Hey guys, loving this thread as I am in the same boat as you guys. Good to know there are others out there. I'm working with a 3.2" TFT (with SSD1289 controller) and an Arduino mega 2560. 

The only set of software I've managed to get working is a folder I downloaded named UTFT off of Henningkarlsons website. Even those however don't work seamlessly. This is the best I've been able to get with them:



















So I picked up Jarduino again and have been debugging for quite a while now. I'm using v1.1 and had to make a few modifications I picked up along the way from other programs. A big one is replacing 

# include "WProgram.h"

with 

# if (ARDUINO >= 100)
# include "Arduino.h"
# else
# include "WProgram.h"
# endif

in the ITDB02_Graph16 and ITDB02_Touch files. I'm still getting this string of errors however:

Jarduino_v1_1.cpp: In function 'void TimeDateBar(boolean)':
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.cpp: In function 'void testArrayScreen(boolean)':
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'
Jarduino_v1_1.pde:-1: error: invalid conversion from 'int' to 'const char*'
Jarduino_v1_1.pde:-1: error: initializing argument 1 of 'String& String:perator=(const char*)'


Hmm, those smiley faces in the code must be the same shortcut text lol.

Any input would be greatly appreciated, sorry to thread-jack :help:


----------



## mistergreen

update the library

http://www.henningkarlsen.com/electronics/library.php?id=51


----------



## Darkblade48

mistergreen said:


> update the library
> 
> http://www.henningkarlsen.com/electronics/library.php?id=51


From what I can tell, megamax42 downloaded the UTFT library. I am not sure if he is using them, however.

megamax42, you can convert Jarduino v. 1.1 to use UTFT and the new UTouch libraries.

For Jarduino v 1.1 to work properly, you have to use the libraries that it uses, which only work under the older version of the Arduino IDE (not v 1.0 and up).


----------



## bigd603

I dont know anything about Arduino, but this thread has really sparked my interest. Do I need to get the Arduino Mega to do this, or can I get the Uno? Did you guys have any experience in programming language? I definitely do not, but I am willing to learn.


----------



## Darkblade48

bigd603 said:


> I dont know anything about Arduino, but this thread has really sparked my interest. Do I need to get the Arduino Mega to do this, or can I get the Uno? Did you guys have any experience in programming language? I definitely do not, but I am willing to learn.


To use the example code that the Jarduino uses, you will need a Mega. I do not believe there are enough I/O pins on the Uno for the 3.2" TFT LCD Touchscreen.

As for me, I did not have any experience in coding at all. I started learning C++ last November, and can work my way around the sketches now with fair confidence.


----------



## mistergreen

bigd603 said:


> I dont know anything about Arduino, but this thread has really sparked my interest. Do I need to get the Arduino Mega to do this, or can I get the Uno? Did you guys have any experience in programming language? I definitely do not, but I am willing to learn.


The arduino language is a mod of C. I'm pretty good, just ask. There's also a beginner's guide on my forum you might want to check out.

I just had an idea, why do through a touch screen when you have an iPad? You just need an wi-fi/ Ethernet Shield and an app. There are instructions on how to do this out there. It would be fun.


Sent from my iPad using Tapatalk HD


----------



## Darkblade48

mistergreen said:


> I just had an idea, why do through a touch screen when you have an iPad? You just need an wi-fi/ Ethernet Shield and an app. There are instructions on how to do this out there. It would be fun.


Definitely - using a GUI interface for Android/iPhone would be much easier; front end design using C is a hassle...

Then again, I don't know Java either, so learning another language at this point would be too much for me :icon_neut


----------



## scapegoat

i'll have months to go between the basement being done and the tank being ready to be set up... i really want to start picking up parts to jump in on this goodness!

can anyone recommend sites to read?

anyone having a shopping list w/ links for parts that'll accomplish all these tasks?


----------



## Darkblade48

scapegoat said:


> i'll have months to go between the basement being done and the tank being ready to be set up... i really want to start picking up parts to jump in on this goodness!
> 
> can anyone recommend sites to read?
> 
> anyone having a shopping list w/ links for parts that'll accomplish all these tasks?


This thread is a good start; there are some others on these forums.

If you Google Jarduino, you will also find some more information regarding that project. Older versions of the source code are open source, so you can build from there. There also is a list of some of the items that were used for that particular project, so you can see what was used, and then expand from there.


----------



## mistergreen

I was wondering, are the sensors and devices hooked up through i2c or through available digital and analog pins on this jarduino thing?

I would assume you need to define the devices somehow so then arduino can recognize them. Is it all through code? If so, that's a bit cumbersome every time you want to add a new device. We can do better for sure.


Sent from my iPad using Tapatalk HD


----------



## Darkblade48

mistergreen said:


> I was wondering, are the sensors and devices hooked up through i2c or through available digital and analog pins on this jarduino thing?
> 
> I would assume you need to define the devices somehow so then arduino can recognize them. Is it all through code? If so, that's a bit cumbersome every time you want to add a new device. We can do better for sure.
> 
> 
> Sent from my iPad using Tapatalk HD


I think the only device that is connected over I2C is the RTC. Everything else is controlled by digital pins.

And defining the devices is pretty much done via coding (and is *very* cumbersome, as you mentioned). I think the Jarduino coding makes it a little easier by separating the code into little "units" .... but it is still a hassle to work through.


----------



## bigd603

Can the Arduino store data over time? For example, can it give data on the pH, temp, etc for the past 30, 40, 60 days? Maybe presented in a graph, or at least a table?


----------



## scapegoat

bigd603 said:


> Can the Arduino store data over time? For example, can it give data on the pH, temp, etc for the past 30, 40, 60 days? Maybe presented in a graph, or at least a table?


I'd assume you'd be able to write data to the sd card and store them in files. my idea with this stuff would, since i'm a web guy, interface with a website and store the data in a database.

not having any experience with arduino itself, i can only assume that with a wifi connection one would be able to make requests to a website for that data for reading/writing purposes.

I'd fully intend on making mine a web app.


----------



## Darkblade48

bigd603 said:


> Can the Arduino store data over time? For example, can it give data on the pH, temp, etc for the past 30, 40, 60 days? Maybe presented in a graph, or at least a table?





scapegoat said:


> I'd assume you'd be able to write data to the sd card and store them in files. my idea with this stuff would, since i'm a web guy, interface with a website and store the data in a database.
> 
> not having any experience with arduino itself, i can only assume that with a wifi connection one would be able to make requests to a website for that data for reading/writing purposes.


The Arduino itself cannot store a large amount of data over time. You can have it store required data on an SD card so it can do data logging.

For interfacing with a website, the same idea can be done, but it would have to access the site every x seconds/minutes that you are measuring the data (i.e. you might want to measure temperature or pH more than once an hour...I have mine set for every 5 minutes).


----------



## bigd603

Hmm...I'm just gonna have to dive headfirst into all this stuff to really figure it out. Do you guys know where I can find the ITDB02 Arduing Mega Shield V1.1 fully assembled, or did you guys buy the kit and put it together from iMall? (http://imall.iteadstudio.com/prototyping/kits/im120717001.html). Or would something like ebay item number 271025770499 work? Man it would be way easier if we could just link to ebay auctions...


----------



## Darkblade48

bigd603 said:


> Hmm...I'm just gonna have to dive headfirst into all this stuff to really figure it out. Do you guys know where I can find the ITDB02 Arduing Mega Shield V1.1 fully assembled, or did you guys buy the kit and put it together from iMall? (http://imall.iteadstudio.com/prototyping/kits/im120717001.html). Or would something like ebay item number 271025770499 work? Man it would be way easier if we could just link to ebay auctions...


I'm not sure if the ITDB02 Arduino Mega Shield v1.1 is still sold fully assembled. For sure, it is still sold as components only, and you just have to do the soldering. It is a useful skill to pick up anyway.

The eBay item that you linked will work, but it does not have the RTC that the ITDB02 Mega Shield v1.1 has.


----------



## bigd603

Thanks for answering all my questions guys. Did any of you order from iteadstudio? If so how long did it take to arrive? I'm assuming it will be a while since its coming from China. 

Sent from my Galaxy Nexus using Tapatalk 2


----------



## bigd603

Hey Mike, did you have any problems with the Sainsmart touchscreen and shield? I saw some complaints floating around the web saying they often have errors and required a lot of reprogramming to get it up and running.


----------



## crowndroyal

After viewing this thread and project my eyes popped and I have wanted to look into something like this myself.



I have a few questions and maybe some solutions to better organize this thread a we bit. ( so rather a request )

1) How big is this touch screen ? (in inches)
2) would it be possible for you to post all the things you bought in the first post and their cost 
3) could you also post in your first post the code you used in a spoiler for each portion 
eg 

LED CODE


Spoiler



blah blah blah blah this is my code blah blah blah


Co2 CODE


Spoiler



blah blah blah blah this is my code blah blah blah


4) could you maybe share your resources on where you are learning to code all this from 
eg forums you have visited etc that would help anyone attempting this
5) Have you figure out what the code or script it uses yet ? so others may look for other screens etc may work with this protect as well.
6) a list of all the tools needed etc


I just found that reading through all posts ended up getting a little confusing and it would save you time in having to maybe help everyone else along the way through pm while your trying to figure it out yourself.

just a suggestion Mike and thanks for this lovely DIY thinking of doing this myself but wanting a bit bigger of a screen as this looks a tad small to me in pictures. ( although they are deceiving sometimes )


P.S. has anyone tried using this and would this work for adding other stuff ? http://www.ebay.ie/itm/Automatic-Di...quipment_ET&hash=item3cc9bc70f1#ht_4194wt_950

also wondering if anyone has made their own temp monitor or controller I was looking at something like this http://www.bedbathandbeyond.com/1/1/111625-pet-buddies-aquarium-temp-alert-dual-thermometer.html but also wanting something that can monitor or control my PH as well in one unit, for cheap.


----------



## mistergreen

I wouldn't recommend this project for beginners. It's not a plug and play, copy and paste project. There are lots of compatibility issues and bugs that only advanced users can handle.


Sent from my iPad using Tapatalk HD


----------



## scapegoat

mistergreen said:


> I wouldn't recommend this project for beginners. It's not a plug and play, copy and paste project. There are lots of compatibility issues and bugs that only advanced users can handle.


I completely disagree. we're not talking banking application with millions of users and dollars at stake.

Don't sway someone away from trying something that is challenging. Great insight can come from attempting something you've never done or only slightly dabbled in.

If someone can wrap their head around the code examples and "see" what is going on within those, then give this a shot.

If someone is willing to email me code as a starting point, i'd like to set up a collaborative space so people could actively work on the code "together" and keep it under version control. A project like this needs something a bit more robust than a forum post.

I'd love to give more people a chance at using this code on their own terms as well, instead of being told "you don't know enough to get it so don't try"


----------



## bigd603

scapegoat said:


> I completely disagree. we're not talking banking application with millions of users and dollars at stake.
> 
> Don't sway someone away from trying something that is challenging. Great insight can come from attempting something you've never done or only slightly dabbled in.
> 
> If someone can wrap their head around the code examples and "see" what is going on within those, then give this a shot.
> 
> If someone is willing to email me code as a starting point, i'd like to set up a collaborative space so people could actively work on the code "together" and keep it under version control. A project like this needs something a bit more robust than a forum post.
> 
> I'd love to give more people a chance at using this code on their own terms as well, instead of being told "you don't know enough to get it so don't try"


+1

Agreed. The OP himself said he didnt know any programming when he first started this project and was learning it as he went. The best way to learn something challenging is by finding something that interests you and then jump in to figure out how it works. 

I would love to


----------



## mistergreen

Where there's a will there's a way. I still wouldn't recommend it for beginners. I went through the code and the project.


----------



## scapegoat

The problem with that opinion is that it isn't helpful to the progress of this controller, or to those working on it, or to those who want to be involved.

That being said, I'm already working on a place where the code can exist for all to download it and all to contribute to it. I'd like to get a list of part numbers that go into the building of the unit as a whole.

ultimately, I'd like to provide a place for all of these sorts of aquatic controllers people are setting up.


----------



## crowndroyal

well to be honest I am not exactly a beginer I am a network admin and I have coded my own games and server and programs for mmo, games so I know lots of different coding. 

I was just trying to get a more clear step by step "quide" for prices and parts etc. 

I was actually think about using a touch screen for a laptop or ipad or something. http://www.laptopscreen.com/English...screen+LCD+panel+on+a+tablet+PC+[HP+TX2500]+/




scapegoat said:


> The problem with that opinion is that it isn't helpful to the progress of this controller, or to those working on it, or to those who want to be involved.
> 
> That being said, I'm already working on a place where the code can exist for all to download it and all to contribute to it. I'd like to get a list of part numbers that go into the building of the unit as a whole.
> 
> ultimately, I'd like to provide a place for all of these sorts of aquatic controllers people are setting up.


Thats what I was hopping to have set up in the first post so it is all in one place and here on the forums, I know I am new and all to the forums but after seeing this project I had to join. I am kinda offended that I was called a beginer with out that poster knowing anything about my background knowledge in computers/programming. 

I could optimally help this project a great deal if I knew all the info and it was neatly organized in the first post.


----------



## scapegoat

i think they were talking about the OP

i purchased a domain that I intend to use to make this stuff a bit more friendly to grasp. I'll be using django for some quick setup and am hoping to get a github account setup so the progress can be visualized and tasks be created.

I don't have the funds to purchase the hardware (basement remodel underway) but intend on using this sort of stuff to control the 125g i have planned. for the time being my contribution will have to be in the way of a dedicated place for knowledge.

i'm a hardware novice myself, so it is beneficial for me to personally see how things progress.

If anyone wants to be involved more, please shoot me a PM. I hope to have the basics set up this evening


----------



## crowndroyal

thanks Scape it would be awesome to have a place where we can all go and try and test different things. 


I sure hope the OP can give us more detail as to the dimensions of the screen the cost the parts envolved the coding language etc as requested.

I originally wanted a screen about as big as a ipad to be mounted in my stand, and have it control everything.


----------



## benjaf

scapegoat said:


> ultimately, I'd like to provide a place for all of these sorts of aquatic controllers people are setting up.


This sounds like an excellent idea, I'd gladly contribute my project to a resource like that. The forum format is far from ideal for any but the simplest of projects. 
Since most code projects here are 'free for all' it makes sense to make source available for editing as well.


----------



## scapegoat

as a web developer, my goal for a project using arduino will be a web based front end. that'd make it available to any mobile or home browser. I think it'd be great to log in via my galaxy s3, see what the probes are reading and make adjustments if i need to. but that is dooown the line for me.

I've purchased the domain opensourceaquatics.com, there isnt much there and won't be for a number of hours (i'm at work  )

The goal is to provide the files via github, and ultimately host any conversation/discussion on people's various controllers on the site. 

Github will allow the ability for people to fork the project to work on their own and provide push requests to merge those changes to the code base. It'll allow individuals to be set up as the main contributors, so those having already started their project would be given sole ownership with the ability to add others. It'll also allow tasks to be set up... so instead of splitting your attention all over the damned place, people can take on specific components and really focus on making one thing work.

Hopefully I'll be able to get some hardware in the next couple of months and start contributing code myself, and will be focusing solely on a web enabled system.

My website goal for the evening will be to figure out some site requirements and get a list of components that the site needs to start operating in the capacity i'm thinking it should.

considering I want this to be a site to assist the community, please make suggestions. If you have code, you can email me at [email protected] and I can use it to test setting it up.

I'd kind of like the site to turn into an open database of DIY aquatics, from co2 reactors, to this awesome arduino stuff.

If anyone reads this who developed the code themselves, or started these arduino threads, please get in touch as I'd like to make sure you're given credit for the code hosted.


----------



## bigd603

scapegoat said:


> That being said, I'm already working on a place where the code can exist for all to download it and all to contribute to it. I'd like to get a list of part numbers that go into the building of the unit as a whole.
> 
> ultimately, I'd like to provide a place for all of these sorts of aquatic controllers people are setting up.


Hey Scapegoat, heres a list of the requisite components, plus some extras (most of this info is gleaned from the Jarduino user's manual).

First off, the Jarduino sketch is available here:
http://code.google.com/p/jarduino-aquarium-controller/


Parts:
The Arduino Mega 2650, retails for $65, but can be found cheaper. Beware of knock offs, though, they may be glitchy.










The ITDB02 Mega Shield Kit V1.1
$5.50 in kit form, you will need to solder everything together
http://imall.iteadstudio.com/prototyping/kits/im120717001.html










This is what it will look like assembled:









There is another Version 2 of the shield, but you will need to order the DS1307 RTC Module. E Bay sells them for like $2-5, and you will need to solder it onto the shield. This is the one I got:










The ITDB02 3.2" TFT LCD Display
$25.50
http://imall.iteadstudio.com/display/tft-lcm/im120419005.html
They have other versions for $30-33 but I cant determine the difference.










DS18B20 Temperature sensor:
$2-4 depending on the vendor, check E Bay










Others offer a waterproof temperature probe
$8-11










Then there are some fun extras that we can add into the system:

pH Sensor
$95 in a kit from Sparkfun:
https://www.sparkfun.com/products/10972?
Or you can piece meal it together. Some probes on E Bay are like $20-30, and the little pH stamp is $28 from Atlas Scientific (http://atlas-scientific.com/product_pages/embedded/ph.html)










Dissolved Oxygen sensor:
$192.95
http://atlas-scientific.com/product_pages/kits/do-kit.html
This one is definitely pricey, but would be really cool for those that really want to max out the system


----------



## crowndroyal

Thanks BigD thats awesome whats the dimensions of this touch screen ? still wondering how big it is.


I am off to work myself so chat later.


----------



## bigd603

crowndroyal said:


> Thanks BigD thats awesome whats the dimensions of this touch screen ? still wondering how big it is.
> 
> 
> I am off to work myself so chat later.


No problem, its a 3.2" touch screen.


----------



## scapegoat

biiiigd, that post is a huge boon to anyone trying to get started. thanks


----------



## Darkblade48

Don't forget that you can add a relay board (to control things) and also an ethernet/wireless shield if you want to control things via a web interface.

Besides the DS1307 RTC, you can also consider using the DS3231 chip; it does not cost significantly more than the DS1307.

Something like this (though this is an old photo; I've cleaned up the wiring, added a few components and switched to the TFT LCD Touchscreen)


----------



## scapegoat

the hardware aspect is hellishly confusing to me, because I've never gotten this far into components. I can put together a PC no problem...

is the relay board an electrical relay?


----------



## bigd603

That RTC chip looks pretty cool, DarkBlade, thanks for pointing that out!

Is that pH probe the same as e Bay item 170752579436? I've been thinking about snagging it but dont know if it's any good. Are pH probes a "you get what you pay for" kinda thing? Also, what board are you connecting the probe to?


----------



## Darkblade48

scapegoat said:


> the hardware aspect is hellishly confusing to me, because I've never gotten this far into components. I can put together a PC no problem...
> 
> is the relay board an electrical relay?


The relay board is just an electrical switch that controls a mains line. When a 5V signal is sent to it, it will open. You can get the standard mechanical relays, or the more expensive solid state ones.



bigd603 said:


> That RTC chip looks pretty cool, DarkBlade, thanks for pointing that out!
> 
> Is that pH probe the same as e Bay item 170752579436? I've been thinking about snagging it but dont know if it's any good. Are pH probes a "you get what you pay for" kinda thing? Also, what board are you connecting the probe to?


I personally like the DS3231 chip, since the DS1307 does seem to drift. The libraries are interchangeable, so there is no extra work involved.

I just got my pH probe locally; cost me $15. The one I am using seems to work fine. I am connecting the probe to a pH meter breakout board; there are lots out there. I got this one from a friend who had a spare. You can build your own for ~$10-15, and save some money, though (I was going to go this route).


----------



## crowndroyal

Darkblade48 said:


> Don't forget that you can add a relay board (to control things) and also an ethernet/wireless shield if you want to control things via a web interface.
> 
> Besides the DS1307 RTC, you can also consider using the DS3231 chip; it does not cost significantly more than the DS1307.
> 
> Something like this (though this is an old photo; I've cleaned up the wiring, added a few components and switched to the TFT LCD Touchscreen)


as I was working I was thinking about this, on how people would plug in a probe etc to monitor/control their PH, co2, salinity, temp etc.

my other concern was how small the screen is I was hoping to have a screen at least 6x6 inches so it could be easily seen from a distance. Maybe something we could look into? 

Dark PM me to please I have an idea I want to run by you that is kinda off topic.


----------



## Darkblade48

crowndroyal said:


> as I was working I was thinking about this, on how people would plug in a probe etc to monitor/control their PH, co2, salinity, temp etc.


pH is usually with a standard BNC
CO2 probes are expensive; do you plan to purchase one?
Salinity is not really needed in a planted aquarium. But they are also BNC.
Temperature is just with the DS18B20 from Dallas. You can put it into a waterproof container and it will work fine.



crowndroyal said:


> my other concern was how small the screen is I was hoping to have a screen at least 6x6 inches so it could be easily seen from a distance. Maybe something we could look into?


6x6 inches is quite large; I assume you want it to be touch screen too? It will be quite expensive.

To get an idea, the iPad measures 9 x 7 inches. 



crowndroyal said:


> Dark PM me to please I have an idea I want to run by you that is kinda off topic.


You could PM me too, you know...


----------



## drhemlock2

*wireless interesting*

i have my jarduino working and i am making the individual probes and sensor boards etc. darkblade you mentioned wireless i have been trying to figure out how to run the temperature probes wirelesslyusing a wireless shield. i already have a web shield working and have done some research on using a radio freq to control them two i plan to use wirelessly do you have another idea? i am not aware of any working code using a wireless web shield i think jamie TheDOdblG on UK Reefs the author of Jardunio is looking into it but is limited in time do you have some code to look at? i have also thought of doing a ph probe also remote just for giggles and practice. perhaps you can direct me to some cheaper probes then i have seen on fleabay. i am very interested in this project and hae already signed onto the mentioned website in this thread for collaboration on the bells and whistles as well as DIY projects any help would be great.
doc


----------



## Darkblade48

drhemlock2 said:


> i have my jarduino working and i am making the individual probes and sensor boards etc. darkblade you mentioned wireless i have been trying to fogure out how to run the temperature probes wirelessly. i already have a web shield working and have done some research on using a radio freq to control it wirelessly do you have another idea i am not aware of perhaps some code to look at. i have also thought of doing a ph probe just for giggles and practice perhaps you can direct me to some cheaper probes then i have seen on fleabay. i am very interested in this project and hae already signed onto the mentioned website for collaboration on the bells and whistles and DIY projects any help would be great.
> doc


I am unsure how you would run/what the advantage of running the temperature probe wirelessly would be. You would still have to plug the temperature probe into a wireless shield/module, and then have it communicate with the main controller. Why not just have the probe hooked up to the main board? 

As I mentioned, I just picked up my pH probe locally; there are lots of options on eBay for ~$20. They will probably work OK; you could always get the Pinpoint pH probe (a little more expensive). You probably get what you pay for, but at this point in time (prototyping), I just needed a pH probe that could measure pH, and do all the things I wanted it to do.


----------



## drhemlock2

DarkBlade you mentioned that the DS1307 has drift issues and you personally like the DS3231 chip does this chip work like the DS1307 othering than the drift as i am about to order a new RTC as i smoked my old one really did not work that well anyway hehe.
doc


----------



## Darkblade48

drhemlock2 said:


> DarkBlade you mentioned that the DS1307 has drift issues and you personally like the DS3231 chip does this chip work like the DS1307 othering than the drift as i am about to order a new RTC as i smoked my old one really did not work that well anyway hehe.
> doc





Darkblade48 said:


> I personally like the DS3231 chip, since the DS1307 does seem to drift. *The libraries are interchangeable, so there is no extra work involved.*


See above.


----------



## drhemlock2

mainly for the removal so many wires as my unit will be on the outside of my stand and thought i would use the sd card on the web shield to gather data over time. i love data and thought it would be cool to do this. i had already decided for now to use extra long sensor cables just to make sure they made it to the controller.
doc


----------



## MarkM

*Interesting*

Interesting, I am going to bookmark this thread. I have begun working on the design of a more simple system based on an inexpensive PLC. I have both a planted freshwater tank and a reef tank. My goal is to automate several of the functions on the saltwater tank but I am starting with the simpler freshwater tank. I have a temperature probe and it now reports temperature. I have a pH prob and it reports pH levels. I can have the PLC turn on and off the heater using the temperature input and can turn on and off the CO2 based on the pH level. And the PLC turns on and off the lights according to time of day. I am planning to establish a water top off this weekend as I just received two micro level sensor which can detect water level. The above is easy and relatively inexpensive. 

Next, I want to measure ammonia and CO2 directly and looking for sensors for these. I am also going to work on a semi-auto water change system, (mostly in view of the larger saltwater tank not the smaller and easier freshwater tank.) Going to put two water barrels in the garage and run plumbing into where the tanks are. Eventually, I will push a button to empty a certain amount of water into a waste barrel, then, push a second button to move a pre conditioned amount of water into the tank from the clean barrel.


----------



## Darkblade48

MarkM said:


> Next, I want to measure ammonia and CO2 directly and looking for sensors for these. I am also going to work on a semi-auto water change system, (mostly in view of the larger saltwater tank not the smaller and easier freshwater tank.) Going to put two water barrels in the garage and run plumbing into where the tanks are. Eventually, I will push a button to empty a certain amount of water into a waste barrel, then, push a second button to move a pre conditioned amount of water into the tank from the clean barrel.


The following CO2 sensor (for air) was looked at by mistergreen:

http://www.co2meter.com/collections/co2-sensors/products/k-30-co2-sensor-module

Thread: http://www.plantedtank.net/forums/showthread.php?t=195988

It certainly is cheaper than CO2 sensors made specifically for aquatic purposes.

Ammonia probes run about $300 and up, last I checked.


----------



## scapegoat

for anyone interested, I've set up http://opensourceaquatics.com/wiki/. would love to see some finished examples going up. I'd especially love to see bigd's hardware contribution make its way over there.

if there are any issues signing up or creating new sections, entries, etc, please get in touch.


----------



## crowndroyal

Found this thought I would post it

http://www.youtube.com/watch?v=fCxzA9_kg6s

and here is something I am more famalir with myself the .NET framework http://www.youtube.com/watch?v=jOAqTpAy8-g


----------



## Darkblade48

crowndroyal said:


> Found this thought I would post it
> 
> http://www.youtube.com/watch?v=fCxzA9_kg6s
> 
> and here is something I am more famalir with myself the .NET framework http://www.youtube.com/watch?v=jOAqTpAy8-g


Just to let you know, that video is using an older version of the Arduino IDE, many libraries now do not work with Arduino IDE versions 1.0 and lower.

I suppose a simple "Hello World" sketch would be as good as any place to start programming. 

Be aware that the project will get much more difficult, very quickly


----------



## crowndroyal

Ya but I may just build one using the .NET framework instead as that is what I am familiar with. Only problem is I prob be doing it all alone and no one else around to help lol.


----------



## Darkblade48

crowndroyal said:


> Ya but I may just build one using the .NET framework instead as that is what I am familiar with. Only problem is I prob be doing it all alone and no one else around to help lol.


Well, whatever works 

Multiple ways to get to the same goal.


----------



## MarkM

*Sensors*

thanks for the links Darkblade, I will take a look


----------



## bigd603

Hey Scapegoat, opensourceaquatics.com is showing a "Page Not Found" error. You can still get to the Wiki page though.

I'll post up the hardware page soon. I am really looking forward to getting started on this.

DarkBlade, I just found your aquarium controller thread on gta aquatics, really impressive work. You will definitely have to share your code on the wiki page once that gets rolling.


----------



## scapegoat

bigd603 said:


> Hey Scapegoat, opensourceaquatics.com is showing a "Page Not Found" error. You can still get to the Wiki page though.


had a slight server malfunction, but uh... everything's perfectly all right now. We're fine. We're all fine here now, thank you.


----------



## crowndroyal

everything up and running on the site seems this topic has died since tthe move have not had time to go to your site although I guess instead of typing here I could have went there just keep forgetting about it.


----------



## bigd603

I'm waiting to play with everything a little before I post on scapegoat's site. i've been watching the tracking for everything all week, it all finally came in today, but the office manager closed the office early so i couldnt pick it up! So frustrating...

Darkblade, you should post up the work you did on your controller, you've done a great job.

Mike in MD, any progress on your controller?


----------



## shift

Awesome project! i'm defiantly going to try and build one once i get the bigger tank


----------



## Darkblade48

bigd603 said:


> Darkblade, you should post up the work you did on your controller, you've done a great job.


It's been stagnating because I've been busy with other projects.

I did finally manage to get the RTC working; now I just need to program adjustable RTC, light timer, and auto-dosing, and I'll be done. If I actually work at it, a couple weeks work, at most...but real life comes first


----------



## scapegoat

bigd603 said:


> I'm waiting to play with everything a little before I post on scapegoat's site.


love to hear that! Hopefully I'll have some time tuesday and wednesday evening to move some of the great DIY projects/info over to the site myself.


----------



## bigd603

Darkblade, is your controller based on Jarduino, or did you find a different source? I finally got all my stuff, and I am getting nothing but errors when trying to compile the Jarduino code.


----------



## Darkblade48

bigd603 said:


> Darkblade, is your controller based on Jarduino, or did you find a different source? I finally got all my stuff, and I am getting nothing but errors when trying to compile the Jarduino code.


The buttons and some of the layouts are based off of Jarduino.

The backend coding is all new.

Jarduino version 1.1 will only compile on older versions of the Arduino IDE (prior to version 1.0). Some libraries will only work on newer versions of Arduino IDE.

So, either you will have to:

a) use an older Arduino IDE so you can compile Jarduino, but rewrite some libraries
b) use a newer Arduino IDE so you can use newer libraries, but scrap Jarduino


----------



## bigd603

Would you be willing to share your sketch?


----------



## Darkblade48

bigd603 said:


> Would you be willing to share your sketch?


Since it is not done yet, no.


----------



## bigd603

I'm getting nothing but errors when I try to compile Jarduino.

Any advice would be great, because I am getting nowhere over here.



Code:


Jarduino_v1_2_beta2:153: error: no matching function for call to 'DS1307::DS1307(int, int)'
/Users/DJW/Documents/Arduino/libraries/DS1307/DS1307.h:50: note: candidates are: DS1307::DS1307()
/Users/DJW/Documents/Arduino/libraries/DS1307/DS1307.h:47: note:                 DS1307::DS1307(const DS1307&)
Jarduino_v1_2_beta2:154: error: 'DS1307_RAM' does not name a type
Jarduino_v1_2_beta2:156: error: 'Time' does not name a type
Jarduino_v1_2_beta2.ino: In function 'void TimeDateBar(boolean)':
Jarduino_v1_2_beta2:894: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:894: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:900: error: 'class DS1307' has no member named 'getDateStr'
Jarduino_v1_2_beta2:900: error: 'FORMAT_LONG' was not declared in this scope
Jarduino_v1_2_beta2:900: error: 'FORMAT_LITTLEENDIAN' was not declared in this scope
Jarduino_v1_2_beta2:906: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:906: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:923: error: 'class DS1307' has no member named 'getDateStr'
Jarduino_v1_2_beta2:923: error: 'FORMAT_LONG' was not declared in this scope
Jarduino_v1_2_beta2:923: error: 'FORMAT_LITTLEENDIAN' was not declared in this scope
Jarduino_v1_2_beta2:927: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:927: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:964: error: 'class DS1307' has no member named 'getTimeStr'
Jarduino_v1_2_beta2:964: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void LED_levels_output()':
Jarduino_v1_2_beta2:1106: error: 't' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void TimeSaver(boolean)':
Jarduino_v1_2_beta2:1699: error: 'class DS1307' has no member named 'getTimeStr'
Jarduino_v1_2_beta2:1699: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1707: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1709: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1714: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1716: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1721: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1729: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1734: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1744: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:1755: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1755: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1761: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1761: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1765: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1765: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1783: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1783: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1789: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1789: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1795: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1795: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1812: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1812: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1818: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1818: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2:1824: error: 'class DS1307' has no member named 'getMonthStr'
Jarduino_v1_2_beta2:1824: error: 'FORMAT_SHORT' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void mainScreen(boolean)':
Jarduino_v1_2_beta2:2180: error: 't' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void clockScreen(boolean)':
Jarduino_v1_2_beta2:2460: error: 't' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void feedingTimeOutput()':
Jarduino_v1_2_beta2:3683: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:3693: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:3702: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:3712: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:3721: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:3731: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:3740: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:3750: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2.ino: In function 'void setFeederTimesScreen(boolean)':
Jarduino_v1_2_beta2:3776: error: 't' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void processMyTouch()':
Jarduino_v1_2_beta2:4104: error: 't_temp' was not declared in this scope
Jarduino_v1_2_beta2:4104: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:4179: error: 'class DS1307' has no member named 'setTime'
Jarduino_v1_2_beta2:4180: error: 'class DS1307' has no member named 'setDate'
Jarduino_v1_2_beta2:4292: error: 't_temp' was not declared in this scope
Jarduino_v1_2_beta2:4292: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:4344: error: 't_temp' was not declared in this scope
Jarduino_v1_2_beta2:4344: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2.ino: In function 'void setup()':
Jarduino_v1_2_beta2:5769: error: 'class DS1307' has no member named 'halt'
Jarduino_v1_2_beta2:5771: error: 't' was not declared in this scope
Jarduino_v1_2_beta2.ino: In function 'void loop()':
Jarduino_v1_2_beta2:5785: error: 't' was not declared in this scope
Jarduino_v1_2_beta2:5785: error: 'class DS1307' has no member named 'getTime'
Jarduino_v1_2_beta2:5807: error: 'class DS1307' has no member named 'getTime'


----------



## mistergreen

You don't have the real time clock hooked up, so it doesn't know where to look for time perhaps.

So you paid for the Jarduino_v1_2_beta2?


----------



## bigd603

I'm getting these errors when I verify the code, before its even uploaded to the Arduino, so I would think it shouldnt matter that I dont have the RTC connected yet, but I am still new at this.


----------



## mistergreen

bigd603 said:


> I'm getting these errors when I verify the code, before its even uploaded to the Arduino, so I would think it shouldnt matter that I dont have the RTC connected yet, but I am still new at this.


oh, ok. you need to include the library files in the arduino work file directory.


----------



## bigd603

The libraries are all there


----------



## Darkblade48

Are you sure you are using the right library?

I am not sure what is included in Jarduino version 1.2 beta, as I did not pay to see the source code.

From what I understand though, he has switched from Joyce's library to Karlsen's. 

I assume you are using the newer version of the Arduino IDE as well?

As mentioned before, this project is not as simple as "plug and play"...


----------



## flc

If you're really stuck, take your project into the next meeting of DorkBot PDX. The people who are affiliated with it are super helpful and really know their stuff. I bet someone would know exactly what was going wrong and people would probably love to see what you're working on.

http://dorkbotpdx.org/meetings


----------



## bigd603

I wound up starting completely over. I re-installed Arduino, continued having bad luck with Jarduino, but I was able to get another aquarium controller sketch called Stilo to work. Except after loading the first screen it just flashes and reloads every second. I think this is because I don't have the RTC installed yet. I will do that today. 

flc, thats a good idea to check out dorkbot. They have a meeting tonight, I just might have to stop by.


----------



## Darkblade48

bigd603 said:


> I wound up starting completely over. I re-installed Arduino, continued having bad luck with Jarduino, but I was able to get another aquarium controller sketch called Stilo to work. Except after loading the first screen it just flashes and reloads every second. I think this is because I don't have the RTC installed yet. I will do that today.
> 
> flc, thats a good idea to check out dorkbot. They have a meeting tonight, I just might have to stop by.


I never tried Stilo myself, but it sounds odd that not having an RTC installed would cause the entire sketch to reset itself every second.

Usually, without an RTC, any time/date functions won't work. The only thing I can think of is that the sketch relies on the RTC to do something (i.e. check on the status of the sketch so that it can request new data from the temperature/pH probe), but there are better ways than querying the RTC.


----------



## bigd603

Finally got Jarduino to work! Took long enough. Turns out I wasnt using the right DS1307 library, and I just had to change the pin settings.

Now I'm going to run through all the code to try and learn all of it. I really appreciate how well commented this sketch is, that will be really useful.

I would love to change it around to get rid of the LED array graph, since I dont use an LED lighting system and get some real time weather data in there, and replace the monitors and alerts pane to include room temp (that one is easy) and the pH values of the tank.


----------



## Darkblade48

bigd603 said:


> I would love to change it around to get rid of the LED array graph, since I dont use an LED lighting system and get some real time weather data in there, and replace the monitors and alerts pane to include room temp (that one is easy) and the pH values of the tank.


Glad you managed to get the code working.

Removing/changing the LED lighting system is not hard, it is just a matter of going through the code and deleting the extraneous data 

For the real time weather data, do you plan to get it from the internet?

From what I recall, the Jarduino does not have any code for pH monitoring, so you will have to find some examples and cobble it together.


----------



## bigd603

Darkblade48 said:


> For the real time weather data, do you plan to get it from the internet?
> 
> From what I recall, the Jarduino does not have any code for pH monitoring, so you will have to find some examples and cobble it together.


The weather idea is down the road after I have a much firmer grasp on all this stuff, but yeah that would come from the internet, possibly an RSS feed. Would have to pick up an Ethernet shield for that. 

I grabbed the pH stamp from Atlas Scientific and a probe from eBay, I imagine I can plug in the sketch they provide. 

Sent from my Galaxy Nexus using Tapatalk 2


----------



## Darkblade48

bigd603 said:


> The weather idea is down the road after u have a much firmer grasp on all this stuff, but yeah that would come from the internet, possibly an RSS feed. Would have to pick up an Ethernet shield for that.


That will be interesting to see!



bigd603 said:


> I grabbed the pH stamp from Atlas Scientific and a probe from eBay, I imagine I can plug in the sketch they provide.


Plugging in the code is the easy part; making it play nice with everything else is the hard part


----------



## bigd603

Darkblade48 said:


> Plugging in the code is the easy part; making it play nice with everything else is the hard part


Haha, yeah I bet. That's the fun part too. I will keep you posted on my struggles/progress. 

Correction: I meant to say once I have a have a better grasp, not you. Seems like you got a real good handle on everything. 

Sent from my Galaxy Nexus using Tapatalk 2


----------



## Darkblade48

bigd603 said:


> Haha, yeah I bet. That's the fun part too. I will keep you posted on my struggles/progress.
> 
> Correction: I meant to say once I have a have a better grasp, not you. Seems like you got a real good handle on everything.


Not at all  I just started coding last October.

I haven't touched that project for awhile since I'm working on another pet project :flick:


----------



## Grimnokk

ok. Question for you guys. I just bought this and plugged everything in and hooked it up to my computer. Upon plugging in the unit to the USB port the screen does not power up. I also have a 9vdc 650ma wall adapter, so I tried that as well. Still nothing. I noticed that there is a pot on the side of the shield, so I thought maybe this was a dimmer pot. I have adjusted it in both directions and nothing happens. So I unhooked everything and then loaded the Blink sample code. That worked just fine.......

So do I have a bad LCD unit? Bad Interface Board? Any suggestions?

Thanks in advance,

Grimm


----------



## Darkblade48

Those units do not always work straight out of the box and require some code tweaking first.

Since you mentioned that the Blink sketch works, then it is not a problem with your Mega, nor any of the USB drivers that need to be installed for the Arduino to work.

Do you have all the correct libraries installed for the TFT Touchscreen LCD? What Arduino IDE version are you using? There are some libraries that only work with the alpha versions of Arduino, while some libraries only work with IDE versions 1.0 and up.


----------



## Grimnokk

Darkblade48 said:


> Those units do not always work straight out of the box and require some code tweaking first.
> 
> Since you mentioned that the Blink sketch works, then it is not a problem with your Mega, nor any of the USB drivers that need to be installed for the Arduino to work.
> 
> Do you have all the correct libraries installed for the TFT Touchscreen LCD? What Arduino IDE version are you using? There are some libraries that only work with the alpha versions of Arduino, while some libraries only work with IDE versions 1.0 and up.


Using Arduino 1.0.3
Library trying to use is this one. Was trying to run the UTFT_Demo_320x420


----------



## Darkblade48

Grimnokk said:


> Using Arduino 1.0.3
> Library trying to use is this one. Was trying to run the UTFT_Demo_320x420


Did you follow the instructions in these two lines of the code?



> // Uncomment the next line for Arduino Mega
> //UTFT myGLCD(ITDB32S,38,39,40,41); // Remember to change the model parameter to suit your display module!


----------



## Grimnokk

Darkblade48 said:


> Did you follow the instructions in these two lines of the code?


Yes. It looks just like what you quoted.



Code:


UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module!


----------



## Darkblade48

Normally, with the wrong code, the screen will just stay white (at least that shows it is being powered).

Is your screen, at the very least, showing a blank, white screen?

Also, you may want to check that the controller Sainsmart uses is compatible.


----------



## Grimnokk

Darkblade48 said:


> Normally, with the wrong code, the screen will just stay white (at least that shows it is being powered).
> 
> Is your screen, at the very least, showing a blank, white screen?
> 
> Also, you may want to check that the controller Sainsmart uses is compatible.


NO the screen is completely black. Doesn't look like there is any power.

How would I check to see if its compatable? I cant seem to even find this combination on their website. But I was sold through amazon as a complete kit...... so I am not certain where to even begin.

By the way Darkblade, thanks for taking the time to try and help.


----------



## Darkblade48

Grimnokk said:


> NO the screen is completely black. Doesn't look like there is any power.
> 
> How would I check to see if its compatable? I cant seem to even find this combination on their website. But I was sold through amazon as a complete kit...... so I am not certain where to even begin.
> 
> By the way Darkblade, thanks for taking the time to try and help.


The first step before even checking for controller compatibility with the library is to get the unit powered.

Just to clarify, you have the Arduino powered through USB, sketches such as blink work fine, and you have the LCD plugged into the LCD shield, and which is in turn, plugged into the Arduino Mega?

I also assume all the pins are lined up and stuff, and nothing silly like that is happening?

Edit: You also mentioned that you tried adjust the pot on the shield; try turning it one way or the other to see if you get a white screen.


----------



## Grimnokk

Yes Arduino is powered through USB and even tried the wall plug adapter. THe sketch Blink works. The LCD is plugged into the shield, then shield plugged into Arduino. No there are no bent pins or anything silly like that. Have spun pot in both directions and there is nothing. A blank black screen.


----------



## Darkblade48

The only other thing that I could of think of then would be that one of the traces/pins might be loose.

Checking with a multimeter would tell you quickly if this is the case (test all the pins and all the connections). You could also use it to check to ensure that the shield is actually supplying the LCD with power.

The following are the specifications for the iTeadStudio shield, but perhaps you can use it as a starting point for the Sainsmart shield (they are all very similar).

http://hifiduino.wordpress.com/2012/04/13/iteadstudio-tft-display-for-arduino/


----------



## Grimnokk

Well it appears that my touch screen is DOA. 

I have an 8 point relay module. If I take the 5V from the mega board to the VCC and then take gnd of the mega board and touch on of the signal pins for a realy, it operates the relay just fine. 

Now if I take those same two connections from the mega and touch them to Pin 1 (GND) and pin 2 (5v) the touch screen wont even power on. I even tried it with the 3v3 voltage just to see. Nothing.......


----------



## Darkblade48

Grimnokk said:


> Well it appears that my touch screen is DOA.
> 
> I have an 8 point relay module. If I take the 5V from the mega board to the VCC and then take gnd of the mega board and touch on of the signal pins for a realy, it operates the relay just fine.
> 
> Now if I take those same two connections from the mega and touch them to Pin 1 (GND) and pin 2 (5v) the touch screen wont even power on. I even tried it with the 3v3 voltage just to see. Nothing.......


I am not sure which pins you are connecting it to (which pins are pin 1 and 2; the pins of the shield? The LCD?)

Also, the LCD requires 3.3V, not 5V. You may have inadvertently fried something.

However, if it is indeed DOA, Amazon has a good return policy, from what I understand.


----------



## mistergreen

Invest in a multimeter. It's great at debugging circuits. RadioShack has a cheap one. 

It does sound like a loose connection.


Sent from my iPad using Tapatalk HD


----------



## crowndroyal

After doing more thinking about the screen size I was wondering could we not just hook the controller board etc up to a bigger LCD screen that has touch capabilities, the connections are pretty standard are they not ? 

I have an older 12 inch lcd screen that I could buy a touch screen converter kit for 

[Ebay Link Removed] it's around 40 bucks for the touch screen kit.


then I just plug the screen in the board.


----------



## Darkblade48

I think there was some discussion awhile back about using other touch screens (i.e. iPad touchscreens). I am not sure what this would involve, but you would have to take a look at the specification sheets to make sure that the right voltage/wiring is done to the Arduino (and whether it can handle the increase in inputs that would be required for two-touch, etc). Don't forget that the existing libraries would be unusable, and you would have to write/find them.

Using a non-standard LCD would be more difficult than using the LCD and LCD shield that have already been optimized for the Arduino.


----------



## mistergreen

I'm making my own aquarium controller using ipad/android/computer as the interface. The project is over on my forum but I'm just starting. You basically turn your arduino into a web server. Any web enable device can be used to interact with the arduino. You're liberated. You can be on vacation and check in.


----------



## Grimnokk

Haven't seen the OP respond to anything in here in a while. Not anyone else posting progress updates. Did this thread die? Or are there still people working on this? Would love to see updates and/or collaborate ideas.


----------



## kapelan

crowndroyal said:


> After doing more thinking about the screen size I was wondering could we not just hook the controller board etc up to a bigger LCD screen that has touch capabilities, the connections are pretty standard are they not ?
> 
> I have an older 12 inch lcd screen that I could buy a touch screen converter kit for
> 
> [Ebay Link Removed] it's around 40 bucks for the touch screen kit.
> 
> 
> then I just plug the screen in the board.


3.2" touch screen has a very good price/quality,
it makes hundreds of people using it. 
For a big screen you are along.


----------



## Darkblade48

Grimnokk said:


> Haven't seen the OP respond to anything in here in a while. Not anyone else posting progress updates. Did this thread die? Or are there still people working on this? Would love to see updates and/or collaborate ideas.


Other things in life take priority 

I haven't had time to look at my coding so far; I have the RTC function up and running, but I want to be able to manually adjust my time as well.


----------



## bigd603

Grimnokk said:


> Haven't seen the OP respond to anything in here in a while. Not anyone else posting progress updates. Did this thread die? Or are there still people working on this? Would love to see updates and/or collaborate ideas.


I'm still slowly building mine. I am learning the C coding from scratch, but I am making good progress. I am borrowing from Jarduino and other sketches currently available, but ultimately it will be a custom built controller.


----------



## mistergreen

bigd603 said:


> ultimately it will be a custom built controller.


yup, this is the case for all controllers I think.


----------



## shift

Awesome project! I just ordered my self a uno rev 3, temperature probe and a few relay boards to start playing with.


----------



## bigd603

Hey Guys, a little update on what I have been doing. I decided to go a different direction with my project. After putting together the touchscreen with several different shields and probes and what have you, I struggled to figure out how I wanted to enclose all of it. I didn't what to just leave the the stack of shields sitting next to my tank, and frankly I didn't need all the control that Jarduino and Stillo offered. What I really wanted was something simple to monitor what is going on with my tank. So after looking around for a while, I found Adafruit's Menta. It is an Arduino controller in a mint tin. Very cool. Then I found their 128x32 OLED display. Perfect. So I snatched one up, picked up a DS1307 RTC (Real time clock) circuit from Mouser, and began work on what I like to call my Wicked Tiny Monitor (I'm from New England, we say wicked). Here's what I have so far:




























Now I just need to solder all the components into the prototyping area of the Menta. You can't see this in the picture, but there are two waterproof DS18B20 temperature probes. I am going to cut a hole into the back of the tin for their cables, and another for the pH probe cables. The red stamp on the breadboard is an Atlas Scientific pH stamp. Really cool little gadget for only $28. Now i just need a functional pH probe. The one I ordered from e bay for $15 bucks arrived completely dry and useless. The probe connector and probe stamp will likely be placed in a separate breadboard to minimize interference.

The tiny OLED display will fit perfectly in a hole cut between "Curiously Strong Mints" and "Wintergreen" on the lid of the tin. There will also be a button on either the side of the tin or on the top, next to the screen; I haven't decided yet. I am leaning more towards the side, because I would like to leave the lid as uncluttered as possible. I am also not sure how I am going to mount the OLED display. There are holes on each corner of the display board, and I would prefer not having to drill holes into the tin to hold it. Any ideas?

It's been a fun little project so far, and I think it will be neat sitting next to my tank. It will likely be a fun conversation piece for guests.


----------



## geesantoz

have anyone checked out on this ?

http://www.robotshop.com/arduarium-aquarium-controller-for-arduino.html










It seems more shield to come for this purpose ...


----------



## shift

Does anyone have some working code they care to share? I finally got my uno in the mail today and would love to have a base to start with


----------



## Darkblade48

I'm not sure what kind of example code you are looking for; did you have anything in particular in mind?

The problem with the Uno is that there may not be enough I/O pins for the touchscreen + SD card + any other sensors you may want to use. I believe the touchscreen itself uses ~20 pins already...


----------



## shift

Which board are you using? Anything for code really. It's just nice to have something to build off of 


So far I have 2 UNO boards. A screen. Temp sensor and a RTC and a relay board.

My first few projects I want to build is a sunrise/sunset controller for leds and a temperature monitor/auto shut off for the heaters.


----------



## Darkblade48

shift said:


> Which board are you using? Anything for code really. It's just nice to have something to build off of
> 
> 
> So far I have 2 UNO boards. A screen. Temp sensor and a RTC and a relay board.
> 
> My first few projects I want to build is a sunrise/sunset controller for leds and a temperature monitor/auto shut off for the heaters.


I am using a Mega2560 R2.

The problem with your setup is that (for example) my code will not work with your setup (you need to write up some code to pass data back and forth from one Uno to the other. 

What screen do you have? The 3.2" Touchscreen uses 20 pins (just checked the specification sheet) for display alone, and another 5 pins for touch input. The SD slot takes up another 4 pins.

This is already more than the number of pins a single Uno has.

However, if you just want to do a temperature monitor/auto shut off, it can be implemented (i.e. if you do not use a touch screen and instead use a normal 20x04 LCD screen (or even a 16x02, etc).

You may want to investigate what type of relay you will want to use (for the shut off of your heater).

Finally, to answer your question regarding sample code, if you are using a digital DS18B20 temperature sensor, the Dallas libraries have some excellent examples that you can just copy/paste into a new sketch. From there, it only takes a few more lines of coding to display the temperature to an LCD screen, much like what I had before.


----------



## shift

It sounds like I may have to order a larger board. Atleast for the more advanced one later. I should be good for the sunrise one for now. Will code work between arduino board models?

Here's what I have so far


----------



## bigd603

What relay board is that?

Sent from my Galaxy Nexus using Tapatalk 2


----------



## shift

http://dx.com/p/arduino-compatible-16-channel-12v-relay-module-expansion-board-white-143793


----------



## Darkblade48

shift said:


> It sounds like I may have to order a larger board. Atleast for the more advanced one later. I should be good for the sunrise one for now. Will code work between arduino board models?


For the touchscreen (if you decide to go that route, it does not appear that you have on yet), you will want to get a Mega.

What you have right now (the LCD keypad) will work fine too. Note that you will need a significant number of pins (Vcc, Gnd, and depending on the board, 6 or 7 digital pins). The RTC will take up 4 (Vcc, Gnd, SCL and SDA), the temperature probe another 3 (Vcc, Gnd and a digital pin), and the relay board will take up 2 (Vcc, Gnd) + _x_, where _x_ is the number of relays you wish to use (i.e. the number of banks of LEDs you want to control). Communication between two Arduino boards can be done using either SPI or just serial (both will take 2 pins, but with SPI, you can use the same SCL and SDA pins as the RTC).

One issue I can see is that you may need a proper LED driver instead of the relay board to do the sunrise/sunset (PWM of the LEDs) feature that you want.


----------



## shift

Well I think i will to do another order. These 2 wil work well for the mini project but a bigger board will be needed for the main all in one.

So an atmega board, pwm, and a touch screen controller should do the trick
thanks for all the info.. its been years since i have played with anything but basic electronics so any tips/help is appreciated!


----------



## Darkblade48

What you have right now can be implemented using just one Uno.

The Mega and the touchscreen will work nicely, though programming front end stuff using low level coding is such a pain...  

The Mega is already capable of PWM, but you will probably need the proper LED drivers/driver board to control your LEDs.

Otherwise, the relay board will just do a straight on/off (no dimming), which isn't what you want (I assume by sunrise/sunset feature, you want a gradual brightening/dimming).


----------



## shift

My getto initial thought was to have multiple strips and slowly turn more and more strips on but a PWM is a much cleaner solution.

So would i need a PWM + a driver.. or just a dimmable led driver?
Would a stepper/motor driver work for a led dimmer? (something like this , this or this


----------



## Darkblade48

shift said:


> My getto initial thought was to have multiple strips and slowly turn more and more strips on but a PWM is a much cleaner solution.
> 
> So would i need a PWM + a driver.. or just a dimmable led driver?


Heh, having multiple strips would work just fine for the time being (since you already have the relay board). 

It would save the hassle of having to purchase a driver board. I am not too familiar with them, since I have not really looked into them (still using fluorescent tubes, so I just use a relay board).

I believe that you need a dimmable LED driver, which is controlled by the PWM on the microcontroller board. There are several threads in this subsection where people have written up sketches specifically for LEDs, so you may want to look in that.


----------



## shift

So i just ordered 3x 12V pumps and decided to make a auto dosser as the first project.

I believe all i will need is the pumps, arduino board and relays. 

If i decided to add the lcd screen would i need to add a sd card or something to store the adjustable variables? also would i need to use the RTC for it to be able to keep time in the event of a power outtage?


----------



## Darkblade48

shift said:


> If i decided to add the lcd screen would i need to add a sd card or something to store the adjustable variables?


You can most likely store all the variables you need in the EEPROM (unless you have an unusually large number of variables to store).



shift said:


> also would i need to use the RTC for it to be able to keep time in the event of a power outtage?


You will need the RTC to store the information for time/date.


----------



## agio26

I work the same with AVR, but not with Arduino, and i realized this controllers




also uses DS18B20 and DS1307, as microcontroller uses atmega644p, but i use triac wiht optotriac instead of relays.
At this point controls:
PH, CO2, TEMP, Moonlight, autolevel, feeding, pumps, UV-lamp,fertilization, light(neon/LED-dimming)


----------



## spyrowel

hi i got the arduino mega 2560, and i have also the temp sensor, PH sensor, rgb sensor, and the ORP sensor, my problem is i don't will to to program this thing only temp sensor i made it, somebody will willing to help me this project? guys please PM me [email protected] many thanks in advance


----------



## Darkblade48

I'm not sure what you are asking - did you make the temperature sensor? What exactly do you need help with?


----------

