Help with three commands

This is the start of a sketch. I am having trouble understanding the meaning of the last three lines. They are highlighted with ‘?’ in the //.

Any clarification or direction would be appreciated.

#include <Wire.h>                                              //add library
#include <Adafruit_INA219.h>                              //add library
#include <Adafruit_SSD1306.h>                            //add library
#include "SdFat.h"                                              //add library

#define OLED_RESET 4                                        //define Pin4 as OLED_RESET

SdFat SD;                                                        // ?
Adafruit_SSD1306 display(OLED_RESET);               // ?
Adafruit_INA219 ina219;                                     // ?

Each of them declares an object whose class definition is specified in one the the #include statements above.

Each object will be used later in the sketch to control external hardware e.g. the SD object will help you read & write to an SD card.

In particular they define variables initialized to an instance of the class, and the display variable has a parameter passed to the constructor method.

thank you 'wildbull' & 'MarkT'

I have a grasp of the basics from tutorials and utube videos. Hoever this seems to be taking it to another level.

Would either of you know an onlune facility where someone in my position can introduce themselves to 'objects', 'class definition', 'constructor method' etc

For a high-level description, try Googling “Object Oriented Programming”. After that you’ll need to delve into how OOP is done in C++ (the language of Arduino). There are a myriad of online tutorials.

If you really want to know those things, any C++ tutorial will help you out - just google for them - there are thousands.

However, from an arduino perspective, unless you want to write your own classes, there is really no need to dig into that level of detail initially.

You have probably been using objects and methods already e.g. Serial is an object that has a Begin method. So just use the examples for the objects you want to use and find out there what methods are needed and you'll be able to get your sketches running.

This is a reasonable starting point.

thank you to gfvalvo & DKWatson however in my case i think that wildbill is probably closer to the point. I did try you link DKWAtson but the gap from where i am at the moment to there narrative on Classes and Object is too much for me atm

Thanks again

For more details you can look inside the libraries. The ones you add are in the "libraries" folder inside your sketchbook folder. At the top of the Preferences dialog you will find the path to your sketchbook folder. Each library has a folder containing header files (.h) and C++ source files (.cpp). They are text files, just like your sketch files (.ino).

////////// This is what is in the include file
class ThisIsAClass {
  int someVariable;
  int someFunction() {
    return 3;
/////////// This is the end of the include file

ThisIsAClass thisIsAnObject;

void setup() {