File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,21 @@ def set_sample_rate(self, sample_rate):
391
391
except Exception as e :
392
392
print ("Something went wrong while setting sample rate: " + str (e ))
393
393
394
+ def set_accelerometer (self , toggle_position ):
395
+ """ Enable / disable accelerometer """
396
+ try :
397
+ if self .board_type == k .BOARD_GANGLION :
398
+ # Commands to set toggle to on position
399
+ if toggle_position == 1 :
400
+ self .wifi_write ('n' )
401
+ # Commands to set toggle to off position
402
+ elif toggle_position == 0 :
403
+ self .wifi_write ('N' )
404
+ else :
405
+ print ("Board type not supported for setting accelerometer" )
406
+ except Exception as e :
407
+ print ("Something went wrong while setting accelerometer: " + str (e ))
408
+
394
409
"""
395
410
396
411
Clean Up (atexit)
You can’t perform that action at this time.
0 commit comments