|
Post by offbeatmammal on Jul 5, 2018 7:25:06 GMT
so, I've been playing around with a Blynklight and NodeJS and, by treating it as a HID, I can send colors to it and control flashing:
commandBuffer[0] = 0x00; commandBuffer[1] = red; commandBuffer[2] = blue; commandBuffer[3] = green; commandBuffer[4] = blink ? 100:0; // 0 is stable, 70 is fast blink, 100 is medium blink commandBuffer[5] = 0x00; commandBuffer[6] = 0x40; commandBuffer[7] = 0x02; commandBuffer[8] = 0xFF; // End of control sequence: controlCode & 0xFF
but... I can't work out how to control either the brightness or play the ringtones (and control volume)
Does anyone have a more detailed breakdown of the control sequence?
|
|
|
Post by senthil on Aug 3, 2018 10:51:08 GMT
Hi,
I know how to do this.
commandBuffer[0] = 0x00; commandBuffer[1] = red; commandBuffer[2] = blue; commandBuffer[3] = green; commandBuffer[4] = lightControl commandBuffer[5] = musicControl1 commandBuffer[6] = musicControl2 commandBuffer[7] = 0xFF; commandBuffer[8] = 0xFF;
ligthtControl byte => Bit7-Bit0
Bit0: 0 - Light On, 1 - Light Off
Bit1: 0 - No Dim (Full Brightness), 1 - Dim by 50%
Bit2: 0 - No Flash, 1- Start Flash (Blink)
Bit5-Bit3 - Flash speed - 001 - slow, 010 - medium, 100- fast
musicControl1 byte => Bit7-Bit0
Bit3-Bit0: Choose music, corresponding from the music 1 to music 10 respectively,total 10 music
Bit4: 0 - Stop Playing Music, 1 - Start Music Play
Bit5: 0 - Stop Music Repeat, 1 - Start Music Repeat
Bit6-Bit7: 00
musicControl2 byte => Bit7-Bit0
Bit3-Bit0: 1-10 corresponding from 10% volume to 100% volume respectively, total 10 level volumes
Bit6-Bit4: 000
Bit7: 0 - Clear Mute, 1 - Mute Volume
Hope its clear now.
|
|
|
Post by offbeatmammal on Aug 22, 2018 9:01:15 GMT
perfect, thanks (sorry for the slow response)
|
|