An open API service indexing awesome lists of open source software.

https://github.com/xboxone08/bbbulb

Big Brain Bulb allows you to control LEDs using BlueDot and GPIOZero for Raspberry Pi GPIO
https://github.com/xboxone08/bbbulb

Last synced: 2 months ago
JSON representation

Big Brain Bulb allows you to control LEDs using BlueDot and GPIOZero for Raspberry Pi GPIO

Awesome Lists containing this project

README

        

# Big Brain Bulb
Big Brain Bulb allows you to remotely control an LED with your phone and Raspberry Pi equipped with a motion sensor by using the BlueDot and GPIOZero modules.
You can set it to "Always On" or "Motion-Activated" mode.
"Motion-Activated" mode will automatically turn the light on when motion is detected between 7:30 PM and 6 AM.

# Usage
## Setup
### Hardware
#### Supplies
- Raspberry Pi with GPIO header
- Female-to-female jumper wires
- A 3-pin PIR Motion Sensor module
- An LED
- A resistor
#### Steps
- Orient the PIR module with the pins facing down and toward you
- For the following steps, refer to [this reference](pinout.xyz) if you need to
- Connect the leftmost pin to a 3v3 on your Pi with a jumper wire
- Connect the middle one to GPIO10 on your Pi likewise
- Connect the rightmost to ground (GND) in the same way
- Connect the LED cathode (shorter leg) in series with the resistor to GPIO 14
- Connect the LED anode (longer leg) to ground (GND)
### Software
- If not already done, pair your phone and Raspberry Pi (put one in discoverable mode and send a pairing request from the other)
- If not already installed, install the [BlueDot app](http://play.google.com/store/apps/details?id=com.stuffaboutcode.bluedot) on your phone
- Open a terminal window on your Raspberry Pi
- Clone this repository to your Raspberry Pi using `git clone https://github.com/xboxone08/bbbulb.git`
- Change directory into the newly cloned directory using `cd bbbulb`
- Create a virtual environment using `python3 -m venv --system-site-packages venv`
- Activate the virtual environment using `source venv/bin/activate`
- Install the dependencies (BlueDot and GPIOZero) to your Raspberry Pi using `pip3 install ` for each
## Running
- Run `main.py` with Python3 on your Raspberry Pi (`python3 main.py`)
- Once the program prints, "Waiting for connection", connect to your Raspberry Pi from the BlueDot app on your phone
## Using
The button in the BlueDot app on your phone displays the light's status:
- The shape, square or circle, denotes the "Always On" or "Motion-Activated" mode, respectively.
- The color, white or black, denotes the light being on or off, respectively.
Tapping the button which toggle the mode.