This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import smbus | |
| import time | |
| # --- BMP280 Registers --- | |
| # Default I2C address (Change to 0x77 if 0x76 doesn't work) | |
| DEVICE_ADDR = 0x76 | |
| # Register Addresses | |
| REG_DATA = 0xF7 | |
| REG_CONTROL = 0xF4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For more options and information see | |
| # http://rptl.io/configtxt | |
| # Some settings may impact device functionality. See link above for details | |
| # Uncomment some or all of these to enable the optional hardware interfaces | |
| #dtparam=i2c_arm=on | |
| #dtparam=i2s=on | |
| #dtparam=spi=on | |
| # Enable audio (loads snd_bcm2835) |