You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/readme.md
+60-16Lines changed: 60 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This is a basic documentation about the library for the *SensorKit* .
4
4
5
-
The library it's a wrapper of some libraries to use with the ![Arduino Sensor Kit](), it can be downloaded from the Arduino IDE’s library manager or by going to the [github repository](https://github.com/arduino-libraries/Arduino_SensorKit)
5
+
The library it's a wrapper of some libraries to use with the [Arduino Sensor Kit](), it can be downloaded from the Arduino IDE’s library manager or by going to the [github repository](https://github.com/arduino-libraries/Arduino_SensorKit)
6
6
7
7
## Classes
8
8
### SensorKit
@@ -37,13 +37,62 @@ Using the function `begin()` at the beginning of the `setup()`
37
37
### Oled
38
38
39
39
Using U8G2 library
40
+
https://github.com/olikraus/u8g2
40
41
42
+
#### Init the driver
43
+
44
+
Init and returns true if success, already done in the `SensorKit`'s object `begin()`
45
+
46
+
```cpp
47
+
if(!Oled.begin()){
48
+
Serial.println("Error");
49
+
while(1);
50
+
}
51
+
Serial.println("Ok");
52
+
```
53
+
#### "hello world" screen
54
+
```cpp
55
+
#include"Arduino_SensorKit.h"
56
+
57
+
SensorKit kit;
58
+
59
+
voidsetup() {
60
+
kit.begin();
61
+
}
62
+
63
+
voidloop() {
64
+
Oled.clearBuffer(); // clear the internal memory
65
+
Oled.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
66
+
Oled.setCursor(0, 10);
67
+
Oled.print("Hello World"); // write something to the internal memory
68
+
Oled.sendBuffer(); // transfer internal memory to the display
69
+
delay(1000);
70
+
}
71
+
```
72
+
73
+
#### Print values
74
+
Syntax:
75
+
```cpp
76
+
Oled.print(value);
77
+
```
41
78
### Accelerometer
42
79
43
80
Using LIS3DHTR library, this library renames their functions.
44
81
github.com/Seeed-Studio/Seeed_Arduino_LIS3DHTR
45
-
46
-
#### Using the Accelerometer
82
+
83
+
84
+
#### Init the sensor
85
+
86
+
Init and returns true if success, already done in the `SensorKit`'s object `begin()`
0 commit comments