I'm new to NodeMCU and need to understand the initial setup process. Please outline the main steps to get started, including how to flash the firmware onto an ESP8266/ESP32 board using a recommended tool, and how to set up the development environment to upload and run a basic Lua script using a recommended tool. For each, specify the tool and the key actions involved.
Navigate to the NodeMCU documentation at `nodemcu-firmware.readthedocs.io`. Locate and navigate to the 'Getting started' section. Identify the three basic steps to get started with NodeMCU. From the 'Task / OS selector' table, identify the recommended tool for 'Flash firmware' (NodeMCU PyFlasher) and navigate to its dedicated section. Extract the key steps for flashing firmware using NodeMCU PyFlasher. Return to the 'Getting started' page (or navigate directly if possible). From the 'Task / OS selector' table, identify the recommended tool for 'Upload code' (ESPlorer or NodeMCU-Tool) and navigate to its dedicated section. If ESPlorer is TBD, proceed with NodeMCU-Tool. Extract the key steps for setting up the development environment and uploading/running Lua code using the identified tool. Synthesize all gathered information into a concise answer, specifying the tools and steps for each part of the initial setup.
The agent successfully navigates to `nodemcu-firmware.readthedocs.io/en/master/getting-started/`. The answer identifies the three basic steps as 'Build the firmware', 'Flash the firmware', and 'Upload code'. The answer specifies 'NodeMCU PyFlasher' as the recommended tool for flashing firmware. The flashing steps include: installing USB-to-serial drivers, connecting the USB cable, downloading/starting PyFlasher, and selecting the serial port/firmware binary/flash options. The answer specifies 'NodeMCU-Tool' as the recommended tool for uploading code (acknowledging ESPlorer is TBD). The development environment setup and code upload/run steps include: installing Node.js/NPM, installing NodeMCU-Tool globally, uploading Lua files, and running Lua files (e.g., via command line examples).