Skip to content

Commit

Permalink
println() in minimal example, added python i2c_bus comments
Browse files Browse the repository at this point in the history
  • Loading branch information
justind000 committed Aug 13, 2020
1 parent 0c3b74a commit db596af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/01-Minimal/01-Minimal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ void setup()
void loop()
{
// https://ufire.co/docs/uFire_EC/api.html#measureec
Serial.print((String) "mS/cm: " + ec.measureEC());
Serial.println((String) "mS/cm: " + ec.measureEC());
delay(1000);
}
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maintainer": true
}
],
"version": "1.2.1",
"version": "1.2.2",
"frameworks": "arduino",
"platforms": "*"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Isolated EC Probe Interface
version=1.2.1
version=1.2.2
author=uFire
maintainer[email protected]
sentence=Measure Electrical Conductivity, Total Dissolved Solids, and Salinity
Expand Down
6 changes: 3 additions & 3 deletions python/RaspberryPi/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# https://ufire.co/docs/uFire_EC/#raspberry-pi

# For Raspberry Pi 3, 3 indicates the I2C-GPIO port
ec = uFire_EC(3)
# on Raspberry Pi 3, this is always 3 after following the above link's instruction
# on Raspberry Pi 4, it can't be determined ahead of time

# For Raspberry Pi 4, 7 indicates the I2C-GPIO port
#ec = uFire_EC(7)
ec = uFire_EC(i2c_bus=3)

ec.measureEC()
print("mS: " + str(ec.mS))
9 changes: 5 additions & 4 deletions python/RaspberryPi/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# https://ufire.co/docs/uFire_EC/#raspberry-pi

# For Raspberry Pi 3, 3 indicates the I2C-GPIO port
ec = uFire_EC(3)

# For Raspberry Pi 4, 7 indicates the I2C-GPIO port
#ec = uFire_EC(7)
# on Raspberry Pi 3, this is always 3 after following the above link's instruction
# on Raspberry Pi 4, it can't be determined ahead of time
# from a terminal, type `ls /dev/i2c <tab>` after pressing <tab>, you should
# get a listing of available I2C busses.

ec = uFire_EC(i2c_bus=3)

class ECShell(cmd.Cmd):
prompt = '> '
Expand Down

0 comments on commit db596af

Please sign in to comment.