Idefinite flashing

Hi,

I am very new to this so please bear with me.

We are looking to use the BlinkStick as an indicator light for a Lecture Capture system. The people working on it (using Linux Ubuntu?) can get the LED to light up no problem - so we will have it show as red when recording us on.

What we would like to do is to have the red light flash if the recording is paused. They say they can get it to flash once. Is there a way of setting it flashing indefinitely until it receives another command to go non-flashing again?

Many thanks

Mark

Hi Mark, welcome to the forums!

That should be possible to implement with some scripting. Do you have any info on what software is used to control BlinkStick? I should be able to come up with a basic example on how to accomplish this.

Hi Arvydas,

We are using an open source Lecture Capture system called Gallicaster. I believe the BlinkStick is being controlled by a Python API (?). As I say I am not entirely up on this side of things - I am more the hardware person rather than coding/programming etc!

Would you be able to provide a code sample used to control BlinkStick? Would be a nice starting point for me and I think I should be able to provide you with a working solution that integrates with Gallicaster straight away. If not, just let me know and I will try to come up with a generic solution.

Hi,

I hope this is what you are after:

def record{self}:
if self.pipeline.get_state()[1] == gst.STATE_PLAYING:
for bin_name, bin in self.bins.iteritems():
valve = bin.changeValve(False)
self.__start_record_time = self.__query_position()
galicaster.KBlink.blink.setcolour(‘red’)

def pause(self):
logger.debug(“recorder paused”)
self.pipeline.set_state(gst.STATE_PAUSED)
self.pipeline.get.state()
galicaster.KBlink.blink.setcolour(‘blue’)
return True

def resume(self):
logger.debug(“resume paused”)
self.pipeline.set_state(gst.STATE_PLAYING)
self.pipeline.get.state()
galicaster.KBlink.blink.setcolour(‘red’)
return none

At the moment when recording the light is red. When paused it changes to blue. I feel it would be much better and attract attention easier if when paused it flashed :smile:

Many thanks for your help on this.