Skip to content

Commit fd22004

Browse files
committed
added initial interrupt example for activity
1 parent ff06556 commit fd22004

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/activity_interrupt.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import board
2+
i2c = board.I2C()
3+
4+
import adafruit_lsm303_accel
5+
accel = adafruit_lsm303_accel.LSM303_Accel(i2c)
6+
7+
accel._act_threshold = 20
8+
accel._act_duration = 1
9+
accel._int2_activity_enable = True
10+
11+
# toggle pins, defaults to False
12+
accel._int_pin_active_low = True

0 commit comments

Comments
 (0)