Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Update pieSensors.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey committed May 15, 2016
1 parent 7755472 commit 6748355
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pieSensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
from time import time

while(True):
GPIO.output(channel, GPIO.HIGH)
GPIO.output(channel, GPIO.LOW)
bus.write_i2c_block_data(address, 0x01, [229,131])
sleep(0.00028)
bus.write_i2c_block_data(address, 0x01, [245,131])
a2 = bus.read_i2c_block_data(address, 0x00, 2)
sleep(0.00004)
GPIO.output(channel, GPIO.LOW)
GPIO.output(channel, GPIO.HIGH)
sleep(0.0968)
a3 = bus.read_i2c_block_data(address, 0x00, 2)
bus.write_i2c_block_data(address, 0x01, [197,131])
sleep(.01)
a0 = bus.read_i2c_block_data(address, 0x00, 2)
bus.write_i2c_block_data(address, 0x01, [213,131])
sleep(.01)
a1 = bus.read_i2c_block_data(address, 0x00, 2)
bus.write_i2c_block_data(address, 0x01, [229,131])
sleep(.01)
a2 = bus.read_i2c_block_data(address, 0x00, 2)
bus.write_i2c_block_data(address, 0x01, [245,131])
sleep(.01)
a3 = bus.read_i2c_block_data(address, 0x00, 2)
temperature = bmp085.read_temperature()
pressure = bmp085.read_pressure()
altitude = bmp085.read_altitude()
Expand Down

0 comments on commit 6748355

Please sign in to comment.