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.

83 lines (82 loc) 1.99 kB
{ "type": "object", "title": "Component", "required": [ "components" ], "properties": { "autoDetect": { "title": "Auto Detect Port?", "type": "boolean", "default": true }, "port": { "type": "string", "description": "The serial port your board is on", "required": false, "default": "/dev/ttyACM0" }, "interval": { "type": "string", "enum": [ "500", "1000", "1500", "2000", "200" ], "description": "The Interval in milliseconds to send Sensor readings.", "required": false, "default": "500" }, "components": { "type": "array", "items": { "type": "object", "properties": { "name": { "title": "Name", "type": "string", "description": "Name this component anything you like. (i.e Left_Motor). Sensor output will show up under this name in payload", "required": true }, "action": { "title": "Action", "type": "string", "enum": [ "digitalWrite", "digitalRead", "analogWrite", "analogRead", "servo", "servo-continuous", "PCA9685-Servo", "oled-i2c", "LCD-PCF8574A", "LCD-JHD1313M1", "MPU6050", "esc" ], "required": true }, "pin": { "title": "Pin", "type": "string", "description": "Pin used for this component", "required": false }, "address": { "title": "address", "type": "string", "description": "i2c address used for this component", "required": false } }, "required": [ "name", "action" ] } } } }