You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int x = Wire.read(); // receive byte as an integer
280
278
Serial.println(x); // print the integer
281
279
}
282
-
```
280
+
```
281
+
282
+
### Accelerometer
283
+
284
+
This code lets you read accelerometer data from a [Grove 6-Axis Accelerometer module](https://store.arduino.cc/collections/sensors/products/grove-6-axis-accelerometer-gyroscope) using the [seeed arduino LSM6DS3 library](https://www.arduino.cc/reference/en/libraries/seeed-arduino-lsm6ds3/).
285
+
286
+
```arduino
287
+
#include "LSM6DS3.h"
288
+
#include "Wire.h"
289
+
290
+
//Create instance of Accelerometer class
291
+
LSM6DS3 accelerometer(I2C_MODE, 0x6A);
292
+
293
+
void setup() {
294
+
// put your setup code here, to run once:
295
+
Serial.begin(9600);
296
+
while (!Serial);
297
+
298
+
if (accelerometer.begin() != 0) {
299
+
Serial.println("LSM6DS3 not found, check your wiring.");
[This code example](https://github.com/adafruit/Adafruit_SSD1306/blob/master/examples/ssd1306_128x32_i2c/ssd1306_128x32_i2c.ino) lets you write on an [Adafruit Monochrome I2C OLED display](https://www.adafruit.com/product/4440) using the popular ssd1306 driver
331
+
332
+
### I2C BME280
333
+
[This code example](https://github.com/sparkfun/SparkFun_BME280_Arduino_Library/) lets you read temperature, humidity, pressure and altitude from [Sparkfuns BME280 breakout module](https://www.sparkfun.com/products/13676)
0 commit comments