- install node.js (https://nodejs.org/en/)
- install git (https://git-scm.com/)
- install essential packages by running
npm i -g yarn localtunnel
- clone this repo by running
git clone https://github.com/BWsix/nextjs-esp8266-mqtt-wireless-communication.git
- install arduino ide (https://www.arduino.cc/en/software)
- change wifi ssid, password and mqtt topic name in nodemcu/main.ino
- change topic name in pages/index.tsx
- upload nodemcu/main.ino to your esp8266 board
- cd into
nextjs-esp8266-mqtt-wireless-communication
- install node packages by running
yarn
- build next.js server by running
yarn build
- start the server by running
yarn start
- go to
localhost:3000
- or expose your port 3000 of your local network by running
yarn tunnel
- go to