Exemplo n.º 1
0
    def __init__(self, speed, color):
        SenseHat.__init__(self)
        self.__rotation_delta = 0

        self.speed = speed
        self.color = color

        self.__autorotate = Autorotate(self)
        self.__autorotate.start()

        self.__autolight = Autolight(self)
        self.__autolight.start()
Exemplo n.º 2
0
    def __init__(self, base_dir):
        SenseHat.__init__(self)

        self.set_screen_color('red')

        self.base_dir = base_dir
        self.pressure_at_start = 1000  # standard millibars at sea level
        self.create_data_file()

        self.data_points = {
            'altitude': self.get_altitude,
            'temp_h': self.get_temperature_from_humidity,
            'temp_p': self.get_temperature_from_pressure,
            'humidity': self.get_humidity,
            'pressure': self.get_pressure,
            'orientation_pitch': self.get_orientation_pitch,
            'orientation_roll': self.get_orientation_roll,
            'orientation_yaw': self.get_orientation_yaw,
        }
Exemplo n.º 3
0
 def __init__(self):
     SenseHat.__init__(self)
     self.set_rotation(180)