i2c-bus as an optional peer dependency.
Quick Start
Config
number
default:"1"
I2C bus number. Standard on all Raspberry Pi models is bus 1.
number
default:"0x76"
I2C address for the BME280 sensor.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Agentium 4.0.0 · Upgrade from 3.x.
Read temperature, humidity, and pressure from I2C sensors like BME280.
i2c-bus as an optional peer dependency.
import { Agent, ollama } from "@agentium/core";
import { SensorToolkit } from "@agentium/edge";
const sensor = new SensorToolkit({ busNumber: 1 });
const agent = new Agent({
name: "weather-station",
model: ollama("llama3.2:1b"),
instructions: "Read environmental data from sensors and report conditions.",
tools: [...sensor.getTools()],
});
const result = await agent.run("What's the current temperature and humidity?");
| Tool | Description |
|---|---|
sensor_list | Scan the I2C bus and discover connected devices |
sensor_read_temperature | Read temperature in Celsius from BME280 |
sensor_read_humidity | Read relative humidity as a percentage |
sensor_read_pressure | Read barometric pressure in hPa |
sensor_read_all | Read all measurements at once |
| Sensor | Measurements | Default Address |
|---|---|---|
| BME280 | Temperature, humidity, pressure | 0x76 |
| BMP180 | Temperature, pressure | 0x77 |