0xnobodyreally / MarcOS-v1.0

MarcOS v1.0 | A Touchscreen menu for your Arduino
https://youtu.be/VgrpyojQUkk
16 stars 7 forks source link

White Screen Only #2

Open katyo4567 opened 4 years ago

katyo4567 commented 4 years ago

Hey! This code looks awesome, but the screen is a solid white. I'm using the Uno with this touchscreen: https://www.adafruit.com/product/1651.

Thanks so much for your help-- i can't wait to use this display menu. Cheers!

/Users/kateoliver/Documents/Arduino/DisplaySketch1/5.ino: In function 'void LedSettingsMenu()':
/Users/kateoliver/Documents/Arduino/DisplaySketch1/2.ino:73:25: warning: overflow in implicit constant conversion [-Woverflow]
 #define GOLD            0xF3FF00      //  nice yellow
                         ^
/Users/kateoliver/Documents/Arduino/DisplaySketch1/5.ino:83:23: note: in expansion of macro 'GOLD'
   StatusBarColor  =   GOLD;
                       ^~~~
/Users/kateoliver/Documents/Arduino/DisplaySketch1/5.ino: In function 'void Menu2()':
/Users/kateoliver/Documents/Arduino/DisplaySketch1/2.ino:73:25: warning: overflow in implicit constant conversion [-Woverflow]
 #define GOLD            0xF3FF00      //  nice yellow
                         ^
/Users/kateoliver/Documents/Arduino/DisplaySketch1/5.ino:129:23: note: in expansion of macro 'GOLD'
   StatusBarColor  =   GOLD;
                       ^~~~
Sketch uses 28466 bytes (88%) of program storage space. Maximum is 32256 bytes.
Global variables use 1504 bytes (73%) of dynamic memory, leaving 544 bytes for local variables. Maximum is 2048 bytes.
0xJxa commented 4 years ago

Hi Katherine,

a white screen usually means that the TFT library you're using is not the correct one for your TFT screen.

Have a look at this page: https://github.com/adafruit/TFTLCD-Library

To install, use the Arduino Library Manager and search for Adafruit 2.8" TFT display Library and install the library.

After installing the library, use one of the examples (from File > Examples > Adafruit TFTLCD Library) and see if your display works correctly. If it does you have to replace the TFT library in MarcOS with this new library and it should work.

0xJxa commented 4 years ago

also, if your display is 2.8 inch you will need to use the version for 2.8" of MarcOS, I have uploaded the code in the repository

katyo4567 commented 4 years ago

Thank you so much! So I made the changes you suggested but the sketch is now too big to compile on my Uno. What do you think I should do? I also had a couple of errors pop up with 'void' commands.

Again, thank you so much for your help on this-- this touchscreen display menu is the last piece I need to get my hardware project finished and fully up and running-- I really appreciate it!

/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino: In function 'void LedSettingsMenu()':
/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino:103:25: warning: overflow in implicit constant conversion [-Woverflow]
 #define GOLD            0xF3FF00      //  nice yellow
                         ^
/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino:260:23: note: in expansion of macro 'GOLD'
   StatusBarColor  =   GOLD;
                       ^~~~
/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino: In function 'void Menu2()':
/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino:103:25: warning: overflow in implicit constant conversion [-Woverflow]
 #define GOLD            0xF3FF00      //  nice yellow
                         ^
/Users/kateoliver/Documents/Arduino/DisplayThurs2/DisplayThurs2.ino:306:23: note: in expansion of macro 'GOLD'
   StatusBarColor  =   GOLD;
                       ^~~~
text section exceeds available space in board
Sketch uses 32296 bytes (100%) of program storage space. Maximum is 32256 bytes.
Global variables use 1527 bytes (74%) of dynamic memory, leaving 521 bytes for local variables. Maximum is 2048 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino Uno.
0xJxa commented 4 years ago

Yeah, this sketch struggles to work on an Arduino Uno, it works best with a Mega. Drawing all those menus really take up a lot of memory..

I think you could start by commenting out some parts that you don't need. For example, one or more of these (from s_Sections.ino):

Instead of commenting the whole function you could comment out the whole content, this way you don't need to remove other lines in the rest of the sketch. This way you are preventing the Uno from drawing the items/pages that you don't need and it should save up some (or a lot!) of memory. You can always remove the comments as and when you need :)