-
Notifications
You must be signed in to change notification settings - Fork 21
BMP085_BMP180
Breakout boards and sensors can be purchased at the following places:
- Available at Zolertia store
- Available at Grove/Seeedstudio
- Available at Adafruit
- Digital two wire (I2C) interface
- Wide barometric pressure range
- Flexible supply voltage range
- Ultra-low power consumption
- Low noise measurement
- Factory-calibrated
- -40 to +85°C operational range, ±2°C temperature accuracy
Both BMP085 and BMP180 sensors are driver compatible and share the same library.
The Contiki sensor library can be found at platform/zoul/dev/bmpx8x.c
, check out the most updated version in Contiki repository.
To test the BMP085 or BMP180 sensor follow the next steps
-
Grab Contiki and prepare the development setup (skip if you already have it)
-
Connect the sensor to the RE-Mote using the 5-pin cable as shown in the photo above. This is a 5-pin connector with 2.54 mm pitch spacing, if you are to connect using a different cable than the one provided, check out the RE-Mote pin-out and the connector information.
-
Compile the test example and program the RE-Mote:
cd examples/zolertia/zoul
make test-bmp085-bmp180.upload && make login
You should see on your screen something similar to this:
(...)
CC test-bmp085-bmp180.c
LD test-bmp085-bmp180.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff test-bmp085-bmp180.elf test-bmp085-bmp180.bin
python ../../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -a 0x00202000 test-bmp085-bmp180.bin
Opening port /dev/ttyUSB0, baud 500000
Reading data from test-bmp085-bmp180.bin
Firmware file: Raw Binary
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 06:15:AB:25:00:12:4B:00
Erasing 524288 bytes starting at address 0x00200000
Erase done
Writing 516096 bytes starting at address 0x00202000
Write 8 bytes at 0x0027FFF8F00
Write done
Verifying by comparing CRC32 calculations.
Verified (match: 0xbd181d45)
rm obj_zoul/startup-gcc.o test-bmp085-bmp180.co
using saved target 'zoul'
../../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
connecting to /dev/ttyUSB0 (115200) [OK]
Contiki-3.x-2102-g9f1376d
Zolertia RE-Mote platform
Rime configured with address ab:25
Net: Rime
MAC: CSMA
RDC: nullrdc
Pressure = 1019.3(hPa), Temperature = 24.3(ºC)
Pressure = 1019.3(hPa), Temperature = 24.3(ºC)
Pressure = 1019.3(hPa), Temperature = 24.3(ºC)
Pressure = 1019.2(hPa), Temperature = 24.3(ºC)
Pressure = 1019.3(hPa), Temperature = 24.2(ºC)
Pressure = 1019.2(hPa), Temperature = 24.2(ºC)
If the above doesn't work, or if you see the following message:
Error, enable the DEBUG flag in the BMPx8x driver for info, or check if the sensor is properly connected
Check the wiring and connections, this error is likely due to a bad connection. Try also enabling the DEBUG
flag in platforms/zoul/dev/bmpx8x.c
by changing the current value to #define DEBUG 1
, this will print more information on screen useful for debugging.
- Get the Code
- Toolchain and tools
- Getting Started with Zolertia products
- Change to SubGHZ interface
- Program the Zolertia platforms
- Configure Eclipse (IDE)
- Firefly as a Sniffer
- Sensors