Skip to content

Repository files navigation

SensorShare3

A Raspberry Pi project for sensor data collection and sharing via MQTT, featuring light sensors (BH1750, VEML6075) and NeoPixel LED control.

Features

  • 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

Hardware Requirements

  • Raspberry Pi (tested on Raspberry Pi 5)
  • BH1750 light sensors (I2C)
  • VEML6075 UV sensors (I2C)
  • WS2812B NeoPixel LED strip
  • BuildHAT (for motor control)

Installation

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/SensorShare3.git
    cd SensorShare3
  2. Run the installation script:

    chmod +x install.sh
    ./install.sh

    Or for NeoPixel-specific installation:

    chmod +x install_neopixel.sh
    ./install_neopixel.sh
  3. Activate the virtual environment:

    source venv/bin/activate
  4. Install Python dependencies:

    pip install -r requirements.txt

Usage

Light Sensor Testing

source venv/bin/activate
python lighttest.py

UV Sensor Testing

source venv/bin/activate
python uv_sensor_basic.py

MQTT Subscriber

source venv/bin/activate
python mqtt_subscriber.py

SensorShare Receiver

source venv/bin/activate
python SensorShare_Receiver.py

Project Structure

  • LightSensors.py - Main light sensor interface (BH1750, VEML6075)
  • SensorShare_Receiver.py - MQTT receiver for sensor data
  • mqtt_subscriber.py - MQTT subscription client
  • whitelight.py - White light control
  • test_neopixel.py - NeoPixel LED testing
  • motortest.py - Motor control testing
  • requirements.txt - Python dependencies

Configuration

  • MQTT configuration: Edit mqtt_config.conf (not tracked in git)
  • I2C bus configuration: Modify bus numbers in sensor scripts if needed

Requirements

  • 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

License

[Add your license here]

Contributing

[Add contribution guidelines here]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages