Kameie

From wiki.ferrari.mo.it
Jump to navigation Jump to search

Schema

Kameie.png

Protocol

Authentication

{ "pin": "00000000" }
{ "success": [true|false] }

Pin is the password (hardcoded in the software).

Manual commands

{ "command": "[preview|save|rugosity|colorChange|bubbles]", "msgId": I, "camera": J, ["prefix": "KKK"], ["left": L], ["right": M], ["junction": [true|false]] }
{ "success": [true|false], "communicationId": I, "camera": J, ["errorCode": N], ["avgIntensity": O], ["maxIntensity": P], ["extension": Q], ["redDiff": R], ["greenDiff": S], ["blueDiff": T], ["number": U], ["maxDimension": V] }

Preview: optional prefix. Save: optional prefix. Rugosity: returns avgIntensity, maxIntensity, extension. ColorChange: optional left, right, junction. Returns redDiff, greenDiff, blueDiff. Bubbles: returns number, maxDimension.

Configuration commands

{ "settings": "[setDutyCycles|pwmOn|pwmOff]", "msgId": I, "pwmId": J, ["white": K], ["red": L], ["green": M], ["blue": N] }
{ "success": [true|false], "communicationId": I, "pwmId": J, ["errorCode": N] }

Automatic commands

{ "gpioCommand": "[save]", "camera": I, "gpio": J, "sequence": K }
{ "event": L, "camera": I, "severity": [0|1|2], ["filename": "MMM"], ["sequence": N] }

GpioCommand comes from GpioInterrupt. Save: severity = 0.