To program the Wemos D1 Mini NodeMcu via Arduino development environment on the NanoPi do the following:
1 2 3 4 5 6 7 8 9 10 11 |
# download newest Linux Arm version from https://www.arduino.cc/en/Main/Software cd Downloads tar -xf arduino-1.8.0-linuxarm.tar.xz cd arduino-1.8.0 ./install.sh # ignore the error messages, arduino can be found in the Development menu or on desktop # open File-Preferences and add http://arduino.esp8266.com/stable/package_esp8266com_index.json to Additional Boards Manager URLs # open Tools->Board:xxx->Boards Manager select esp8266 and press install # open Tools->Board:xxx and select Wemos D1 mini # insert board into USB port and select under Tools->Port "/dev/ttyUSB0" sudo chmod a+rw /dev/ttyUSB0 |
For further information see https://github.com/esp8266/Arduino , ESP8266 Arduino documentation or Arduino language reference
The following libraries for sensors I use (Sketch->Include library->Manage Libraries):
Adafruit DHT-sensor-library Version 1.2.2
Adafruit_MQTT_Library Version 0.16.2
For adding a Filesystem to the ESP8266 see uploading-files-to-file-system