Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BMP180 /BMP085 Orange pi pc

Featured Replies

Just started with Orangepi and ARMbian ...

 

ARMbian is a very nice OS. Especially since there's a RAW image for Orange pi! Thanks!

 

I've got two DS18B20 working perfectly with my Orange pi pc!

 

But now I've troubles with the BMP085 /BMP180. With my old Raspberry pi it was pretty easy, but how can I get the BMP180 running?

I 've read there are modules for ARMbian, but I've read as well I've got to compile my own module. Does anybody know where can I find the files /module to load or compile?

 

  • Author

And... it works "out of the box" ... 

 

For those who are interested:

 

Python script (for use with www.metern.org):

 

#!/usr/bin/python
from Adafruit_BMP085 import BMP085
bmp = BMP085(0x77)
temp = bmp.readTemperature()
pressure = bmp.readPressure()
altitude = bmp.readAltitude()
print "8(%.2f*hPa)" % (pressure / 100.0)
#print "Altitude:    %.2f" % altitude

 

Gpio pins used: 1 / 3 / 5 / 6

You probably simply need to install the https://github.com/duxingkei33/orangepi_PC_gpio_pyH3 version first, and then Adafruit's ones.

 

Adafruit Python GPIO Library provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.

This library is checking a platform.(Raspberry Pi/Beaglebone) .

And python-smbus is used for i2c control.

I think it's very difficult to work this library in OPI.

I tested this cord.
 
 
It work fine By both of RPI and OPI.(OPI-ONE)
 
pi@raspberrypi ~/BMP085 $ sudo ./testBMP085
Temperature     83.1 *F
Pressure        1004.29 hPa
Altitude        370.7 Feet
 
 
orangepi@orangepione:~/BMP085$ sudo ./testBMP085
Temperature     83.7 *F
Pressure        1004.39 hPa
Altitude        367.5 Feet
 
smbus.c/smbus.h is here.
 

You have to modify a source.

 

<testBMP085.c>

#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/i2c-dev.h>
#include <linux/i2c.h>
#include <sys/ioctl.h>
#include "smbus.h"
#include <math.h>
 
 
cc -o testBMP085 ./smbus.c ./testBMP085.c -lm
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.