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.
Pedro Baco
@Pedro Baco
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
Latest posts made by Pedro Baco
-
RE: Omega onion led blinking
Changed it to default-on and it's on now. Thanks for the directions
-
RE: Omega onion led blinking
root@Omega-1361:~# cat /sys/class/leds/onion:amber:system/trigger
none [timer] default-on netdev transient gpio heartbeat morse oneshot usbdev phy0rx phy0tx phy0assoc phy0radio phy0tpt
root@Omega-1361:~# -
Omega onion led blinking
My led on the omega onion module started blinking after it's being up for several days now. It's not a problem as far as I see, since all is working as it is supposed, but still, it's happening on both modules I have. Is it a power issue warning of some kind or is it a warning for something else? Does anybody knows? Thanks
-
RE: Where to buy 32-pin connector for the Omega
I think i've found a few weeks ago something on ebay, try searching by 2mm header and you'll find a few hits.
-
RE: What TFT LCD are compatible?
I believe that SPI can't be used in 贸mega since it's been used for the memory chip already. Please correct me if i'm wrong.
-
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: List of webcams that don't work
HD3000 from Microsoft works ok with mjpeg-streamer