-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SPI support for MS5611 driver #34
Conversation
Python/navio/ms5611.py
Outdated
self.bus.max_speed_hz=1000000 | ||
|
||
|
||
def WriteReg(self, reg_address, data = 0x00): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write_register
Python/navio/ms5611.py
Outdated
self.bus.close() | ||
return rx | ||
|
||
def ReadRegs(self, reg_address, length=3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_registers
Python/navio/ms5611.py
Outdated
|
||
class MS5611: | ||
|
||
class SPI_interface(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPIBus
Python/navio/ms5611.py
Outdated
return rx[1:len(rx)] | ||
|
||
|
||
class I2C_interface(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I2CBus
Python/navio/ms5611.py
Outdated
self.bus = SMBus(i2c_bus_number) | ||
self.address = address | ||
|
||
def WriteReg(self, reg_address, device_address = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write_register
6e977e7
to
4819f01
Compare
I think, that now names more valid |
4819f01
to
9173c07
Compare
I think, that 'device' - better name for SPI and I2C, than flag. |
9173c07
to
2418cd4
Compare
Add SPI support
2418cd4
to
9608e4f
Compare
Hello!
I added SPI support for MS5611.