Skip to content

BWsix/nextjs-esp8266-mqtt-wireless-communication

Repository files navigation

Next.js, esp8266, mqtt wireless communication example

Installation

pre-requirements

  1. install node.js (https://nodejs.org/en/)
  2. install git (https://git-scm.com/)
  3. install essential packages by running npm i -g yarn localtunnel
  4. clone this repo by running git clone https://github.com/BWsix/nextjs-esp8266-mqtt-wireless-communication.git

esp8266

  1. install arduino ide (https://www.arduino.cc/en/software)
  2. change wifi ssid, password and mqtt topic name in nodemcu/main.ino
  3. change topic name in pages/index.tsx
  4. upload nodemcu/main.ino to your esp8266 board

Server

  1. cd into nextjs-esp8266-mqtt-wireless-communication
  2. install node packages by running yarn
  3. build next.js server by running yarn build
  4. start the server by running yarn start
    1. go to localhost:3000
    2. or expose your port 3000 of your local network by running yarn tunnel

Demo

https://www.youtube.com/watch?v=M9e2a8SgBEQ

About

Next.js, esp8266, mqtt wireless communication example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published