Cleanup 3rd party samples; update README.md; add some missing copyright, fix builds for boards without certain pin definitions
This commit is contained in:
@@ -209,14 +209,14 @@ void bmp280_get_calib_params(struct bmp280_calib_param* params) {
|
||||
int main() {
|
||||
stdio_init_all();
|
||||
|
||||
// useful information for picotool
|
||||
bi_decl(bi_2pins_with_func(PICO_DEFAULT_I2C_SDA_PIN, PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C));
|
||||
bi_decl(bi_program_description("BMP280 I2C example for the Raspberry Pi Pico"));
|
||||
|
||||
#if !defined(i2c_default) || !defined(PICO_DEFAULT_I2C_SDA_PIN) || !defined(PICO_DEFAULT_I2C_SCL_PIN)
|
||||
#warning i2c / bmp280_i2c example requires a board with I2C pins
|
||||
puts("Default I2C pins were not defined");
|
||||
#else
|
||||
// useful information for picotool
|
||||
bi_decl(bi_2pins_with_func(PICO_DEFAULT_I2C_SDA_PIN, PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C));
|
||||
bi_decl(bi_program_description("BMP280 I2C example for the Raspberry Pi Pico"));
|
||||
|
||||
printf("Hello, BMP280! Reading temperaure and pressure values from sensor...\n");
|
||||
|
||||
// I2C is "open drain", pull ups to keep signal high when no data is being sent
|
||||
|
||||
Reference in New Issue
Block a user