adafruit / Adafruit_BME280_Library

Arduino Library for BME280 sensors
Other
328 stars 301 forks source link

bme280test example typo errors #109

Closed hraHoo closed 10 months ago

hraHoo commented 10 months ago

Thank you for opening an issue on an Adafruit Arduino library repository. To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:

If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:

in code starting lines: 46 // You can also pass in a Wire library object like &Wire2 47 // status = bme.begin(0x76, &Wire2)

line 47 missing semicolon end of line. line 47 also "&wire2" has extra character "2" in parameter.

caternuson commented 10 months ago

The 2 is intentional. The numeric suffix is how non-default I2C busses are specified. Wire is default. Then (if board has them) Wire1, Wire2, etc.

The missing semicolon is generally OK. The comment is showing basic syntax, not actual code to be uncommented and used as is. Very few boards have a Wire2, so it would most likely require modification regardless.