LED and aquarium controller with TFT LCD touch screen

nkd5025:
Vasco,

I want to thank you as seeing your controller a few months back was one of the main reasons I decided to try and make my own. For ATO I have implemented freescales MPXV5004GC7U pressure sensor in order to get accurate water levels. It is extremely simple to use and is quite accurate. Here is a link to the product
http://www.digikey.com/product-detail/en/MPXV5004GC7U/MPXV5004GC7U-ND/951844

Nick D.

That's the good find! (and not expensive:)

That's the problem, quite a lot of functions like leds values calculations, moonlights etc relies on RTC so if you commented that code out then unpredictable behaviour will happen.
I'd leave the code as it is, it should work without RTC clock connected, there will be just weird numbers instead of time and date.

That was after I first started the sketch. When I first ran it (without editing the code) it would flash the main screen then reset everything. I was then messing around with it, commented out the RTC stuff, then i got past the main screen to a menu and that wouldnt let me do anything. Thats understandable though, and just an observation.

OK, got the RTC installed, but now its doing what I mentioned before (I'm using the original, unedited sketch): Finishes drawing the main screen then immediately goes the option menu with Time and DATE, TEMP. SETTINGS, ATO, SETTINGS, etc, but I can't select anything anywhere on the screen. I've done the calibration example and button test, those both work no problem.

That's weird if examples works fine.
Try to do debug - put serial.println(dispScreen) in main loop and check if it changes from 0 (main screen) to 1 (menu screen).
Also compare line by line touch screen configuration from example sketches with Stilo, there may be some typo if it's not working with Stilo.

There may be other problem as well - memory leak. I used to have a lot of problems with String objects that were crashing board while compiled on IDE 1.0.2 (but the same sketch was working fine with 1.0.1). The symptoms were similar - the screen stopped responding, but this doesn't explain why it goes to menu screen (all String objects are replaced now with char strings in the sketch).
Maybe some wrong connections or something is causing crashes? Try to put serial.println("1"), serial.println("2") etc in main loop after every function and see which one is causing crash, then do the same in this function to see which command is crashing the board.
Time consuming but there is no proper debug function.

GOT IT!!! I just had to change the pins and the screen type. Its the littlest things that get overlooked... Thanks for all the help vasco! This controller is excellent!

got the same strange behavior like DerekPDX, all demos like utouch and examples from UTFT will work fine but with stilo the screen will be refreshed every 2 seconds even if i adapt settings to the values of these examples

@DerekPDX: which settings/pins you've changed

Hi mate,

Check those two lines:

UTFT myGLCD(SSD1289,38,39,40,41);  
UTouch      myTouch(46,45,44,43,42);

They have to be the same as in examples (if the examples are working fine).
Also be sure you are using examples from right libraries.

Cheers,
Daniel

Hi Daniel,
thank's for your reply. Fiddeling around a little yesterday and out of a sudden it worked out. Not really sure whether i changed anything but now it works using a ITDB Screen and a ITDB Mega shield with following settings

//Change screen type and pins if required
UTFT        myGLCD(ITDB32S, 38,39,40,41);   // Remember to change the model parameter to suit your display module!
UTouch      myTouch(6,5,4,3,2);

The first led drivers are connected and now i can start adding the rest of the hardware.

Thank's a lot for that code as i'm not that perfect in programming :wink:

cheers
Detlef

edit:
is there a reason why you're using two pins for the onewire and not daisy chaining two sensors at one pin?

Do you really care about water temps. No fish or bowl pics :P\

Due to the lack of much on the market normal people can afford I want to build a controller
for my 80G reef aquarium. I have never done a Arduino project before so I am the newest of
new beginners. This looks like a good project to start with but it's a bit unorganized (maybe just me
not knowing what I am looking at yet). I don't see any kind of parts list and schematic of this controller,
is there one? Also some of the links don't seem to work.

Should I look for a simpler project for my first? I have a basic electronics understanding but know
programming experience.

Thanks :slight_smile:

Should I look for a simpler project for my first?

If you want to understand how it all works, yes you should start with a simpler project. Otherwise, you need a kit put together for you. An aquarium controller contains several simple projects put together. You will be able to make it your own if you understand how it works.

I think you will enjoy the process. I recommend starting with the LEDs and work from there.

Good luck!

I'm trying to build this project everything works okay except the LED
They work upside when it is in 100% LEDs are switched off and when it is in 0% the LEDs in full power

hi all,

could you help out a VERY newbie to the arduino side of things, tried to compile stilo 3.0
and got 104 errors??

tried various ide builds from 1.5.4 all the way back to 1.0 all resulted in the same
cant be anything to do with the mega as im only verifying

tried a couple of the utft examples which compile and run ok, so looking to you guys for a heads up
got 3 arduinos one for the tank controller and the others for me to learn on

hope you can help??

I would ask someone who would be able to help...
I built a controller (Stillo 3.0, thanks for share this) according to the instructions (i use 3 LED channels +moonlight) and everything seems to work perfectly except for one small thing and that is the moonlight part of code.
The problem is that whatever i set the LED conected to moonlight channel do still the same - it never turn off or reduce power according to the settings. (Weird) It is same in both real time and standard mode.
I already tried set moonlight to another pin and it is still the same.
But when i change that pin to classic dimmed (PWM) channel (lets say channel 4) then it is steered completely without problems. Does anyone have the same problem? Or have someone idea what can cause this?

Hi, I tried this sketch, but the result is in the image file, why?

Stilo.bmp (2.93 MB)

Solved :roll_eyes:+

why is ur source code pade not found?

hello main englisch is not so good but i have a problem with the sketch
if i load the sketch in the ardunio 1.5.8 and i do u serial monitor i have the next errors.

Arduino: 1.5.8 (Windows 8), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

FirstQuarter.c:9:1: error: unknown type name 'prog_uint16_t'
prog_uint16_t FirstQuarter[0x9C4] PROGMEM ={
^
FirstQuarter.c:9:15: error: variable 'FirstQuarter' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
prog_uint16_t FirstQuarter[0x9C4] PROGMEM ={

^

can sawhane help me

graets pedro

It's very nice. I used to have an idea about controllers with screen but unfortunately all I've done was a mess with a burned Mega board. Your work motivate me so much man.

Arduino: 1.6.0 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Stilo_3_0.ino:2:8: error: too many decimal points in number
Stilo_3_0.ino:38:16: fatal error: UTFT: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

here what can I do