This project enables communication between a Node.js backend, a React frontend, and an Arduino device to send Morse code messages via serial port.
- Frontend: Built with React and Vite, styled with Tailwind CSS.
- Backend: Node.js server using Express, communicates with Arduino via serial port.
- Arduino: Receives Morse code signals and controls an LED accordingly.
├── backend/ │ ├── arduinoCode/ │ │ └── morseArduino.ino │ ├── conection.js │ └── index.js ├── frontend/ │ ├── src/ │ └── ... ├── main.js ├── package.json └── README.md
- Frontend: Users send messages and interact with available serial ports.
- Backend: Handles requests from the frontend, manages serial port connections, and sends messages to Arduino.
- Arduino: Receives Morse code characters and blinks an LED based on the received signals.
- Node.js
- Arduino (with LED connected to pin 12)
- npm
- Clone the repository:
git clone https://github.com/devfacucoder/nodejs-arduino-morse cd nodejs-arduino-morse
- Install backend dependencies:
npm install
- Install frontend dependencies and start development server:
cd frontend npm install npm run dev
- Start Electron.js:
npx electron .
- Open the Electron app.
- Use the frontend to connect to the Arduino and send messages.
- View available serial ports and message logs in the console.
- Serial Port Not Found: Make sure your Arduino is connected and the correct port is specified in
backend/conection.js
. - Frontend Not Loading: Ensure the Vite dev server is running (
npm run dev
in thefrontend
folder). - Electron Issues: Check that Electron is installed and the backend server is running.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the ISC License.