Pages: [1]   Go Down
Author Topic: Accessing classes created in main sketch from a library  (Read 205 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this defined in my main library:

Code:
UTFT        myGLCD(ITDB32S, 38,39,40,41);

How do I access myGLCD from my Comms library (a Library that I wrote and is contained in my sketch folder);

Any help is much appreciated!

Loren
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Define a begin method for comm class. The begin will take a TFT * argument among other arguments. Set up your tft object outside seyup($ and loop(), then in setup() call comm.begin(&myGLCD, ...)
Logged


Pages: [1]   Go Up
Jump to: