Help craeting modifying arduino libraries

I'm looking to educate myself on creating libraries for Arduino - Any recomendations for a good resource (Book/Online/etc?)

I often modify libraries. And what that means is that there is a conflict with the original library.
I want to be able to edit the .cpp and .h files so things don't get messed between different libraries.

A good example now is a conflict between an Adafruit and the TFT_eSPI libraries. I need to use both, but the compiler keeps getting confused. I played around with the source files, without success separating them.

As below these both use the 'tft' argument

Adafruit_ILI9341 tft = Adafruit_ILI9341();
TFT_eSPI tft = TFT_eSPI();       // Invoke custom library

Many Thanks

This is a good introductory tutorial for getting started writing Arduino libraries:

The Arduino Library Specification provides a lot of very useful information about libraries:

I don’t think it is the compiler that’s getting confused - you simply can’t have two variables in the same scope with the same name.

So what am I looking to rename?

Probably one of the instances currently called “tft”.

If you want specific help, post specific code, and specific error messages.

I renamed the tft to tft1 and all calls to that particular library with " tft1.begin(); " -

    tft.begin();               // Initialise the display
  //tft.fillScreen(TFT_BLACK); // Black screen fill
  ESP.wdtDisable( );
  // Wire.begin(0,4);            // Initialize I2C Comms
  tft1.begin();             // Initialize Display
  Serial.println("Im alive");

For reference I'm using both the Adafruit (heavily modified to plot on ram) and the e_TFT (link to gitHub) to load a bitmap to the display.

So before you can really get into the library thing, you need to do a good C++ course. There are numerous online tutorials that you can walk through. You have to understand that they’re mainly written for PCs and not Arduinos so they’ll use cout and cin and a bunch of << and >> instead of Serial.print and There are a few other differences. But the main points about variable creation, scope, blocks, flow, classes, structs, and all that stuff will all be the same.

You really have to know that sort of basic C++ stuff to get very advanced with Arduino. You hit a point where just changing random things stops working and you can never get any better. But C++ isn’t that hard if you’ll just start from the beginning and take a few days to go through one of those tutorials start to finish. OR at least up until you get to classes and structs. Maybe look at inheritance but you don’t have to really learn it. But the basics of classes and struct will be CRUCIAL to working with writing your own libraries.

Here’s one that I went through with someone once and liked. C++ Language - C++ Tutorials It’s by no means the only one or the best. But you can start at the first link under introduction and just keep reading until you get it and go to the next page.

The key to learning this stuff is that you can’t jump into the middle. You gotta really get the basics down to have any hope of understanding the later stuff.