These are some general esp32 codes that will help you understand some basic writing and how a code is written for microcontroller.