Skip to content

Commit 616bfa1

Browse files
chris kruegerMichael Kellner
authored andcommitted
Update for lis3dhball example
1 parent 3daded5 commit 616bfa1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/drivers/lis3dhball/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import parseBMP from "commodetto/parseBMP";
1919
import Poco from "commodetto/Poco";
2020
import Resource from "Resource";
2121
import ILI9341 from "ili9341";
22-
import LIS3DH from "lis3dh";
22+
import {LIS3DH, Datarate, Range} from "lis3dh";
2323

2424
let pixelsOut = new ILI9341({});
2525
const width = pixelsOut.width;
@@ -46,7 +46,8 @@ render.begin();
4646
render.fillRectangle(ball.backgroundColor, 0, ball.yMin, width, height);
4747
render.end();
4848

49-
let sensor = new LIS3DH({});
49+
let sensor = new LIS3DH({sda: 4, clock: 5});
50+
sensor.configure({ rate: Datarate.DATARATE_400_HZ, range: Range.RANGE_4_G });
5051

5152
Timer.repeat(() => {
5253
let values = sensor.sample();

0 commit comments

Comments
 (0)