Added some more projects and libraries.
This commit is contained in:
parent
f7151392ab
commit
1e1459fa50
94 changed files with 11904 additions and 0 deletions
28
BMP180_SERIAL/BMP180_SERIAL.ino
Normal file
28
BMP180_SERIAL/BMP180_SERIAL.ino
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <Wire.h>
|
||||
#include <Adafruit_Sensor.h>
|
||||
#include <Adafruit_BMP085_U.h>
|
||||
|
||||
Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
|
||||
|
||||
void setup(void) {
|
||||
Serial.begin(9600);
|
||||
Serial.println("Arduino BMP180 Pressure Sensor");
|
||||
Serial.println("");
|
||||
bmp.begin();
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
sensors_event_t event;
|
||||
bmp.getEvent(&event);
|
||||
if (event.pressure)
|
||||
{
|
||||
Serial.print("Pressure: ");
|
||||
Serial.print(event.pressure);
|
||||
Serial.println(" hPa");
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Sensor error");
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue