Go Down

Topic: LED and aquarium controller with TFT LCD touch screen (Read 49164 times) previous topic - next topic

mathiu

ok so the problem was i using the URTouch library and not the Utouch when i change that worked perfect!

ROSS try to download the 1.5.7 IDE

and a video
https://www.youtube.com/watch?v=QWwTmiMWcNw

and the code

mathiu

Any suggestions to put the screen into sleep mode? After a short research didn't find something useful.

RossS

Mathiu

Thankyou for continuing with this I've downloaded the 1.5.7 IDE but been too busy to proceed any further I will get back to it in a few days.

Ross

mathiu

Which transistor should i use to the ato pump? I have a 12v pump.

mathiu

Some update. I add the rtc, water temperature, and make the ato work perfectly. https://youtu.be/z9UREm2eALc

mariuszg1

Hello. I have a problem installing stilo 3.0.
I get these errors:

In file included from Stilo_3_0.ino:46:
/writeAnything.h: In function 'int EEPROM_writeAnything(int, const T&)':
writeAnything.h:6: error: 'EEPROM' was not declared in this scope
/writeAnything.h: In function 'int EEPROM_readAnything(int, T&)':
writeAnything.h:15: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void SaveToEEPROM(int)':
Stilo_3_0:752: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void ReadFromEEPROM()':
Stilo_3_0:824: error: 'EEPROM' was not declared in this scope
Stilo_3_0.ino: In function 'void ClearEEPROM()':
Stilo_3_0:907: error: 'EEPROM' was not declared in this scope

I have a 3-2-TFT-LCD-Display-Touch-Screen-Shield-V2-2-Mega2560-Board-Kit.

link: http://www.ebay.com/itm/3-2-TFT-LCD-Display-Touch-Screen-Shield-V2-2-Mega2560-Board-Kit-for-Arduino/331607425639?ssPageName=STRK%3AMEBIDX%3AIT&var=540757189514&_trksid=p2057872.m2749.l2649

Barclay

#66
Oct 02, 2017, 09:54 pm Last Edit: Oct 02, 2017, 10:03 pm by Barclay Reason: Modify code
Hi guys, when I try to compile I have this:



Code: [Select]
Arduino:1.8.4 (Windows 10), Scheda:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h: In function 'int EEPROM_writeAnything(int, const T&)':

writeAnything.h:6: error: 'EEPROM' was not declared in this scope

    EEPROM.write(ee++, *p++);

    ^

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h: In function 'int EEPROM_readAnything(int, T&)':

writeAnything.h:15: error: 'EEPROM' was not declared in this scope

    *p++ = EEPROM.read(ee++);

           ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:49:0:

sketch\writeAnything.h: At global scope:

writeAnything.h:1: error: redefinition of 'template<class T> int EEPROM_writeAnything(int, const T&)'

 template <class T> int EEPROM_writeAnything(int ee, const T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h:1:24: note: 'template<class T> int EEPROM_writeAnything(int, const T&)' previously declared here

 template <class T> int EEPROM_writeAnything(int ee, const T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:49:0:

writeAnything.h:10: error: redefinition of 'template<class T> int EEPROM_readAnything(int, T&)'

 template <class T> int EEPROM_readAnything(int ee, T& value)

                        ^

In file included from C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino:2:0:

C:\Users\pietro\Desktop\Arduino\libraries\writeAnything/writeAnything.h:10:24: note: 'template<class T> int EEPROM_readAnything(int, T&)' previously declared here

 template <class T> int EEPROM_readAnything(int ee, T& value)

                        ^

Stilo_3_0:55: error: 'UTouch' does not name a type

 UTouch      myTouch(46,45,44,43,42);

 ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightButton(char*, int, int, int, int)':

Stilo_3_0:451: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightUpButton(int, int)':

Stilo_3_0:485: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void hlightDownButton(int, int)':

Stilo_3_0:498: error: 'myTouch' was not declared in this scope

   while (myTouch.dataAvailable()) {

          ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void printDate(int, int)':

Stilo_3_0:614: error: 'RTC' was not declared in this scope

   strcat(chDate, Day[RTC.dow]);

                      ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void SaveRTC()':

Stilo_3_0:916: error: 'RTC' was not declared in this scope

    RTC.stopClock();    

    ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void LED_levels_output()':

Stilo_3_0:935: error: 'RTC' was not declared in this scope

   min_cnt= (RTC.hour*60)+RTC.minute;

             ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void moon_init()':

Stilo_3_0:990: error: 'RTC' was not declared in this scope

   moonphase(RTC.year, RTC.month, RTC.day);

             ^

Stilo_3_0:990: error: 'moonphase' was not declared in this scope

   moonphase(RTC.year, RTC.month, RTC.day);

                                         ^

Stilo_3_0:993: error: 'riseset' was not declared in this scope

     riseset(latitude, longtitude);

                                 ^

Stilo_3_0:997: error: 'Moon' was not declared in this scope

     if (Moon.isRise) {

         ^

Stilo_3_0:1004: error: 'Moon' was not declared in this scope

     if (Moon.isSet) {

         ^

Stilo_3_0:1023: error: 'Moon' was not declared in this scope

       if ( (!Moon.isSet) || ((rise_time > set_time)&&(tnow>=rise_time)) ) {      //calculate for next day

              ^

Stilo_3_0:1028: error: 'Moon' was not declared in this scope

       itoa(Moon.setH, tmpChar, 10);

            ^

Stilo_3_0:1040: error: 'Moon' was not declared in this scope

       if ( (!Moon.isRise) || ((set_time > rise_time)&&(tnow>=set_time)) ) {      //calculate for next day

              ^

Stilo_3_0:1045: error: 'Moon' was not declared in this scope

       itoa(Moon.riseH, tmpChar, 10);

            ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void moonlight_output()':

Stilo_3_0:1079: error: 'RTC' was not declared in this scope

   long tnow = RTC.time2000;

               ^

Stilo_3_0:1082: error: 'Moon' was not declared in this scope

     tout = map(Moon.light, 0, 100, moonSett.newMoonLight, moonSett.fullMoonLight);

                ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void mainScreen(boolean)':

Stilo_3_0:1147: error: 'RTC' was not declared in this scope

   if ((RTC.hour!=prevRTC.tHour) || (RTC.minute!=prevRTC.tMinute) || refreshAll) {    //time

        ^

Stilo_3_0:1154: error: 'RTC' was not declared in this scope

   if ((RTC.day!=prevRTC.tDay) || (RTC.month!=prevRTC.tMonth) || (RTC.year!=prevRTC.tYear) || refreshAll) {     //date

        ^

Stilo_3_0:1221: error: 'tmpMoon' was not declared in this scope

   if ((tmpMoon.light!=Moon.light) || refreshAll) {       //moonlight part

        ^

Stilo_3_0:1221: error: 'Moon' was not declared in this scope

   if ((tmpMoon.light!=Moon.light) || refreshAll) {       //moonlight part

                       ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void clockScreen(boolean)':

Stilo_3_0:1274: error: 'RTC' was not declared in this scope

       tmpRTC.tHour = RTC.hour;

                      ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void testScreen(boolean)':

Stilo_3_0:1380: error: 'myTouch' was not declared in this scope

       if (myTouch.dataAvailable())  {

           ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void processMyTouch()':

Stilo_3_0:1785: error: 'myTouch' was not declared in this scope

   myTouch.read();

   ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void setup()':

Stilo_3_0:2495: error: 'myTouch' was not declared in this scope

   myTouch.InitTouch(LANDSCAPE);

   ^

Stilo_3_0:2513: error: 'RTC' was not declared in this scope

   RTC.getTime();

   ^

C:\Users\pietro\Desktop\Arduino\Stilo_3_0\Stilo_3_0.ino: In function 'void loop()':

Stilo_3_0:2537: error: 'myTouch' was not declared in this scope

   if (myTouch.dataAvailable())  {

       ^

Stilo_3_0:2561: error: 'RTC' was not declared in this scope

       RTC.getTime();

       ^

Stilo_3_0:2588: error: 'RTC' was not declared in this scope

         if (((moonSett.moonrise == RTC.hour) || (moonSett.moonset == RTC.hour)) && (RTC.minute == 0)) {

                                    ^

Stilo_3_0:2597: error: 'Moon' was not declared in this scope

       else if (((Moon.riseH == RTC.hour) && (Moon.riseM == RTC.minute)) || ((Moon.setH == RTC.hour) && (Moon.setM == RTC.minute))) {

                  ^

Stilo_3_0:2597: error: 'RTC' was not declared in this scope

       else if (((Moon.riseH == RTC.hour) && (Moon.riseM == RTC.minute)) || ((Moon.setH == RTC.hour) && (Moon.setM == RTC.minute))) {

                                ^

exit status 1
'EEPROM' was not declared in this scope

Questo report potrebbe essere piĆ¹ ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"



Someone to help me please??

Burakko

Barclay do you have a EEPROM library ? in Arduino/library ? Dowlnolad new EEPROM or change the compiler to another version.

My work fine but I have problems with the outputs. I do not have voltage converters from 5V to 3V3 so I changed the voltage regulator on the MEGA board. Now working very slowly. But it works. I have problem with out, which transistor would be used to be controlled by 3V3 ?

Barclay

Thank you Burakko, I have the EEPROM library.
I'll try whit another IDE (1.5.7 ? )

Barclay


Barclay


Go Up