예제 #1
0
 def SetupMimo(self):
     mimo.set_led_brightness(150)
     mimo.set_tunners_enable_status(True)
     mimo.set_independent_lights(False, True)
     mimo.set_buttons_enable_status(False, True)
     mimo.set_optimization_buttons_mode([0,1, 1,1, 2,1, 3,1, 4,1])
     mimo.set_optimization_buttons_active_status([0,0, 1,0, 2,0, 3,0, 4,0, 5,0])
예제 #2
0
 def __init__(self):
     SceneBase.__init__(self)
     mimo.reset()
     self.percentage = 0
     mimo.set_led_brightness(120)
     mimo.set_independent_lights(True, True)
     # check ring and bulbs leds
     self.AddTrigger(1, self, 'LoadRing')
예제 #3
0
 def SetupMimo(self):
     mimo.set_led_brightness(150)
     mimo.set_buttons_enable_status(True, False)
     mimo.set_material_ligths_on([0,0, 1,0, 2,0, 3,0, 4,0, 5,0, 6,0, 7,0, 8,0, 9,0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26,0, 27,0])
     mimo.set_optimization_ligths_on([0,0, 1,0, 2,0, 3,0, 4,0])
 
     mimo.set_material_buttons_mode([0,1, 1,1, 2,1, 3,1, 4,1, 5,1, 6,0, 7,0])
     mimo.set_independent_lights(True, True)
     mimo.set_material_leds_color([7, 0xf7, 0x5a, 0xff])
예제 #4
0
    def __init__(self):
        OptimizationScene.__init__(self)
        self.coldown = 0
        mimo.set_led_brightness(150)
        self.pusherDownSprite = NeoSprite('assets/NeoSprites/pusher.png')
        self.pusherUpSprite = NeoSprite('assets/NeoSprites/pusherUp.png')
        self.base_color = 0xfff
        self.pusherDownSprite.y = -8
        self.pusherUpSprite.y = 8

        self.colors = [0xf00, 0xff0, 0x0f0, 0x0ff, 0x00f]
        mimo.set_independent_lights(False, True)
        mimo.set_buttons_enable_status(False, True)

        led_lights = []
        index = 0
        for color in self.colors:
            led_lights += [index]
            led_lights += [(color >> 8) * 0xf, ((color >> 4) & 0xf) * 0xf,
                           (color & 0xf) * 0xf]
            index += 1
        mimo.set_optimization_leds_color(led_lights)
        self.playing = False
예제 #5
0
    def __init__(self):
        SceneBase.__init__(self)
        mimo.reset()

        mimo.set_led_brightness(120)
        mimo.set_independent_lights(True, True)
        # check ring and bulbs leds
        factor = 0.2
        loops = 50
        n_leds = 28
        leds = list(range(0, 28))
        for index in range(0, n_leds * loops):
            led_i = leds[index % n_leds]
            self.AddTrigger((1.5 + index) * factor, mimo,
                            'set_material_leds_color', [
                                led_i,
                                int(random.random() * 255),
                                int(random.random() * 255),
                                int(random.random() * 255)
                            ])
            self.AddTrigger((1.5 + index + 0.9) * factor, mimo,
                            'set_material_leds_color', [led_i, 0, 0, 0])

        n_leds = 69
        leds = list(range(0, 69))
        for index in range(0, n_leds * loops):
            led_i = leds[index % n_leds]
            self.AddTrigger((1.5 + index) * factor, mimo,
                            'set_optimization_leds_color', [
                                led_i,
                                int(random.random() * 255),
                                int(random.random() * 255),
                                int(random.random() * 255)
                            ])
            self.AddTrigger((1.5 + index + 0.9) * factor, mimo,
                            'set_optimization_leds_color', [led_i, 0, 0, 0])
예제 #6
0
 def SetupMimo(self):
     mimo.set_led_brightness(150)
     mimo.set_tunners_enable_status(True)
     mimo.set_independent_lights(False, True)
예제 #7
0
    def __init__(self):
        SceneBase.__init__(self)
        mimo.reset()

        self.logo = utils.Sprite('assets/sprites/logo_MCorp.png', 1280 / 2,
                                 720 / 2)
        self.logo.opacity = 0

        self.sfx_mimo_logo = utils.get_sound(
            'assets/audio/SFX/M_OS/UI_Booth.ogg')

        self.AddTween("easeInOutSine", 2, self.logo, "opacity", 0, 255, 1)
        self.AddTrigger(1, self.sfx_mimo_logo, 'play')

        # check ring and bulbs leds
        factor = 0.1
        loops = 50
        n_leds = 20
        leds = list(range(8, 28))
        for index in range(0, n_leds * loops):
            led_i = leds[index % n_leds]
            self.AddTrigger((1.5 + index) * factor, mimo,
                            'set_material_leds_color', [
                                led_i,
                                int(random.random() * 255),
                                int(random.random() * 255),
                                int(random.random() * 255)
                            ])
            self.AddTrigger((1.5 + index + 0.9) * factor, mimo,
                            'set_material_leds_color', [led_i, 0, 0, 0])

        # check buttons and backlight buttons.
        mimo.set_buttons_enable_status(True, True)
        mimo.set_independent_lights(False, False)
        mimo.set_led_brightness(120)
        mimo.set_material_buttons_lock_status(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0])
        mimo.set_material_buttons_mode(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0])
        mimo.set_optimization_buttons_lock_status(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0])
        mimo.set_optimization_buttons_mode([0, 0, 1, 0, 2, 0, 3, 0, 4, 0])

        # activate knobs
        mimo.set_tunners_enable_status(True)

        # create matrix sprite
        self.testSprite = AnimatedNeoSprite('assets/palomita.png')

        self.label = TextNeoSprite("people")
        self.label.y = 2

        font = pygame.font.Font("assets/fonts/VCR_OSD_MONO_1.001.ttf", 36)
        self.title = utils.Text("Hello Machinaria!", font)
        self.title.opacity = 0
        self.title.SetPosition(400, 200)
        self.AddTween("easeInOutSine", 2, self.title, "opacity", 0, 255, 1)

        # check lcd screens
        for index in range(0, 6):
            mimo.lcd_display_at(index, 'id' + str(index) + '- line 1', 1)
            mimo.lcd_display_at(index, 'id' + str(index) + '- line 2', 2)
예제 #8
0
 def SetupMimo(self):
     mimo.set_led_brightness(150)
     mimo.set_buttons_enable_status(True, False)
     mimo.set_independent_lights(False, True)
     mimo.set_material_buttons_mode([0,0, 1,0, 2,0, 3,0, 4,0, 5,0, 6,0, 7,0])
     mimo.set_material_buttons_active_status([0,0, 1,0, 2,0, 3,0, 4,0, 5,0, 6,0, 7,0])
예제 #9
0
    def __init__(self):
        SceneBase.__init__(self)
        mimo.reset()

        self.logo = utils.Sprite('assets/sprites/logo_MCorp.png', 1280 / 2,
                                 720 / 2)
        self.logo.opacity = 0

        self.sfx_mimo_logo = utils.get_sound('assets/audio/SFX/MimoLogo.ogg')

        self.AddTween("easeInOutSine", 2, self.logo, "opacity", 0, 255, 1)
        self.AddTrigger(1, self.sfx_mimo_logo, 'play')

        #self.comm.opt.set_led_brightness(50)
        #mimo.set_led_brightness(250)
        #self.comm.opt.lock_buttons([3, 0, 4, 0])
        #mimo.set_optimization_leds_color([0, 255, 0, 0])
        #mimo.set_optimization_leds_color([1, 0, 255, 0])
        #mimo.set_optimization_leds_color([2, 0, 0, 255])
        #mimo.set_optimization_leds_color([3, 255, 0, 0])
        #mimo.set_optimization_leds_color([4, 255, 255, 255])
        #mimo.set_independent_lights(False, True)
        #mimo.set_independent_lights(True, True)
        #mimo.set_buttons_enable_status(True, True)
        #mimo.set_optimization_buttons_lock_status([0,0,1,0,2,0,3,0,4,0])
        #mimo.set_material_buttons_lock_status([0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0])
        #mimo.set_tunners_enable_status(False)
        #mimo.set_optimization_leds_color([2, 255,0,255])
        #mimo.set_optimization_leds_color([5, 255,0,255])
        #mimo.set_optimization_leds_color([19, 255,0,255])
        #mimo.set_optimization_leds_color([27, 255,0,0])
        #mimo.set_optimization_leds_color([28, 255,255])
        #mimo.set_optimization_leds_color([29, 255,0,255])
        #mimo.set_optimization_leds_color([30, 255,0,255])
        factor = 0.05
        loops = 100
        n_leds = 64 + 5
        #for index in range(0, n_leds*loops):
        #    self.AddTrigger((1+index)*factor, mimo, 'set_optimization_leds_color', [index%n_leds, int(random.random()*255), int(random.random()*255), int(random.random()*255)])
        #    self.AddTrigger((1+index+0.9)*factor, mimo, 'set_optimization_leds_color', [index%n_leds, 0, 0, 0])

        n_leds = 64
        leds = list(range(0, 64))
        #for index in range(0, n_leds*loops):
        #    led_i = leds[index%n_leds] + 5
        #    self.AddTrigger((1.5+index)*factor, mimo, 'set_optimization_leds_color', [led_i, int(random.random()*255), int(random.random()*255), int(random.random()*255)])
        #    self.AddTrigger((1.5+index+0.9)*factor, mimo, 'set_optimization_leds_color', [led_i, 0, 0, 0])
        #self.comm.opt.activate_buttons(True)
        mimo.set_buttons_enable_status(True, True)
        mimo.set_independent_lights(False, False)
        mimo.set_led_brightness(250)
        mimo.set_material_buttons_lock_status(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0])
        mimo.set_material_buttons_mode(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0])
        mimo.set_optimization_buttons_lock_status(
            [0, 0, 1, 0, 2, 0, 3, 0, 4, 0])
        mimo.set_optimization_buttons_mode([0, 0, 1, 0, 2, 0, 3, 0, 4, 0])
        #self.comm.opt.activate_tunners(False)
        #mimo.set_tunners_enable_status(False)
        #self.comm.opt.set_independent_lights(False)
        #self.comm.opt.clean_matrix()
        #graphics.clear()

        #self.AddTrigger(0, self.comm.mat, 'set_led_light', [1, 125, 125, 0, 1, 255, 255, 0])
        #self.AddTrigger(1, mimo, 'set_material_leds_color', [0, 125, 125, 0, 1, 255, 255, 0])
        #self.AddTrigger(2, self.comm.mat, 'set_led_light', [7, 0, 255, 0])
        #self.AddTrigger(2, mimo, 'set_material_leds_color', [7, 0, 255, 0])
        #self.AddTrigger(3, self.comm.opt, 'set_led_light', [0, 255, 0, 0])
        # debe prender el led del boton de  optimizacion 0
        #self.AddTrigger(3, mimo, 'set_optimization_leds_color', [10, 255, 0, 0])

        mimo.set_tunners_enable_status(True)
        #self.testSprite = AnimatedNeoSprite('assets/tilesprite.png')
        self.testSprite = AnimatedNeoSprite('assets/palomita.png')
        #self.testSprite.setFrameRate(8)
        #self.testSprite.playing = True
        self.label = TextNeoSprite("people")
        #
        self.label.y = 2
        #
        font = pygame.font.Font("assets/fonts/VCR_OSD_MONO_1.001.ttf", 36)
        self.title = utils.Text("Hello Machinaria!", font)
        self.title.opacity = 0
        self.title.SetPosition(400, 200)
        self.AddTween("easeInOutSine", 2, self.title, "opacity", 0, 255, 1)
예제 #10
0
 def SetupMimo(self):
     OptimizationScene.SetupMimo(self)
     mimo.set_buttons_enable_status(False, True)
     mimo.set_independent_lights(True, False)
     mimo.set_optimization_buttons_mode([0,1, 1,1, 2,1, 3,1, 4,1])
     mimo.set_optimization_buttons_active_status([0,0, 1,0, 2,0, 3,0, 4,0, 5,0])