Core #7
Arunesh-Gour
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Core API
Core
Core.gettanklist()
Core.getTank(tankname)
FishTank
FishTank.read('?')
FishTank.read(key)
FishTank.write(key, value, True)
Readable Keys (case-sensitive)
DO
- dissolved oxygen.NO2
- nitrite.NO3
- nitrate.TAN
- total ammonia nitrogen.temperature
- tank temperature.pH
- pH level.waterLevel
- percentage of tank filled.unionizedNH3
- unionized ammonia in water.Raises
Realistic ranges
DO
<= 2000.0NO2
<= 2000.0NO3
<= 2000.0TAN
<= 2000.0temperature
<= 60.0pH
<= 14.0waterLevel
<= 100.0unionizedNH3
<= 2000.0Usage
$
denotes spacing (for indentation) as well as command's beginning, in new line.import Core
DBDIR = '../Applications/DB'
core = Core.Core(DBDIR)
for tank in core.gettanklist():
tank = core.getTank(tank)
for key in tank.read('?'):
print(key, tank.read(key))
tank.write(key, 11.21, True)
Beta Was this translation helpful? Give feedback.
All reactions