-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathspec.json
1560 lines (1558 loc) · 77.4 KB
/
spec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"meta": {
"version": "1.2.0",
"specRevision": 0,
"supportedKernel": {
"pattern": "{upstream_version}-{kernel}-{flavour}",
"kernels": [
"11-ev3dev",
"11-rc1-ev3dev"
]
}
},
"classes": {
"motor": {
"friendlyName": "Motor",
"description": [
"The motor class provides a uniform interface for using motors with",
"positional and directional feedback such as the EV3 and NXT motors.",
"This feedback allows for precise control of the motors. This is the",
"most common type of motor, so we just call it `motor`.",
"",
"The way to configure a motor is to set the '_sp' attributes when",
"calling a command or before. Only in 'run_direct' mode attribute",
"changes are processed immediately, in the other modes they only",
"take place when a new command is issued."
],
"docsLink": "http://www.ev3dev.org/docs/drivers/tacho-motor-class/",
"systemClassName": "tacho-motor",
"systemDeviceNameConvention": "*",
"systemProperties": [
{ "name": "Address", "systemName": "address", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the port that this motor is connected to."
]
},
{ "name": "Command", "systemName": "command", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"Sends a command to the motor controller. See `commands` for a list of",
"possible values."
]
},
{ "name": "Commands", "systemName": "commands", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of commands that are supported by the motor",
"controller. Possible values are `run-forever`, `run-to-abs-pos`, `run-to-rel-pos`,",
"`run-timed`, `run-direct`, `stop` and `reset`. Not all commands may be supported.",
"",
"- `run-forever` will cause the motor to run until another command is sent.",
"- `run-to-abs-pos` will run to an absolute position specified by `position_sp`",
" and then stop using the action specified in `stop_action`.",
"- `run-to-rel-pos` will run to a position relative to the current `position` value.",
" The new position will be current `position` + `position_sp`. When the new",
" position is reached, the motor will stop using the action specified by `stop_action`.",
"- `run-timed` will run the motor for the amount of time specified in `time_sp`",
" and then stop the motor using the action specified by `stop_action`.",
"- `run-direct` will run the motor at the duty cycle specified by `duty_cycle_sp`.",
" Unlike other run commands, changing `duty_cycle_sp` while running *will*",
" take effect immediately.",
"- `stop` will stop any of the run commands before they are complete using the",
" action specified by `stop_action`.",
"- `reset` will reset all of the motor parameter attributes to their default value.",
" This will also have the effect of stopping the motor."
]
},
{ "name": "Count Per Rot", "systemName": "count_per_rot", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the number of tacho counts in one rotation of the motor. Tacho counts",
"are used by the position and speed attributes, so you can use this value",
"to convert rotations or degrees to tacho counts. (rotation motors only)"
]
},
{ "name": "Count Per M", "systemName": "count_per_m", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the number of tacho counts in one meter of travel of the motor. Tacho",
"counts are used by the position and speed attributes, so you can use this",
"value to convert from distance to tacho counts. (linear motors only)"
]
},
{ "name": "Driver Name", "systemName": "driver_name", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the driver that provides this tacho motor device."
]
},
{ "name": "Duty Cycle", "systemName": "duty_cycle", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the current duty cycle of the motor. Units are percent. Values",
"are -100 to 100."
]
},
{ "name": "Duty Cycle SP", "systemName": "duty_cycle_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing sets the duty cycle setpoint. Reading returns the current value.",
"Units are in percent. Valid values are -100 to 100. A negative value causes",
"the motor to rotate in reverse."
]
},
{ "name": "Full Travel Count", "systemName": "full_travel_count", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the number of tacho counts in the full travel of the motor. When",
"combined with the `count_per_m` atribute, you can use this value to",
"calculate the maximum travel distance of the motor. (linear motors only)"
]
},
{ "name": "Polarity", "systemName": "polarity", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Sets the polarity of the motor. With `normal` polarity, a positive duty",
"cycle will cause the motor to rotate clockwise. With `inversed` polarity,",
"a positive duty cycle will cause the motor to rotate counter-clockwise.",
"Valid values are `normal` and `inversed`."
]
},
{ "name": "Position", "systemName": "position", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Returns the current position of the motor in pulses of the rotary",
"encoder. When the motor rotates clockwise, the position will increase.",
"Likewise, rotating counter-clockwise causes the position to decrease.",
"Writing will set the position to that value."
]
},
{ "name": "Position P", "systemName": "hold_pid/Kp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The proportional constant for the position PID."
]
},
{ "name": "Position I", "systemName": "hold_pid/Ki", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The integral constant for the position PID."
]
},
{ "name": "Position D", "systemName": "hold_pid/Kd", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The derivative constant for the position PID."
]
},
{ "name": "Position SP", "systemName": "position_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing specifies the target position for the `run-to-abs-pos` and `run-to-rel-pos`",
"commands. Reading returns the current value. Units are in tacho counts. You",
"can use the value returned by `counts_per_rot` to convert tacho counts to/from",
"rotations or degrees."
]
},
{ "name": "Max Speed", "systemName": "max_speed", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the maximum value that is accepted by the `speed_sp` attribute. This",
"may be slightly different than the maximum speed that a particular motor can",
"reach - it's the maximum theoretical speed."
]
},
{ "name": "Speed", "systemName": "speed", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the current motor speed in tacho counts per second. Note, this is",
"not necessarily degrees (although it is for LEGO motors). Use the `count_per_rot`",
"attribute to convert this value to RPM or deg/sec."
]
},
{ "name": "Speed SP", "systemName": "speed_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing sets the target speed in tacho counts per second used for all `run-*`",
"commands except `run-direct`. Reading returns the current value. A negative",
"value causes the motor to rotate in reverse with the exception of `run-to-*-pos`",
"commands where the sign is ignored. Use the `count_per_rot` attribute to convert",
"RPM or deg/sec to tacho counts per second. Use the `count_per_m` attribute to",
"convert m/s to tacho counts per second."
]
},
{ "name": "Ramp Up SP", "systemName": "ramp_up_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing sets the ramp up setpoint. Reading returns the current value. Units",
"are in milliseconds and must be positive. When set to a non-zero value, the",
"motor speed will increase from 0 to 100% of `max_speed` over the span of this",
"setpoint. The actual ramp time is the ratio of the difference between the",
"`speed_sp` and the current `speed` and max_speed multiplied by `ramp_up_sp`."
]
},
{ "name": "Ramp Down SP", "systemName": "ramp_down_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing sets the ramp down setpoint. Reading returns the current value. Units",
"are in milliseconds and must be positive. When set to a non-zero value, the",
"motor speed will decrease from 0 to 100% of `max_speed` over the span of this",
"setpoint. The actual ramp time is the ratio of the difference between the",
"`speed_sp` and the current `speed` and max_speed multiplied by `ramp_down_sp`."
]
},
{ "name": "Speed P", "systemName": "speed_pid/Kp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The proportional constant for the speed regulation PID."
]
},
{ "name": "Speed I", "systemName": "speed_pid/Ki", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The integral constant for the speed regulation PID."
]
},
{ "name": "Speed D", "systemName": "speed_pid/Kd", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The derivative constant for the speed regulation PID."
]
},
{ "name": "State", "systemName": "state", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Reading returns a list of state flags. Possible flags are",
"`running`, `ramping`, `holding`, `overloaded` and `stalled`."
]
},
{ "name": "Stop Action", "systemName": "stop_action", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Reading returns the current stop action. Writing sets the stop action.",
"The value determines the motors behavior when `command` is set to `stop`.",
"Also, it determines the motors behavior when a run command completes. See",
"`stop_actions` for a list of possible values."
]
},
{ "name": "Stop Actions", "systemName": "stop_actions", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of stop actions supported by the motor controller.",
"Possible values are `coast`, `brake` and `hold`. `coast` means that power will",
"be removed from the motor and it will freely coast to a stop. `brake` means",
"that power will be removed from the motor and a passive electrical load will",
"be placed on the motor. This is usually done by shorting the motor terminals",
"together. This load will absorb the energy from the rotation of the motors and",
"cause the motor to stop more quickly than coasting. `hold` does not remove",
"power from the motor. Instead it actively tries to hold the motor at the current",
"position. If an external force tries to turn the motor, the motor will 'push",
"back' to maintain its position."
]
},
{ "name": "Time SP", "systemName": "time_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing specifies the amount of time the motor will run when using the",
"`run-timed` command. Reading returns the current value. Units are in",
"milliseconds."
]
}
],
"propertyValues": [
{
"propertyName": "Command",
"values": [
{ "name": "run-forever",
"description": [
"Run the motor until another command is sent."
]
},
{ "name": "run-to-abs-pos",
"description": [
"Run to an absolute position specified by `position_sp` and then",
"stop using the action specified in `stop_action`."
]
},
{ "name": "run-to-rel-pos",
"description": [
"Run to a position relative to the current `position` value.",
"The new position will be current `position` + `position_sp`.",
"When the new position is reached, the motor will stop using",
"the action specified by `stop_action`."
]
},
{ "name": "run-timed",
"description": [
"Run the motor for the amount of time specified in `time_sp`",
"and then stop the motor using the action specified by `stop_action`."
]
},
{ "name": "run-direct",
"description": [
"Run the motor at the duty cycle specified by `duty_cycle_sp`.",
"Unlike other run commands, changing `duty_cycle_sp` while running *will*",
"take effect immediately."
]
},
{ "name": "stop",
"description": [
"Stop any of the run commands before they are complete using the",
"action specified by `stop_action`."
]
},
{ "name": "reset",
"description": [
"Reset all of the motor parameter attributes to their default value.",
"This will also have the effect of stopping the motor."
]
}
]
},
{
"propertyName": "Encoder Polarity",
"values": [
{ "name": "normal",
"description": [
"Sets the normal polarity of the rotary encoder."
]
},
{ "name": "inversed",
"description": [
"Sets the inversed polarity of the rotary encoder."
]
}
]
},
{
"propertyName": "Polarity",
"values": [
{ "name": "normal",
"description": [
"With `normal` polarity, a positive duty cycle will",
"cause the motor to rotate clockwise."
]
},
{ "name": "inversed",
"description": [
"With `inversed` polarity, a positive duty cycle will",
"cause the motor to rotate counter-clockwise."
]
}
]
},
{
"propertyName": "State",
"values": [
{ "name": "running",
"description": [
"Power is being sent to the motor."
]
},
{ "name": "ramping",
"description": [
"The motor is ramping up or down and has not yet reached a constant output level."
]
},
{ "name": "holding",
"description": [
"The motor is not turning, but rather attempting to hold a fixed position."
]
},
{ "name": "overloaded",
"description": [
"The motor is turning, but cannot reach its `speed_sp`."
]
},
{ "name": "stalled",
"description": [
"The motor is not turning when it should be."
]
}
]
},
{
"propertyName": "Stop Action",
"values": [
{ "name": "coast",
"description": [
"Power will be removed from the motor and it will freely coast to a stop."
]
},
{ "name": "brake",
"description": [
"Power will be removed from the motor and a passive electrical load will",
"be placed on the motor. This is usually done by shorting the motor terminals",
"together. This load will absorb the energy from the rotation of the motors and",
"cause the motor to stop more quickly than coasting."
]
},
{ "name": "hold",
"description": [
"Does not remove power from the motor. Instead it actively try to hold the motor",
"at the current position. If an external force tries to turn the motor, the motor",
"will `push back` to maintain its position."
]
}
]
}
]
},
"largeMotor": {
"friendlyName": "Large Motor",
"systemDeviceNameConvention": "*",
"description": [
"EV3/NXT large servo motor"
],
"driverName": [
"lego-ev3-l-motor",
"lego-nxt-motor"
],
"inheritance": "motor"
},
"mediumMotor": {
"friendlyName": "Medium Motor",
"systemDeviceNameConvention": "*",
"description": [
"EV3 medium servo motor"
],
"driverName": [
"lego-ev3-m-motor"
],
"inheritance": "motor"
},
"actuonix50Motor": {
"friendlyName": "Actuonix L12 50 Motor",
"systemDeviceNameConvention": "linear{0}",
"description": [
"Actuonix L12 50 linear servo motor"
],
"driverName": [
"act-l12-ev3-50"
],
"inheritance": "motor"
},
"actuonix100Motor": {
"friendlyName": "Actuonix L12 100 Motor",
"systemDeviceNameConvention": "linear{0}",
"description": [
"Actuonix L12 100 linear servo motor"
],
"driverName": [
"act-l12-ev3-100"
],
"inheritance": "motor"
},
"dcMotor": {
"friendlyName": "DC Motor",
"description": [
"The DC motor class provides a uniform interface for using regular DC motors",
"with no fancy controls or feedback. This includes LEGO MINDSTORMS RCX motors",
"and LEGO Power Functions motors."
],
"docsLink": "http://www.ev3dev.org/docs/drivers/dc-motor-class/",
"systemClassName": "dc-motor",
"systemDeviceNameConvention": "motor{0}",
"systemProperties": [
{ "name": "Address", "systemName": "address", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the port that this motor is connected to."
]
},
{ "name": "Command", "systemName": "command", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"Sets the command for the motor. Possible values are `run-forever`, `run-timed` and",
"`stop`. Not all commands may be supported, so be sure to check the contents",
"of the `commands` attribute."
]
},
{ "name": "Commands", "systemName": "commands", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of commands supported by the motor",
"controller."
]
},
{ "name": "Driver Name", "systemName": "driver_name", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the motor driver that loaded this device. See the list",
"of [supported devices] for a list of drivers."
]
},
{ "name": "Duty Cycle", "systemName": "duty_cycle", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Shows the current duty cycle of the PWM signal sent to the motor. Values",
"are -100 to 100 (-100% to 100%)."
]
},
{ "name": "Duty Cycle SP", "systemName": "duty_cycle_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing sets the duty cycle setpoint of the PWM signal sent to the motor.",
"Valid values are -100 to 100 (-100% to 100%). Reading returns the current",
"setpoint."
]
},
{ "name": "Polarity", "systemName": "polarity", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Sets the polarity of the motor. Valid values are `normal` and `inversed`."
]
},
{ "name": "Ramp Down SP", "systemName": "ramp_down_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Sets the time in milliseconds that it take the motor to ramp down from 100%",
"to 0%. Valid values are 0 to 10000 (10 seconds). Default is 0."
]
},
{ "name": "Ramp Up SP", "systemName": "ramp_up_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Sets the time in milliseconds that it take the motor to up ramp from 0% to",
"100%. Valid values are 0 to 10000 (10 seconds). Default is 0."
]
},
{ "name": "State", "systemName": "state", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Gets a list of flags indicating the motor status. Possible",
"flags are `running` and `ramping`. `running` indicates that the motor is",
"powered. `ramping` indicates that the motor has not yet reached the",
"`duty_cycle_sp`."
]
},
{ "name": "Stop Action", "systemName": "stop_action", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"Sets the stop action that will be used when the motor stops. Read",
"`stop_actions` to get the list of valid values."
]
},
{ "name": "Stop Actions", "systemName": "stop_actions", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Gets a list of stop actions. Valid values are `coast`",
"and `brake`."
]
},
{ "name": "Time SP", "systemName": "time_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Writing specifies the amount of time the motor will run when using the",
"`run-timed` command. Reading returns the current value. Units are in",
"milliseconds."
]
}
],
"propertyValues": [
{
"propertyName": "Command",
"values": [
{ "name": "run-forever",
"description": [
"Run the motor until another command is sent."
]
},
{ "name": "run-timed",
"description": [
"Run the motor for the amount of time specified in `time_sp`",
"and then stop the motor using the action specified by `stop_action`."
]
},
{ "name": "run-direct",
"description": [
"Run the motor at the duty cycle specified by `duty_cycle_sp`.",
"Unlike other run commands, changing `duty_cycle_sp` while running *will*",
"take effect immediately."
]
},
{ "name": "stop",
"description": [
"Stop any of the run commands before they are complete using the",
"action specified by `stop_action`."
]
}
]
},
{
"propertyName": "Polarity",
"values": [
{ "name": "normal",
"description": [
"With `normal` polarity, a positive duty cycle will",
"cause the motor to rotate clockwise."
]
},
{ "name": "inversed",
"description": [
"With `inversed` polarity, a positive duty cycle will",
"cause the motor to rotate counter-clockwise."
]
}
]
},
{
"propertyName": "Stop Action",
"values": [
{ "name": "coast",
"description": [
"Power will be removed from the motor and it will freely coast to a stop."
]
},
{ "name": "brake",
"description": [
"Power will be removed from the motor and a passive electrical load will",
"be placed on the motor. This is usually done by shorting the motor terminals",
"together. This load will absorb the energy from the rotation of the motors and",
"cause the motor to stop more quickly than coasting."
]
}
]
}
]
},
"servoMotor": {
"friendlyName": "Servo Motor",
"description": [
"The servo motor class provides a uniform interface for using hobby type",
"servo motors."
],
"docsLink": "http://www.ev3dev.org/docs/drivers/servo-motor-class/",
"systemClassName": "servo-motor",
"systemDeviceNameConvention": "motor{0}",
"systemProperties": [
{ "name": "Address", "systemName": "address", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the port that this motor is connected to."
]
},
{ "name": "Command", "systemName": "command", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"Sets the command for the servo. Valid values are `run` and `float`. Setting",
"to `run` will cause the servo to be driven to the position_sp set in the",
"`position_sp` attribute. Setting to `float` will remove power from the motor."
]
},
{ "name": "Driver Name", "systemName": "driver_name", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the motor driver that loaded this device. See the list",
"of [supported devices] for a list of drivers."
]
},
{ "name": "Max Pulse SP", "systemName": "max_pulse_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Used to set the pulse size in milliseconds for the signal that tells the",
"servo to drive to the maximum (clockwise) position_sp. Default value is 2400.",
"Valid values are 2300 to 2700. You must write to the position_sp attribute for",
"changes to this attribute to take effect."
]
},
{ "name": "Mid Pulse SP", "systemName": "mid_pulse_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Used to set the pulse size in milliseconds for the signal that tells the",
"servo to drive to the mid position_sp. Default value is 1500. Valid",
"values are 1300 to 1700. For example, on a 180 degree servo, this would be",
"90 degrees. On continuous rotation servo, this is the 'neutral' position_sp",
"where the motor does not turn. You must write to the position_sp attribute for",
"changes to this attribute to take effect."
]
},
{ "name": "Min Pulse SP", "systemName": "min_pulse_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Used to set the pulse size in milliseconds for the signal that tells the",
"servo to drive to the miniumum (counter-clockwise) position_sp. Default value",
"is 600. Valid values are 300 to 700. You must write to the position_sp",
"attribute for changes to this attribute to take effect."
]
},
{ "name": "Polarity", "systemName": "polarity", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Sets the polarity of the servo. Valid values are `normal` and `inversed`.",
"Setting the value to `inversed` will cause the position_sp value to be",
"inversed. i.e `-100` will correspond to `max_pulse_sp`, and `100` will",
"correspond to `min_pulse_sp`."
]
},
{ "name": "Position SP", "systemName": "position_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Reading returns the current position_sp of the servo. Writing instructs the",
"servo to move to the specified position_sp. Units are percent. Valid values",
"are -100 to 100 (-100% to 100%) where `-100` corresponds to `min_pulse_sp`,",
"`0` corresponds to `mid_pulse_sp` and `100` corresponds to `max_pulse_sp`."
]
},
{ "name": "Rate SP", "systemName": "rate_sp", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Sets the rate_sp at which the servo travels from 0 to 100.0% (half of the full",
"range of the servo). Units are in milliseconds. Example: Setting the rate_sp",
"to 1000 means that it will take a 180 degree servo 2 second to move from 0",
"to 180 degrees. Note: Some servo controllers may not support this in which",
"case reading and writing will fail with `-EOPNOTSUPP`. In continuous rotation",
"servos, this value will affect the rate_sp at which the speed ramps up or down."
]
},
{ "name": "State", "systemName": "state", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of flags indicating the state of the servo.",
"Possible values are:",
"* `running`: Indicates that the motor is powered."
]
}
],
"propertyValues": [
{
"propertyName": "Command",
"values": [
{ "name": "run",
"description": [
"Drive servo to the position set in the `position_sp` attribute."
]
},
{ "name": "float",
"description": [
"Remove power from the motor."
]
}
]
},
{
"propertyName": "Polarity",
"values": [
{ "name": "normal",
"description": [
"With `normal` polarity, a positive duty cycle will",
"cause the motor to rotate clockwise."
]
},
{ "name": "inversed",
"description": [
"With `inversed` polarity, a positive duty cycle will",
"cause the motor to rotate counter-clockwise."
]
}
]
}
]
},
"led": {
"friendlyName": "LED",
"description": [
"Any device controlled by the generic LED driver.",
"See https://www.kernel.org/doc/Documentation/leds/leds-class.txt",
"for more details."
],
"systemClassName": "leds",
"systemProperties": [
{ "name": "Max Brightness", "systemName": "max_brightness", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the maximum allowable brightness value."
]
},
{ "name": "Brightness", "systemName": "brightness", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Sets the brightness level. Possible values are from 0 to `max_brightness`."
]
},
{ "name": "Triggers", "systemName": "trigger", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of available triggers."
]
},
{ "name": "Trigger", "systemName": "trigger", "type": "string selector", "readAccess": true, "writeAccess": true,
"description": [
"Sets the led trigger. A trigger",
"is a kernel based source of led events. Triggers can either be simple or",
"complex. A simple trigger isn't configurable and is designed to slot into",
"existing subsystems with minimal additional code. Examples are the `ide-disk` and",
"`nand-disk` triggers.",
"",
"Complex triggers whilst available to all LEDs have LED specific",
"parameters and work on a per LED basis. The `timer` trigger is an example.",
"The `timer` trigger will periodically change the LED brightness between",
"0 and the current brightness setting. The `on` and `off` time can",
"be specified via `delay_{on,off}` attributes in milliseconds.",
"You can change the brightness value of a LED independently of the timer",
"trigger. However, if you set the brightness value to 0 it will",
"also disable the `timer` trigger."
]
},
{ "name": "Delay On", "systemName": "delay_on", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The `timer` trigger will periodically change the LED brightness between",
"0 and the current brightness setting. The `on` time can",
"be specified via `delay_on` attribute in milliseconds."
]
},
{ "name": "Delay Off", "systemName": "delay_off", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"The `timer` trigger will periodically change the LED brightness between",
"0 and the current brightness setting. The `off` time can",
"be specified via `delay_off` attribute in milliseconds."
]
}
]
},
"button": {
"friendlyName": "Button",
"description": [
"Provides a generic button reading mechanism that can be adapted",
"to platform specific implementations. Each platform's specific",
"button capabilites are enumerated in the 'platforms' section",
"of this specification."
]
},
"sensor": {
"friendlyName": "Sensor",
"description": [
"The sensor class provides a uniform interface for using most of the",
"sensors available for the EV3. The various underlying device drivers will",
"create a `lego-sensor` device for interacting with the sensors.",
"",
"Sensors are primarily controlled by setting the `mode` and monitored by",
"reading the `value<N>` attributes. Values can be converted to floating point",
"if needed by `value<N>` / 10.0 ^ `decimals`.",
"",
"Since the name of the `sensor<N>` device node does not correspond to the port",
"that a sensor is plugged in to, you must look at the `address` attribute if",
"you need to know which port a sensor is plugged in to. However, if you don't",
"have more than one sensor of each type, you can just look for a matching",
"`driver_name`. Then it will not matter which port a sensor is plugged in to - your",
"program will still work."
],
"docsLink": "http://www.ev3dev.org/docs/drivers/lego-sensor-class/",
"systemClassName": "lego-sensor",
"systemDeviceNameConvention": "sensor{0}",
"systemProperties": [
{ "name": "Address", "systemName": "address", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the port that the sensor is connected to, e.g. `ev3:in1`.",
"I2C sensors also include the I2C address (decimal), e.g. `ev3:in1:i2c8`."
]
},
{ "name": "Command", "systemName": "command", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"Sends a command to the sensor."
]
},
{ "name": "Commands", "systemName": "commands", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of the valid commands for the sensor.",
"Returns -EOPNOTSUPP if no commands are supported."
]
},
{ "name": "Decimals", "systemName": "decimals", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the number of decimal places for the values in the `value<N>`",
"attributes of the current mode."
]
},
{ "name": "Driver Name", "systemName": "driver_name", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the sensor device/driver. See the list of [supported",
"sensors] for a complete list of drivers."
]
},
{ "name": "Mode", "systemName": "mode", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Returns the current mode. Writing one of the values returned by `modes`",
"sets the sensor to that mode."
]
},
{ "name": "Modes", "systemName": "modes", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of the valid modes for the sensor."
]
},
{ "name": "Num Values", "systemName": "num_values", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"Returns the number of `value<N>` attributes that will return a valid value",
"for the current mode."
]
},
{ "name": "Units", "systemName": "units", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the units of the measured value for the current mode. May return",
"empty string"
]
}
]
},
"i2cSensor": {
"friendlyName": "I2C Sensor",
"description": [
"A generic interface to control I2C-type EV3 sensors."
],
"systemClassName": "lego-sensor",
"systemDeviceNameConvention": "sensor{0}",
"driverName": [
"nxt-i2c-sensor"
],
"inheritance": "sensor",
"systemProperties": [
{ "name": "FW Version", "systemName": "fw_version", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the firmware version of the sensor if available. Currently only",
"I2C/NXT sensors support this."
]
},
{ "name": "Poll MS", "systemName": "poll_ms", "type": "int", "readAccess": true, "writeAccess": true,
"description": [
"Returns the polling period of the sensor in milliseconds. Writing sets the",
"polling period. Setting to 0 disables polling. Minimum value is hard",
"coded as 50 msec. Returns -EOPNOTSUPP if changing polling is not supported.",
"Currently only I2C/NXT sensors support changing the polling period."
]
}
]
},
"powerSupply": {
"friendlyName": "Power Supply",
"description": [
"A generic interface to read data from the system's power_supply class.",
"Uses the built-in legoev3-battery if none is specified."
],
"systemClassName": "power_supply",
"systemProperties": [
{ "name": "Measured Current", "systemName": "current_now", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"The measured current that the battery is supplying (in microamps)"
]
},
{ "name": "Measured Voltage", "systemName": "voltage_now", "type": "int", "readAccess": true, "writeAccess": false,
"description": [
"The measured voltage that the battery is supplying (in microvolts)"
]
},
{ "name": "Max Voltage", "systemName": "voltage_max_design", "type": "int", "readAccess": true, "writeAccess": false },
{ "name": "Min Voltage", "systemName": "voltage_min_design", "type": "int", "readAccess": true, "writeAccess": false },
{ "name": "Technology", "systemName": "technology", "type": "string", "readAccess": true, "writeAccess": false },
{ "name": "Type", "systemName": "type", "type": "string", "readAccess": true, "writeAccess": false }
]
},
"legoPort": {
"friendlyName": "Lego Port",
"description": [
"The `lego-port` class provides an interface for working with input and",
"output ports that are compatible with LEGO MINDSTORMS RCX/NXT/EV3, LEGO",
"WeDo and LEGO Power Functions sensors and motors. Supported devices include",
"the LEGO MINDSTORMS EV3 Intelligent Brick, the LEGO WeDo USB hub and",
"various sensor multiplexers from 3rd party manufacturers.",
"",
"Some types of ports may have multiple modes of operation. For example, the",
"input ports on the EV3 brick can communicate with sensors using UART, I2C",
"or analog validate signals - but not all at the same time. Therefore there",
"are multiple modes available to connect to the different types of sensors.",
"",
"In most cases, ports are able to automatically detect what type of sensor",
"or motor is connected. In some cases though, this must be manually specified",
"using the `mode` and `set_device` attributes. The `mode` attribute affects",
"how the port communicates with the connected device. For example the input",
"ports on the EV3 brick can communicate using UART, I2C or analog voltages,",
"but not all at the same time, so the mode must be set to the one that is",
"appropriate for the connected sensor. The `set_device` attribute is used to",
"specify the exact type of sensor that is connected. Note: the mode must be",
"correctly set before setting the sensor type.",
"",
"Ports can be found at `/sys/class/lego-port/port<N>` where `<N>` is",
"incremented each time a new port is registered. Note: The number is not",
"related to the actual port at all - use the `address` attribute to find",
"a specific port."
],
"systemClassName": "lego-port",
"systemProperties": [
{ "name": "Address", "systemName": "address", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the port. See individual driver documentation for",
"the name that will be returned."
]
},
{ "name": "Driver Name", "systemName": "driver_name", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"Returns the name of the driver that loaded this device. You can find the",
"complete list of drivers in the [list of port drivers]."
]
},
{ "name": "Modes", "systemName": "modes", "type": "string array", "readAccess": true, "writeAccess": false,
"description": [
"Returns a list of the available modes of the port."
]
},
{ "name": "Mode", "systemName": "mode", "type": "string", "readAccess": true, "writeAccess": true,
"description": [
"Reading returns the currently selected mode. Writing sets the mode.",
"Generally speaking when the mode changes any sensor or motor devices",
"associated with the port will be removed new ones loaded, however this",
"this will depend on the individual driver implementing this class."
]
},
{ "name": "Set Device", "systemName": "set_device", "type": "string", "readAccess": false, "writeAccess": true,
"description": [
"For modes that support it, writing the name of a driver will cause a new",
"device to be registered for that driver and attached to this port. For",
"example, since NXT/Analog sensors cannot be auto-detected, you must use",
"this attribute to load the correct driver. Returns -EOPNOTSUPP if setting a",
"device is not supported."
]
},
{ "name": "Status", "systemName": "status", "type": "string", "readAccess": true, "writeAccess": false,
"description": [
"In most cases, reading status will return the same value as `mode`. In",
"cases where there is an `auto` mode additional values may be returned,",
"such as `no-device` or `error`. See individual port driver documentation",
"for the full list of possible values."
]
}
]
}
},
"specialSensorTypes": {
"touchSensor": {
"friendlyName": "Touch Sensor",
"description": [
"Touch Sensor"
],
"driverName": [
"lego-ev3-touch",
"lego-nxt-touch"
],
"inheritance": "sensor",
"propertyValues": [
{
"propertyName": "Mode",
"values": [
{
"name": "TOUCH",
"description": [
"Button state"
]
}
]
}
],
"sensorValueMappings": [
{
"name": "Is Pressed",