This project demonstrates how to control an LED connected to a Raspberry Pi using IPFS pub-sub for decentralized messaging.
- Remote control of LEDs using IPFS.
- Uses Raspberry Pi GPIO for hardware interaction.
- Fully open-source and beginner-friendly.
- Raspberry Pi Zero 2 W (or any Raspberry Pi model with GPIO pins).
- LED.
- Internet connection.
- Python 3.x.
-
Clone this repository:
git clone https://github.com/t-manojkumar/ipfs-led-control.git
-
Install dependencies:
pip install -r requirements.txt
-
Start IPFS daemon:
ipfs daemon --enable-pubsub-experiment
-
Run the script:
python main.py
-
Control the LED:
- To turn the LED ON:
echo ON | ipfs pubsub pub led-control
- To turn the LED OFF:
echo OFF | ipfs pubsub pub led-control
- To turn the LED ON:
Feel free to submit pull requests or open issues for improvements and bug fixes.
This project is licensed under the MIT License. See LICENSE
for details.