Skull Effect is a project that demonstrates how to trigger rgb LED cathodes effects on an Arduino board using a remote server. The project consists of two directories, skull_effect_loop and backend.
To use this project, you need to have the following:
- An ESP8266 development board
- Python 3.9 or later
- Pip package manager
- Clone this repository to your local machine:
git clone https://github.com/aviv57/skull_effect.git
- Navigate to the
backenddirectory and install the required packages:
cd backend
pip install -r requirements.txt
The skull_effect_loop directory contains the Arduino code that waits for an event from a remote server and starts LED effects when an event is received. To use this code, follow these steps:
- Open the
skull_effect_loop.inofile in the Arduino IDE. - Connect your Arduino board to your computer via USB.
- Upload the code to the board.
- Once the code is uploaded, open the serial monitor in the Arduino IDE to see the output.
The backend directory contains a mini server written using FastAPI. The server has two endpoints:
/set_event: Sets an event that the Arduino board will listen for./wait_for_event: This endpoint is used by the Arduino code to get notification as soon as the event is sent to the backend server.
To use the server, follow these steps:
- Open a terminal window and navigate to the
backenddirectory. - Run the server with the following command:
uvicorn main:app
- Once the server is running, you can make requests to the two endpoints using a tool like cURL or Postman.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your fork.
- Create a pull request.