Shutte board help - Bosch API return code: 113
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- arduino, cpp
- 領域
- embedded-iot
調査の方向性
Use the provided Arduino IDE sketch as the entry point and reproduce the ESP32 I2C setup through check_connection(), init(), and setMode(). Inspect how the library handles the Bosch API return code 113 during mode changes, then confirm the required correction by rerunning the sketch and verifying that continuous or duty-cycle mode succeeds.
索引モデルが issue の本文から書いたものです。
説明
Hi,
I'm using shuttle board with esp32 on I2c mode. How to fix Bosch API return code: 113
Any help is appreciated thanks !
Logs
19:41:47.858 -> ✅ open() passed
19:41:47.997 -> ✅ reset() passed
19:41:47.997 ->
19:41:47.997 -> ✅ ID() passed
19:41:47.997 -> ✅ init() finished successfully
19:41:47.997 -> ✅ Init ready succeeded
19:41:52.961 -> ⚙️ Setting required parameters...
19:41:53.000 -> ✅ Parameters configured. Waiting for stabilization...
19:41:54.993 -> ⏳ Attempting to set CONTINUOUS mode...
19:41:55.026 -> 📋 Bosch API return code: 113
19:41:55.026 -> _bmv080_handle_class is OK
19:41:55.026 -> Error setting BMV080 mode. Code: 0
19:41:55.071 -> ⏳ Attempting to set DUTY CYCLE mode...
19:41:55.117 -> 📋 Bosch API return code: 113
19:41:55.117 -> _bmv080_handle_class is OK
19:41:55.117 -> ❌ Failed to set duty-cycle mode. Code: 0
19:41:55.117 -> ⏳ Attempting to set CONTINUOUS mode...
19:41:55.158 -> 📋 Bosch API return code: 113
19:41:55.193 -> _bmv080_handle_class is OK
19:41:55.193 -> Error setting BMV080 mode
Ardiuno IDE
#include "SparkFun_BMV080_Arduino_Library.h" // CTRL+Click here to get the library: http://librarymanager/All#SparkFun_BMV080
#include <Wire.h>
SparkFunBMV080 bmv080; // Create an instance of the BMV080 class
#define BMV080_ADDR 0x54 // Shuttleboard BMV080 defaults to 0x57
#define SDA_PIN 21
#define SCL_PIN 22
#ifdef ARDUINO_SPARKFUN_THINGPLUS_RP2040
#define wirePort Wire1
#else
#define wirePort Wire
#endif
void scan_device(){
Serial.println("\n🔍 Scanning I2C...");
for (uint8_t addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0) {
Serial.print("✅ Found device at 0x");
Serial.println(addr, HEX);
}
}
Serial.println("🔍 Scan complete");
}
void check_connection(){
if (bmv080.begin(BMV080_ADDR, Wire) == false)
{
Serial.println("BMV080 not detected at default I2C address. Check your jumpers and the hookup guide. Freezing...");
while (1);
}
Serial.println("BMV080 found!");
}
void setup()
{
Serial.begin(115200);
delay(2000);
Serial.println("🔧 Serial started");
Serial.println();
Serial.println("BMV080 Example 1 - Basic Readings");
Wire.begin(SDA_PIN, SCL_PIN);
// wirePort.setClock(400000); //Increase I2C data rate to 400kHz
// scan_device();
check_connection();
/* Initialize the Sensor (read driver, open, reset, id etc.)*/
Serial.println(bmv080.reset());
if (!bmv080.init()) {
Serial.println("❌ Sensor init failed");
while (1); // halt
}
Serial.println("✅ Init ready succeeded");
delay(5000); // <-- Give the sensor some time before setting mode
Serial.println("⚙️ Setting required parameters...");
bmv080.setVolumetricMassDensity(1.2); // Air at sea level ~1.2 kg/m³
bmv080.setDutyCyclingPeriod(30); // Default ~30s duty cycle
bmv080.setIntegrationTime(0.1); // 100ms integration
bmv080.setDoObstructionDetection(true);
bmv080.setDoVibrationFiltering(true);
bmv080.setMeasurementAlgorithm(1); // 1 = Standard
Serial.println("✅ Parameters configured. Waiting for stabilization...");
delay(2000); // Wait after setting params
int ret = bmv080.setMode(SF_BMV080_MODE_CONTINUOUS);
if (ret == true) {
Serial.println("BMV080 set to continuous mode");
} else {
Serial.print("Error setting BMV080 mode. Code: ");
Serial.println(ret);
}
int res = bmv080.setMode(SF_BMV080_MODE_DUTY_CYCLE);
if (res) {
Serial.println("✅ BMV080 set to duty-cycle mode");
} else {
Serial.print("❌ Failed to set duty-cycle mode. Code: ");
Serial.println(res);
}
/* Set the sensor mode to continuous mode */
if (bmv080.setMode(SF_BMV080_MODE_CONTINUOUS) == true)
{
Serial.println("BMV080 set to continuous mode");
}
else
{
Serial.println("Error setting BMV080 mode");
}
}
void loop()
{
if (bmv080.readSensor())
{
float pm10 = bmv080.PM10();
float pm25 = bmv080.PM25();
float pm1 = bmv080.PM1();
Serial.print("PM10: ");
Serial.print(pm10);
Serial.print("\t");
Serial.print("PM2.5: ");
Serial.print(pm25);
Serial.print("\t");
Serial.print("PM1: ");
Serial.print(pm1);
if (bmv080.isObstructed() == true)
{
Serial.print("\tObstructed");
}
Serial.println();
}
delay(100);
}
- 主要言語
- C++
- スター
- 15
- フォーク
- 3
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sparkfun/SparkFun_BMV080_Arduino_Library のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
sparkfun/SparkFun_BMV080_Arduino_Library#16 · コメント 1 件 ·
-
Artemis Supportオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
sparkfun/SparkFun_BMV080_Arduino_Library の issue をすべて見る
似ている issue
-
agent:WSL bug code-review linux LOW
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
improvement ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ihhub/fheroes2#11062 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
enhancement question
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DarkStarSystems/pcons#224 ·
メンテナーはふだん 1 日以内に返信