Introduction: Arduino Nano Altimeter Using GY-BMP280

This is my first project.

I searched how to setup this sensor using i2c with an Arduino Nano but couldn't find anything that worked right away. I had to change some stuff in the default library to get it work with my sensor and wrote a simple sketch to store the data and display it to the serial monitor.

I started flying RC planes and wanted something to check how far up I went. the next step is to integrate the data in the OSD (on screen display, used for flying FPV).

Step 1: Copy Paste Code and Library

the wiring is simple:

VCC to the 3V3 (important, do not use 5V, could destroy the sensor)

GND to GND

SDA to A4

SCL to A5

If the code does not work, but you hooked up everything accordingly try scanning for i2c devices using the scanner (not my program, author is declared in the header, also I didn't write most of the other, I left the original header of those as well). I changed the i2c address in the library to 0x76 as the sensor appeared on my scanner. if you detect your sensor on 0x77 just change this in the library.
If this still does not work you need to change the wire connection. On my Arduino Nano (some cheap chinese knock-off) I figured that the i2c ports are on A4 and A5. But there are several versions out there and some of them seem to use pin 4 (SDA) and pin 5 (SCL). If it still does not work you could download some other guys code. good luck! I hope it worked though :)

I will soon (if I get it to work) program the arduino to output the data via PWM (FrSky Smart Sensor) to use telemetry and compatibility with mini OSD

edit1: added new testing.ino file (code for arduino) that should be sleeker. make sure you have the libraries in the correct folder. ( /arduino/libraries/"library name"/"library name".h ) this caused me some trouble...

Comments

author
Swansong made it!(author)2017-03-20

Thanks for sharing :)

author
cladeport made it!(author)2017-03-20

did you get to try it out?

About This Instructable

700views

4favorites

License:

More by cladeport:Arduino Nano Altimeter Using GY-BMP280
Add instructable to: