- Javascript + Vite
- Node.js
- C++
- Arduino IDE
- Arduino
- Breadboard
- Potentiometer
- 3 jumper cables (M-to-M)
cd clientnpm install- If not using Arduino, comment out line 29 in
index.html npm run dev
- Setup Arduino:
- Place potentiometer on the breadboard
- Connect center pin of potentiometer to
A2(it can be any analog port but the code is currently set to port 2) - Connect right pin of potentiometer to
5V - Connect left pin of potentiometer to
GND - Connect Arduino to computer
- Open Arduino IDE and paste contents of
src.ino - Upload contents to Arduino
- Make note of the port that the Arduino is on (found in Arduino IDE). You'll need it in a future step
cd arduinonpm install- Create a
.envfile, create a variableARDUINO_PORT, and set it to your Arduino's port node app.js- Follow client setup steps above