Skip to content

Commit b2675e7

Browse files
committed
Fix compilation for GIGA R1
1 parent 719e7d1 commit b2675e7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ sentence=Arduino Sensor Kit
66
paragraph=This library wraps all the libraries needed to use the Sensor Kit breakout board: OLED display, humidity and temperature sensor, pressure sensor and accelerometer.
77
category=Sensors
88
url=https://sensorkit.arduino.cc/
9-
architectures=avr
9+
architectures=avr,mbed_giga
1010
precompiled=false
1111
depends=Grove Temperature And Humidity Sensor,Grove - Barometer Sensor BMP280,U8g2,Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR

src/Arduino_SensorKit.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#include "Arduino_SensorKit.h"
22

3+
#if defined(ARDUINO_AVR_UNO)
4+
#define _PIN_SDA SDA
5+
#define _PIN_SCL SCL
6+
#elif defined(ARDUINO_GIGA)
7+
#define _PIN_SDA I2C_SDA1
8+
#define _PIN_SCL I2C_SCL1
9+
#else
10+
#error "This board is not supported by Arduino_SensorKit"
11+
#endif
12+
313
//Declare component's classes
4-
U8X8_SSD1306_128X64_NONAME_SW_I2C Oled(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);
14+
U8X8_SSD1306_128X64_NONAME_SW_I2C Oled(/* clock=*/ _PIN_SCL, /* data=*/ _PIN_SDA, /* reset=*/ U8X8_PIN_NONE);
515
DHT Environment(DHTPIN,DHT11);
616
DHT Environment_I2C(DHT20);
717
SensorKit_LIS3DHTR Accelerometer;

0 commit comments

Comments
 (0)