adafruit / adafruit/Adafruit_CircuitPython_SCD30
Example results in 'Unsupported baudrate' with Feather M0 & CircuitPython v7.3.3
- Dominant language
- Python
- Stars
- 17
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
ERROR DESCRIPTION:
- Provided example code and documentation recommends using frequency 50000 but this results in `ValueError: Unsupported baudrate` with the circuit described below
- Default frequency of 100000 does work in limited testing but is specifically recommend against by the SCD30 datasheet
- I cannot find a list of baudrates supported by Adafruit Feather M0 Datalogger. Other common baudrates <50000 were tested but all resulted in the same ValueError.
CIRCUIT:
- Using Adafruit Feather M0 Datalogger with CircuitPython 7.3.3. and SCD30 sensor connected via i2c
- I am not using Adafruit Part ID 4867, I am using an SCD30 directly, without the Adafruit breakout board. This means the SCL and SCA lines are 3.3v despite the SCD30 datasheet recommending an i2c high of 3v max. I don't believe it is relevant to this issue however.
CODE:
```
import adafruit_scd30, time, board, busio
#i2c = board.I2C() # this works
#i2c = busio.I2C(board.SCL, board.SDA, frequency=100000) # this works
i2c = busio.I2C(board.SCL, board.SDA, frequency=50000) # this does not work
scd30 = adafruit_scd30.SCD30(i2c)
time.sleep(5)
print("CO2: %d PPM" % scd30.CO2)
```
CODE OUTPUT:
`ValueError: Unsupported baudrate`
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository file or test is named. Reproduce the shown busio.I2C setup on an Adafruit Feather M0 Datalogger with CircuitPython 7.3.3, then determine whether the unsupported 50000 baudrate is handled by this library or by CircuitPython; done means the documented example and supported frequency are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100