View Source grisp_connect (grisp_connect v1.1.0)
GRiSP.io High Level API.
Summary
Functions
Connect to GRiSP.io.
Check if board is connected to GRiSP.io.
Links the board to a GRiSP.io account. The token is took from the device_linking_token app env.
Links the board to the GRiSP.io account that generated of the specified token.
Log from inside grisp_connect for testing.
Ping GRiSP.io. Returns 'pong' if the board is linked to an account, 'pang' otherwise.
For manually testing the log encoding. Alternative to shell commands. The shell double encodes unicode strings.
Functions
-spec connect() -> ok.
Connect to GRiSP.io.
-spec is_connected() -> true | false.
Check if board is connected to GRiSP.io.
-spec link_device() -> {ok, binary()} | {error, token_undefined | invalid_token}.
Links the board to a GRiSP.io account. The token is took from the device_linking_token app env.
Links the board to the GRiSP.io account that generated of the specified token.
Log from inside grisp_connect for testing.
Ping GRiSP.io. Returns 'pong' if the board is linked to an account, 'pang' otherwise.
For manually testing the log encoding. Alternative to shell commands. The shell double encodes unicode strings.