There are examples included with the program, just pick leonardo from tools->boards menu and it should be ready to program. the basic examples are easier to understand, programming is a bit tricky at first but its pretty easy with a leonardo, basically its a computer that can turn things on and off but it can do alot with it, also its good for reading ammounts of things in the digital/analog realm
if you need to brush up on your c++ skills i’ll try and post a guide here, for simple things though its easy to modify the existing code without much knowledge. basically the compiler looks runs setup() then main() functions and you can put what you want in them.
esp-01S is better than the 01 because the 2 io pins actually work as i2c pins.
esp8285 are nice compact design and newer probably.