-
Notifications
You must be signed in to change notification settings - Fork 0
/
accel.py
42 lines (40 loc) · 1.13 KB
/
accel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
has to be python 2 :\ because it needs smbus. maybe there's somethign else to do about this. w/e
def enableLSM(self, accelerometer = True, gyroscope = True,
def getAccelerometerRaw(self):
def getGyroscopeRaw(self):
def getLSMTemperatureRaw(self):
def getIMURaw(self):
def getAllRaw(self):
def getLSMTemperatureCelsius(self, rounded = True):
"""
'import lsm6ds33'
'accel = lsm6ds33()'
'accel = lsm6ds33.LSM6DS33()'
'accel'
'accel.enableLSM()'
'accel.getAccelerometerRaw()'
'accel.getAllRaw()'
'while(True):'
' accel.getAllRaw()'
' accel.getAccelerometerRaw()'
'while(True):'
' accel.getAccelerometerRaw()'
'import time'
'time.sleep(5)'
'while(True):'
' accel.getAccelerometerRaw()'
' time.sleep(0.5)'
'while(True):'
' accel.getAccelerometerRaw()'
' time.sleep(0.1)'
'while(True):'
' accel.getAccelerometerRaw()'
' time.sleep(0.1)'
'while(True):'
'readline'
'import readline'
'readline.get_current_history_length()'
'readline.get_history_item()'
'for x in range(0..readline.get_current_history_length()): readline.get_history_item()'
'for x in range(0,readline.get_current_history_length()):'