arduino mega 2560 3.2 tft touch screen & ethernet shield, Doesnt work need help
ok own arduino mega 2560 3.2 tft touch screen , lcd shield, bought ethernet shield , connected mega , ended white screen... if remove ethernet shield, tft display normal... idea why getting white screen when ethernet shield plugged in?
any great... been trying figure out fix past 3 days no luck...
this mega tft lcd screen got...
http://www.ebay.com/itm/sainsmart-mega2560-3-2-tft-lcd-shield-touch-screen-sd-reader-for-arduino-2560-/271019848784?pt=lh_defaultdomain_0&hash=item3f1a0ab450
this ethernet shield bought:
http://www.ebay.com/itm/261623998879?_trksid=p2059210.m2749.l2649&sspagename=strk%3amebidx%3ait
here code testing on...
i haven't defined ethernet shield don't think matters tft connected stack anyways, if ethernet not being used... wouldn't tft still displays?
i have try'ed powering normal usb cable once uploaded sketch, unplug , plugged in external power supply of 12 v 750 ma ac-dc adapter , still getting white screen.
any great... been trying figure out fix past 3 days no luck...
this mega tft lcd screen got...
http://www.ebay.com/itm/sainsmart-mega2560-3-2-tft-lcd-shield-touch-screen-sd-reader-for-arduino-2560-/271019848784?pt=lh_defaultdomain_0&hash=item3f1a0ab450
this ethernet shield bought:
http://www.ebay.com/itm/261623998879?_trksid=p2059210.m2749.l2649&sspagename=strk%3amebidx%3ait
here code testing on...
code: [select]
#include <utft.h> // used interface tft display
#include <utouch.h> // used interface touch controller on tft display
#include <avr/pgmspace.h>
#include <eeprom.h>
#include <ds1307.h>
#include <tinyfat.h> // used acess sd card
#include <utft_tinyfat.h> // used read .raw images sd card
#include <sd.h> //used check sd card
#include <spi.h>
#include <ethernet.h>
//lcd touch panel , itdb02 mega shield v1.1
//(mega shield utilizes pins 5v, 3v3, gnd, 2-6, 20-41, & (50-53 sd card))
utft myglcd(ssd1289,38,39,40,41); //uncomment line ssd1289 tft screen
utouch mytouch (6,5,4,3,2); //pins used touch screen
utft_tinyfat myfiles(&myglcd); // start instance read images sd card
// initialize ethernet client library
// ip address , port of server
// want connect (port 80 default http):
ethernetclient client;
//declare fonts utilized
extern uint8_t smallfont[];
extern uint8_t bigfont[];
extern uint8_t sevensegnumfont[];
#define large true
#define small false
void setfont(boolean font, byte cr, byte cg, byte cb, byte br, byte bg, byte bb)
{
myglcd.setbackcolor(br, bg, bb); //font background black
myglcd.setcolor(cr, cg, cb); //font color white
if (font==large)
myglcd.setfont(bigfont); //font size large
else if (font==small)
myglcd.setfont(smallfont);
}
/**************************************** setup **************************************/
void setup()
{
serial.begin(9600);
sd.begin();
myglcd.initlcd(landscape);
myglcd.clrscr();
mytouch.inittouch(landscape);
mytouch.setprecision(prec_medium);
file.setsspin(53); // init sd card
file.initfat(spispeed_veryhigh);
}
/*********************************** end of setup ************************************/
/********************************** begin main loop **********************************/
void loop()
{
serial.println("fill screen in black");
myglcd.setcolor(0, 0, 0);
myglcd.fillrect(0, 0, 319, 239);
serial.println("display message");
setfont(small, 255, 0, 0, 0, 0, 0);
myglcd.print("lcd display working", center, 140);
}
i haven't defined ethernet shield don't think matters tft connected stack anyways, if ethernet not being used... wouldn't tft still displays?
i have try'ed powering normal usb cable once uploaded sketch, unplug , plugged in external power supply of 12 v 750 ma ac-dc adapter , still getting white screen.
ok got fixed not sure if works... tft , ethernet shield connected no change needed... did added in :
#include <spi.h>
#include <ethernet.h>
and :
// initialize ethernet client library
// ip address , port of server
// want connect (port 80 default http):
ethernetclient client;
and works... display... can tell me how can test ethernet shield , see if connects internet or how set run? did connected boards , powering usb cable
#include <spi.h>
#include <ethernet.h>
and :
// initialize ethernet client library
// ip address , port of server
// want connect (port 80 default http):
ethernetclient client;
and works... display... can tell me how can test ethernet shield , see if connects internet or how set run? did connected boards , powering usb cable
Arduino Forum > Using Arduino > Installation & Troubleshooting > arduino mega 2560 3.2 tft touch screen & ethernet shield, Doesnt work need help
arduino
Comments
Post a Comment