blob: b6098bb01bc3d32b73de932b35dfe1b6a10260b0 [file] [log] [blame]
Tiago Barros0baa4d72016-09-06 15:09:14 -03001KNoT Thing library
Claudio Takahasi00bdf942016-08-16 10:55:54 -03002
Tiago Barros0baa4d72016-09-06 15:09:14 -03003Copyright (c) 2016, CESAR.
4All rights reserved.
5
6This software may be modified and distributed under the terms
7of the BSD license. See the COPYING file for details.
8
9Introduction
10============
11
12KNoT Thing library is a lightweight C/C++ library built to use minimal CPU
Larissa01921b92017-12-20 08:44:51 -030013and memory resources. It is intended to run on KNoT Nodes (Things) (see KNoT
14Architecture for better understanding).
Tiago Barros0baa4d72016-09-06 15:09:14 -030015
16It provides the Radio and Protocol abstractions for the application. The application
17builder just need implement the read/write functions for its sensors/actuators,
18register a Data Item (sensor or actuator) on the library and call the run() method
19 on its main loop routine.
20
21
22
23Compilation and installation
24============================
25
Larissa01921b92017-12-20 08:44:51 -030026Currently the KNoT Thing library supports only the Arduino platform. The build process will generate an Arduino library zip file (KNoTThing.zip) containing all source code. This zip file can be imported on Arduino IDE.
Tiago Barros0baa4d72016-09-06 15:09:14 -030027
28In order to compiler the source code you need following software packages:
29 - GCC compiler
30 - GNU C library
31
32How to build:
33 make
34
35How to install:
Larissa01921b92017-12-20 08:44:51 -030036 Refer to Arduino library guide in order to install KNoT Thing library on Arduino IDE: https://www.arduino.cc/en/Guide/Libraries
37
38
39
40Thing Status LED
41================
42
43The Thing Status LED is used to report connection status (disconnected / connecting / connected) and also error status (invalid initialization / authentication error).
44
45Here is the LED blinking scheme considering the connection status and error status:
46
47CONNECTION STATUS
48
49* Disconnected: Blink led continuously (1s on, 1s off)
50* Connecting: Blink led twice (1s on, 1s off, twice) and 10s off after
51* Connected: Blink led once (1s on, 10s off)
52
53ERROR STATUS
54
55* Name error: the user initialized KNoTThing with a null thing name. Blink led continuously with 50ms interval.
56* HAL init error: the radio failed to initialize. Blink led continuously with 100ms interval.
57* AUTH error: the thing failed to authenticate and need to reset its UUID/Token. Blink led continuously with 250ms interval.