Mac and Linux users can quickly and easily connect to the NodeMCU WiFi module running Konnected for interactive debugging using the screen command line tool.
The advantage of this is that you don't have to download any additional software aside from the device driver.
- Mac users: download and install the CH340 device driver. This allows your computer to communicate with the NodeMCU module via a USB connection. Linux users do not need a driver.
- Plug in the wifi module to your computer using a data quality USB cable.
Identify the name of the serial port assigned to the device by opening a terminal and listing devices. On Mac, the port name will use the pattern /dev/cu.wchusbserial*. On Linux, it's /dev/ttyUSB*
For this example, the serial port is /dev/cu.wchusbserial1410. Now connect to it using screen at 115200 baud using this command
screen /dev/cu.wchusbserial1410 115200
Press the small RST button on the WiFi module to reboot it and you should begin to see the initialization logs.
- Press ENTER on your keyboard to get a command prompt where you can interact with the device using the lua console.
- Exit screen by pressing CTRL-A then CTRL-\ and answer y to the prompt asking if you want to quit.