A Raspberry Pi project for sensor data collection and sharing via MQTT, featuring light sensors (BH1750, VEML6075) and NeoPixel LED control.
- Light Sensors: BH1750 and VEML6075 UV sensors for indoor/outdoor light measurement
- MQTT Communication: Real-time sensor data publishing and subscription
- NeoPixel Control: WS2812B LED strip control for visual feedback
- Motor Control: BuildHAT motor integration for physical actuators
- Raspberry Pi (tested on Raspberry Pi 5)
- BH1750 light sensors (I2C)
- VEML6075 UV sensors (I2C)
- WS2812B NeoPixel LED strip
- BuildHAT (for motor control)
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/SensorShare3.git cd SensorShare3 -
Run the installation script:
chmod +x install.sh ./install.sh
Or for NeoPixel-specific installation:
chmod +x install_neopixel.sh ./install_neopixel.sh
-
Activate the virtual environment:
source venv/bin/activate -
Install Python dependencies:
pip install -r requirements.txt
source venv/bin/activate
python lighttest.pysource venv/bin/activate
python uv_sensor_basic.pysource venv/bin/activate
python mqtt_subscriber.pysource venv/bin/activate
python SensorShare_Receiver.pyLightSensors.py- Main light sensor interface (BH1750, VEML6075)SensorShare_Receiver.py- MQTT receiver for sensor datamqtt_subscriber.py- MQTT subscription clientwhitelight.py- White light controltest_neopixel.py- NeoPixel LED testingmotortest.py- Motor control testingrequirements.txt- Python dependencies
- MQTT configuration: Edit
mqtt_config.conf(not tracked in git) - I2C bus configuration: Modify bus numbers in sensor scripts if needed
- Python 3.11+
- paho-mqtt >= 1.6.1
- smbus2 >= 0.4.2
- buildhat >= 0.6.0
- RPi.GPIO >= 0.7.1
- adafruit-circuitpython-neopixel >= 6.3.0
[Add your license here]
[Add contribution guidelines here]