UNPKG

kryten

Version:

A wrapper for johnny-five that lets you define/re-configure a board using JSON and then generates schemaform.io schema for controlling it.

146 lines (145 loc) 2.73 kB
{ "digitalWrite": { "title": "Digital Write", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "state": { "type": "string", "enum": [ "1", "0" ] } } }, "analogWrite": { "title": "Analog Write", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "value": { "type": "number" } } }, "servo": { "title": "Servo", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "servo_action": { "title": "Function", "type": "string", "enum": [ "to", "sweep", "stop" ] }, "sweep": { "title": "Sweep", "type": "object", "properties": { "min": { "type": "number" }, "max": { "type": "number" } }, "x-schema-form":{ "condition": "model.servo_action == 'sweep'" } }, "to_value": { "title": "To", "description": "An angle value 0 - 180", "type": "number", "x-schema-form":{ "condition": "model.servo_action == 'to'" } } } }, "servo-continuous": { "title": "Continuous Servo", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "direction": { "title": "Direction", "type": "string", "enum": [ "CW", "CCW", "STOP" ] } } }, "LCD-PCF8574A": { "title": "LCD-PCF8574A", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "text": { "type": "string" } } }, "LCD-JHD1313M1": { "title": "LCD-JHD1313M1", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "text": { "type": "string" } } }, "oled-i2c": { "title": "OLED", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "text": { "type": "string" } } }, "esc": { "title": "ESC", "type": "object", "properties": { "component": { "title": "Component Name", "type": "string" }, "speed": { "type": "number" } } } }