Simple Explanation of this code

Could anyone please give me a simple non technical explanation of the following lines of code. What do they do? Thanks

Adafruit_ILI9341 tft = Adafruit_ILI9341(PLDuino::LCD_CS, PLDuino::LCD_DC);
PLDTouch touch(PLDuino::TOUCH_CS, PLDuino::TOUCH_IRQ);

Adafruit_ILI9341 tft  // variable tft declared - the display
  = Adafruit_ILI9341( // construtor of the Adafruit_ILI9341 class
PLDuino::LCD_CS, // first parameter of the constructor
PLDuino::LCD_DC); // second parameter of the constructor

PLDTouch touch(PLDuino::TOUCH_CS, PLDuino::TOUCH_IRQ); // touch screen variable and constructor with two parameters

in both constructors the first parameter is the SPI select pin.

Thanks, looks like I have a lot to learn as what you said went right over my head.

mkwillauer:
Could anyone please give me a simple non technical explanation of the following lines of code. What do they do? Thanks

Adafruit_ILI9341 tft = Adafruit_ILI9341(PLDuino::LCD_CS, PLDuino::LCD_DC);

PLDTouch touch(PLDuino::TOUCH_CS, PLDuino::TOUCH_IRQ);

In "Object Oriented Programming" you define a "class" of object to group together a set of data and a number of functions that manipulate that data. In general the data can't be touched by functions that are NOT members of the object. That allows the representation of the data in the object to be changed without having to worry about any code outside the object being broken by the change.

Most Arduino hardware interface libraries implement an object class to represent the hardware device. Your code creates an instance of the class (an 'object') and calls the member functions of the object to use the hardware. Since you have some choice in how the device is wired to your Arduino the 'constructor' member function often needs to know what data pins you have chosen.

Your first line creates an object called 'tft' to control a Thin Film Transistor (TFT) LCD.

Your second line creates an object called 'touch' to control a touch-screen (probably over the LCD).