LEDControlProtocol

From Yume Cloud
Revision as of 19:58, 9 December 2017 by Seko (Talk | contribs) (Created page with "== RGB LED control == * duration time = 0.1-25.5 (sec) 0.1sec step * LED Level = 0-255 == Profile == {| class="wikitable" |+ Profile ! style="width:250px" | Profile !! st...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

RGB LED control

  • duration time = 0.1-25.5 (sec) 0.1sec step
  • LED Level = 0-255

Profile

Profile
Profile RGB LED profile
Service UUID 0xFF70
RGB LED Configuration Data UUID 0xFF71
RGB LED Configuration Data Length 3
RGB LED Data UUID 0xFF72
RGB LED Data Length 7
RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Data 00-FF 00-FF 00-255
Range 0x00:Clear/Stop
0x01:Start
0x11:Start (dim)
00-FF 0:forever
1-255
START RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Start Red LED Start Green LED Start Blue LED
Data 1111 1111 00-FF 00-FF 0-254sec
(reserve 0xFF)
00-FF 00-FF 00-FF

Simple LED ON

SinglemodeLedCont1.png

RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x03:Simgle mode start FF --
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 FF 1 3 FF 00 00

LED ON/OFF

SimpleLedOnOff11.png

RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x00:Clear/Stop 00 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 1 3 FF 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 2 3 00 00 00
RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x02:Start 00 10

JSON

{
 "actuator" : "rgbled",
 "id" : "BC:6A:29:BA:55:CD",
 "event_type" : "action",
 "value" : {
   "command" : "frame_animation",
   "patternid" : "1",
   "repeat" : "5",
   "pattern" : [
     {
       "activebit" : "00000111",
       "duration_time" : "3",
       "red"   : "255",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "1"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "3",
       "red"   : "0",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "2"
     }
   ]
 }
}

Frame animation method

FrameAnimationTime1.png

RGB LED Frame animation profile

RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x00:Clear 00 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 1 t1 00 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 2 t2 10 10 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 3 t3 40 40 40
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 00 4 t4 50 50 50
RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x02:Start 00 10

JSON

{
 "actuator" : "rgbled",
 "id" : "BC:6A:29:BA:55:CD",
 "event_type" : "action",
 "value" : {
   "command" : "frame_animation",
   "patternid" : "1",
   "repeat" : "5",
   "pattern" : [
     {
       "activebit" : "00000111",
       "duration_time" : "30",
       "red"   : "0",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "1"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "20",
       "red"   : "10",
       "green" : "10",
       "blue"  : "10",
       "frame_number" : "2"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "35",
       "red"   : "40",
       "green" : "40",
       "blue"  : "40",
       "frame_number" : "3"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "10",
       "red"   : "50",
       "green" : "50",
       "blue"  : "50",
       "frame_number" : "4"
     }
   ]
 }
}

Key frame animation method

Keyframeani.jpg

Key frame animation Profile

RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x10:Clear (dim) 01 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 01 1 t1 00 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 01 2 t2 10 10 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 01 3 t3 30 30 30
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 01 4 t4 50 50 50
RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x12:Start (dim) 00 10

JSON

{
 "actuator" : "rgbled",
 "id" : "BC:6A:29:BA:55:CD",
 "event_type" : "action",
 "value" : {
   "command" : "key_frame_animation",
   "patternid" : "1",
   "repeat" : "5",
   "pattern" : [
     {
       "activebit" : "00000111",
       "duration_time" : "30",
       "red"   : "0",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "1"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "20",
       "red"   : "10",
       "green" : "10",
       "blue"  : "10",
       "frame_number" : "2"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "35",
       "red"   : "40",
       "green" : "40",
       "blue"  : "40",
       "frame_number" : "3"
     },
     {
       "activebit" : "00000111",
       "duration_time" : "10",
       "red"   : "50",
       "green" : "50",
       "blue"  : "50",
       "frame_number" : "4"
     }
   ]
 }
}

Key frame animation method 2

Keyframeanimeframme02.png

Key frame animation Profile 2

RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x10:Clear (dim) 01 10
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 111 01 1 t1 00 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 100 01 2 t2 FF 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 010 01 2 t2 00 FF 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 100 01 3 t3 FF 00 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 010 01 3 t3 00 FF 00
RGB LED Data (0xFF72)
Byte s[0] s[1] s[2] s[3] s[4] s[5] s[6]
Name LED active bit pattern ID frame number duration time Red LED Green LED Blue LED
Data 001 01 3 t3 00 00 FF
RGB LED Configuration Data (0xFF71)
Byte s[0] s[1] s[2]
Name command pattern ID repeat
Range 0x12:Start (dim) 00 10

JSON

{
 "actuator" : "rgbled",
 "id" : "BC:6A:29:BA:55:CD",
 "event_type" : "action",
 "value" : {
   "command" : "key_frame_animation",
   "patternid" : "1",
   "repeat" : "5",
   "pattern" : [
     {
       "activebit" : "00000111",
       "duration_time" : "30",
       "red"   : "0",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "1"
     },
     {
       "activebit" : "00000100",
       "duration_time" : "20",
       "red"   : "10",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "2"
     },
     {
       "activebit" : "00000010",
       "duration_time" : "20",
       "red"   : "0",
       "green" : "10",
       "blue"  : "0",
       "frame_number" : "2"
     },
     {
       "activebit" : "00000100",
       "duration_time" : "35",
       "red"   : "40",
       "green" : "0",
       "blue"  : "0",
       "frame_number" : "3"
     },
     {
       "activebit" : "00000010",
       "duration_time" : "35",
       "red"   : "0",
       "green" : "30",
       "blue"  : "0",
       "frame_number" : "3"
     },
     {
       "activebit" : "00000001",
       "duration_time" : "35",
       "red"   : "0",
       "green" : "0",
       "blue"  : "20",
       "frame_number" : "3"
     },
   :
   :
     {
       "activebit" : "00000111",
       "duration_time" : "10",
       "red"   : "50",
       "green" : "50",
       "blue"  : "50",
       "frame_number" : "5"
     }
   ]
 }
}