#!/usr/bin/python

import time
from sense_hat import SenseHat

s_hat = SenseHat()

compassEnabled = True
gyroEnabled = True
accelEnabled = False

while True:
	s_hat.set_imu_config(compassEnabled, gyroEnabled, accelEnabled)
	orient = s_hat.get_orientation_degrees()
	print("Orientation: Roll: %6.2F,  Yaw: %6.2f,   Pitch: %6.2f  - Degrees" % (orient["roll"], orient["yaw"], orient["pitch"]))
#	s_hat.set_imu_config(False, False, False)

#	s_hat.set_imu_config(True, False, False)
#	compass = s_hat.get_compass()
#	print("Compass: %f  - Degrees" % compass)
#	compassRaw = s_hat.get_compass_raw()
#	print("Compass Raw: X: %6.2F,  Y: %6.2f,   X: %6.2f  - microteslas" % (compassRaw["x"], compassRaw["y"], compassRaw["z"]))
#	s_hat.set_imu_config(False, False, False)
#
#	gyro = s_hat.get_gyroscope()
#	print("Gyro: %s  - Degrees" % gyro)
#	gyroRaw = s_hat.get_gyroscope_raw()
#	print("Gyro Raw: %s  - Radians/Second" % gyroRaw)
#
#	s_hat.set_imu_config(False, False, True)
#	accel = s_hat.get_accelerometer()
#	print("Accel: Roll: %6.2f,  Yaw: %6.2f,  Pitch: %6.2fs  - Degrees" % (accel["roll"], accel["yaw"], accel["pitch"]))
#	accelRaw = s_hat.get_accelerometer_raw()
#	print("Accel Raw: x: %6.2f,  y: %6.2f,   z: %6.2f - G" % (accelRaw["x"], accelRaw["y"], accelRaw["z"]))
#
#	gyro = s_hat.get_gyroscope()
#	print("Gyro: %s  - Degrees" % gyro)
#
#	print("")
	time.sleep(0.1)
