Keyhole

Communication

A lightweight library for serial-port interaction: send commands and get/set sketch variables via a JSON- and Python-compatible text interface.
In one line, and usually with less than a microsecond of overhead, keyhole.variable("foo", foo); provides serial-port access to an integer, floating-point or String variable in your sketch. Set its value by sending foo=123\n - the variable() method will return true to let the sketch know when you do this. Query it by sending foo\n . Query all exposed variables at once by sending ?\n , or choose to have them auto-report themselves periodically. Responses are in easy-to-parse JSON format and can be turned into Python dicts with one call to ast.literal_eval(), but there's a plotter-compatibility mode too.

Author: Jeremy Hill

Maintainer: Jeremy Hill

Read the documentation

Go to repository

Compatibility

This library is compatible with all architectures so you should be able to use it on all the Arduino boards.

Releases

To use this library, open the Library Manager in the Arduino IDE and install it from there.