Skip to content

Commit ff345d3

Browse files
chris kruegermkellner
authored andcommitted
Update for lis3dhball example #2
1 parent 3428a8e commit ff345d3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/drivers/lis3dhball/main.js

Lines changed: 3 additions & 4 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, Datarate, Range} from "lis3dh";
22+
import LIS3DH from "lis3dh";
2323

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

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

5251
Timer.repeat(() => {
5352
let values = sensor.sample();
5453

55-
if (180 == parseInt(config.orientation)) {
54+
if (180 === parseInt(config.orientation)) {
5655
values.x = -values.x;
5756
}
5857

0 commit comments

Comments
 (0)