mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-20 00:30:59 +03:00
Add SI7005
This commit is contained in:
16
I2Csensors/PCA9548
Executable file
16
I2Csensors/PCA9548
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $# != 1 || $((-(-$1))) != $1 ]]; then
|
||||
echo "Usage: $0 cnannel" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 < 0 || $1 > 7 ]]; then
|
||||
echo "Channel number should be from 0 to 7" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $((1 << $1))
|
||||
|
||||
i2ctransfer -y 6 w1@0x70 $((1 << $1))
|
||||
i2cdetect -y -r 6
|
||||
Reference in New Issue
Block a user