Pages: 1 [2] 3   Go Down
Author Topic: LED and aquarium controller with TFT LCD touch screen  (Read 22759 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, your controller looks great. However, I am having trouble getting the code to compile i keep getting the following errors:

Code:









/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'uint8_t DS1307new::isPresent()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:47: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::stopClock()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:55: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:58: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:60: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:61: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::startClock()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:68: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:71: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:73: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:74: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::getTime()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:82: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:85: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:86: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:87: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:88: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:90: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:91: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:92: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::setTime()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:106: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:107: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:108: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:109: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:110: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:111: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:112: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:113: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::getCTRL()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:121: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:128: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::setCTRL()':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:135: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:136: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::getRAM(uint8_t, uint8_t*, uint8_t)':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:146: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:156: error: 'class TwoWire' has no member named 'read'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp: In member function 'void DS1307new::setRAM(uint8_t, uint8_t*, uint8_t)':
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:166: error: 'class TwoWire' has no member named 'write'
/Users/DJW/Documents/Arduino/libraries/DS1307new/DS1307new.cpp:169: error: 'class TwoWire' has no member named 'write'
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK all the errors are gone, but now the screen just flashes and refreshes every second or two. Could it be because I haven't installed the RTC module yet?
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I don't think so. If arduino can't see RTC then some weird numbers are displayed instead of time and date.
I think it something with the screen, did you manage to successfully run examples from UTFT library?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I don't think so. If arduino can't see RTC then some weird numbers are displayed instead of time and date.
I think it something with the screen, did you manage to successfully run examples from UTFT library?

Yeah, all the examples work properly, and I can even get some simple sketches that I created to run no problem. Weird part is, i commented out a a section of the sketch pertaining to the clock (forgot where it is, ill try to look for it) and it caused the main screen to load fully, but right after loading it went to a menu screen with options to adjust the clock, led stuff, and some other things, but I couldnt tap on anything.
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Yeah, all the examples work properly, and I can even get some simple sketches that I created to run no problem. Weird part is, i commented out a a section of the sketch pertaining to the clock (forgot where it is, ill try to look for it) and it caused the main screen to load fully, but right after loading it went to a menu screen with options to adjust the clock, led stuff, and some other things, but I couldnt tap on anything.

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.
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 30, 2013, 10:17:33 am by vasco » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi mate,

Check those two lines:
Code:
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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Code:
//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 ;-)

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?
« Last Edit: March 17, 2013, 07:21:40 am by Sat_Dad » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you really care about water temps. No fish or bowl pics smiley-razz\
Logged

Pages: 1 [2] 3   Go Up
Jump to: