View Source grisp_connect (grisp_connect v2.1.0)

GRiSP.io High Level API.

Link to this section 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.

Link to this section Functions

-spec connect() -> ok.

Connect to GRiSP.io.

-spec is_connected() -> true | false.

Check if board is connected to GRiSP.io.

Log from inside grisp_connect for testing.

-spec ping() -> {ok, binary()} | {error, atom()}.

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.