Skip to content

Commit f07cee9

Browse files
authored
Fix many critical errors in documentation code snippets
1 parent 944fb29 commit f07cee9

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

docs/readme.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ Initialize the sensor
9595

9696
float x,y,z; // Values for the readings
9797

98-
setup(){
98+
void setup(){
9999
Serial.begin(9600);
100100
Accelerometer.begin();
101101
}
102102

103-
loop{
103+
void loop(){
104104
x = Accelerometer.readX();
105105
y = Accelerometer.readY();
106106
z = Accelerometer.readZ();
@@ -120,12 +120,12 @@ Return if the sensor its good to give the data
120120
121121
float x,y,z; // Values for the readings
122122
123-
setup(){
123+
void setup(){
124124
Serial.begin(9600);
125125
Accelerometer.begin();
126126
}
127127
128-
loop{
128+
void loop(){
129129
if(Accelerometer.available()){
130130
x = Accelerometer.readX();
131131
Serial.print("X axis: "); Serial.println(x);
@@ -153,15 +153,14 @@ Initialize the sensor
153153
154154
float temperature; // Value for the reading
155155
156-
setup(){
156+
void setup(){
157157
Serial.begin(9600);
158158
Pressure.begin();
159159
}
160160
161-
loop{
161+
void loop(){
162162
temperature = Pressure.readTemperature();
163163
Serial.print("temperature :"); Serial.println(temperature);
164-
}
165164
}
166165
```
167166

@@ -172,15 +171,14 @@ Initialize the sensor
172171

173172
uint32_t pressure; // Value for the reading
174173

175-
setup(){
174+
void setup(){
176175
Serial.begin(9600);
177176
Pressure.begin();
178177
}
179178

180-
loop{
179+
void loop(){
181180
pressure = Pressure.readPressure();
182181
Serial.print("pressure :"); Serial.println(pressure);
183-
}
184182
}
185183
```
186184
@@ -190,15 +188,14 @@ Initialize the sensor
190188
191189
float altitude; // Value for the reading
192190
193-
setup(){
191+
void setup(){
194192
Serial.begin(9600);
195-
Presure.begin();
193+
Pressure.begin();
196194
}
197195
198-
loop{
196+
void loop(){
199197
altitude = Pressure.readAltitude();
200198
Serial.print("altitude :"); Serial.println(altitude);
201-
}
202199
}
203200
```
204201

0 commit comments

Comments
 (0)