It seems by checking the datasheet that the sensor actually has the ability to be controlled via SPI or I2C. Here's the link for the datasheet http://www.meas-spec.com/downloads/MS5803-14BA.pdf.
To use I2C you have to drive PS high, and use SCLK and SDA pins, which will connect to the respective SCL and SDA on the expansion board. Gpio 20 is SCL and Gpio 21 is SDA.
I this https://www.sparkfun.com/products/12909 is your board, i believe that you do not need to drive PS high, since there's a 0R resistor soldered on the board which actually does that for you.
Best posts made by Pedro Baco
-
RE: I2C pins on Expansion Dock
-
Showing Wlan IP on ssh login boot
This is a way to show your wlan ip address when logging in via ssh. It can be changed to show eth also.
- edit /etc/profile . If you don't have nano installed, run opkg install nano to do so
- Add a line after line 4 with the following text : IP=$(/sbin/ifconfig wlan0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
- add another line with the following text : echo "wlan0 IP: $IP"
- save and exit
If you want to have the ethernet ip just change wlan0 to eth0
This is pretty standard to all Linux but i find it useful to have that info if you're working with a few accesses at the same time.
-
Python code for BMP180
I leave here my first python code for getting temperature and pressure values out of the BMP180, I2C sensor.
Code a bit rough, but tested and working flawlessly.
pythoni2c.py has a few basic I2C routines that i am upgrading as i'm going
BMP180.py has the main routines for the sensor and prints out both values.
Hope this will do any good to some people.pythoni2c.py BMP180.py -
RE: Console device manager
i2c-tools
installed,i2cget
Reading specific addresses inside BMP180. This looks promising -
RE: Run a Phyton Script on boot ??
edit /etc/rc.local
add a line with python </path/programtorun.py>
save file -
RE: No space for python-pip
Did you try python-light? I'm running ómega with python and a few bits and still 53% available.
-
RE: Python Scripts - Suggested Workflow?
Why don't you use ssh to access you omega? What i do is that, edit the python files with nano, and run them on command line. Simple and effective.
-
Python code for SI1145
I leave here my first python code for the values out of the SI1145, light and UV I2C sensor.
UV is not very reliable, since the actual sensor is not capable of UV sensing. According to datasheed there are 2 registers which do have UV values, but i found them very unreliable. Apart from that you can get IV, visible light and proximity out of the sensor.
Hope that someone find this useful.
pythoni2c.py SI1145.py