Adding new capabilities and functionality to the bot is a new kind of computing experience. There are many things you can simply ask the bot to install and set up. Since it has the ability to download things from the internet, run commands, and install programs, it can get lots of stuff running all on its own.
In some cases, it may be quicker or easier to do a little bit of the setup manually before turning the bot loose to utilize the new capability. I used a mix of these techniques while adding various hardware and software components to the system.
This guide will document the steps that I took, but there are other more or less hands-on approaches that could be used to achieve the same ends.
To connect a BME680 temperature, humidity, pressure and gas sensor, make the following wiring connections:
- Pi SDA to BME680 SDA (blue wire)
- Pi SCL to BME680 SCL (yellow wire)
- Pi 3V to BME680 VIN (red wire)
- Pi GND to BME680 GND (black wire)
To connect a NeoPixel LED strand, make the following wiring connections:
- Pi 5V to NeoPixel 5V power (red wire)
- Pi GND to NeoPixel GND (black wire)
- Pi 26 to NeoPixel DIN (green wire)
Sensors
A BME680 Temperature, Humidity, Pressure and Gas Sensor is the first piece of external hardware I connected to the bot. Any other I2C sensor could be used instead, of course, but the BME680 gives it a mix of different types of data relevant to human comfort to work with and made for a good first test.
Start by installing Adafruit Blinka on the Raspberry Pi. I did this step manually following the instructions in the Blinka Learn Guide. I chose manual for this step because the script takes a few minutes and can output some warnings that the bot might interpret as problems to try to fix when it would be unnecessary.
When making the Python virtual environment, make it inside of the OpenClaw workspace so that the bot will have easy access to use and install more things into it later.
python3 -m venv ~/.openclaw/workspace/openclaw_venv --system-site-packages
When the Blinka install script is finished, it will prompt you to reboot the Pi.
After it comes back up, it's time to ask the bot to install the BME680 library and see if it can successfully get data from the sensor. I linked the bot to the pypi.org page for the CircuitPython BME680 driver, as well as the simpletest example from the same repo. Here is how the conversation started:
Me: I have made a python venv for you in your workspace called `pipbot_venv` and I installed Adafruit Blinka inside of it. I have also connected a BME680 sensor to the I2C bus. Can you install this library in the venv https://pypi.org/project/adafruit-circuitpython-bme680/ and try to connect to the sensor and get data from it. Here is an example script that shows how to access the sensor: https://github.com/adafruit/Adafruit_CircuitPython_BME680/blob/main/examples/bme680_simpletest.py Bot: The I2C scan found a device at address **0x38**, but that's not a typical BME680 address. The BME680 usually appears at: - **0x77** (default, SDO pin high/floating) - **0x76** (SDO pin connected to GND) Address 0x38 is commonly used by **AHT20/AHT21** sensors instead. Could you double-check: 1. Is the sensor definitely a BME680? (0x38 suggests it might be an AHT20) 2. Are the SDA/SCL wires connected to the correct pins? 3. Is the sensor powered (VIN to 3.3V or 5V, GND to GND)? If you want, I can try connecting to address 0x76 instead, or if you have an AHT20, I can grab that library instead!
The bot successfully installed the library and wrote a test script, but it didn't work when run. It started troubleshooting the issue by doing an I2C scan and found no devices with expected I2C address of 0x77 or the alternate 0x76. I confirmed those findings manually and then double checked all of the wiring including unplugging/re-plugging the STEMMA QT connector on the sensor. It turned out that it wasn't plugged in fully at first and started working fine once plugged in all the way.
Me: I think I just didn't have the connector seated properly. Try looking again for the default address 0x77. Bot: 🎉 The BME680 is working! **Sensor readings:** - **Temperature:** 19.8 °C (~68°F) - **Gas resistance:** 35,910 ohm (air quality indicator) - **Humidity:** 16.8% - **Pressure:** 1006.5 hPa - **Altitude:** ~56 meters (calculated from pressure) The test script is saved at `~/workspace/bme680_test.py`. Note that the temperature has a -5°C offset applied (common for BME680s since the chip runs warm) — you may want to calibrate that against a known thermometer. Also curious about that other device at 0x38 — that's typically an AHT20 humidity sensor. Do you have one of those on the same bus?
Success! Now the bot can get data from the sensor and relay it to us via any of the communications channels or take action based upon it.
NeoPixels
To get NeoPixels going I gave the bot even less information than for the sensor. It was given only the PyPI link to the CircuitPython NeoPixel library, no example code. It still managed to complete this successfully on the first try. Here is the conversation:
Me: Cool! next lets work on some rainbowy RGB fun. I have connect a strand of 30 NeoPixels to pin 26. Can you install https://pypi.org/project/adafruit-circuitpython-neopixel/ and then try to use it to control the NeoPixels. Try to set them to pink and brightness `0.1` Bot: Done! Are they glowing pink? 🩷✨ Me: perfect! yes they are now glowing pink. You can add NeoPixel control to your tools file as well. Bot: Done! I've added NeoPixel documentation to TOOLS.md including: - Pin and pixel count - Code example for basic usage - Common colors - Brightness note - Added the neopixel library to the installed packages list Added! Now I've got docs for: - 🌡️ BME680 Sensor - 🌈 NeoPixels (30 on GPIO 26) Ready to make some rainbow fun whenever you want! 🤖✨
Page last edited February 03, 2026
Text editor powered by tinymce.