Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ieee802154-radio-eval
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
ieee802154-radio-eval
Commits
0d5c3da1
Commit
0d5c3da1
authored
3 years ago
by
Torben Petersen
Browse files
Options
Downloads
Patches
Plain Diff
temperatures are now iterated correctly, fixed wrong import of timer
parent
3de598f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
software/temp-controller.py
+11
-3
11 additions, 3 deletions
software/temp-controller.py
with
11 additions
and
3 deletions
software/temp-controller.py
+
11
−
3
View file @
0d5c3da1
...
...
@@ -4,7 +4,7 @@
import
paho.mqtt.client
as
paho
import
paho.mqtt.publish
as
publish
from
time
import
sleep
,
time
import
time
import
socket
import
struct
import
configparser
...
...
@@ -102,9 +102,12 @@ if __name__ == "__main__":
chamber_one_temperature_values
=
[
10
,
25
,
40
]
chamber_two_temperature_values
=
[
10
,
25
,
40
]
#use this to skip first element of array 1 after inversion
shift
=
0
while
True
:
for
chamber_one_numerator
in
range
(
0
,
len
(
chamber_one_temperature_values
)):
for
chamber_one_numerator
in
range
(
shift
,
len
(
chamber_one_temperature_values
)):
for
chamber_two_numerator
in
range
(
0
,
len
(
chamber_two_temperature_values
)):
CHAMBER_ONE_TARGET_TEMP
=
chamber_one_temperature_values
[
chamber_one_numerator
]
CHAMBER_TWO_TARGET_TEMP
=
chamber_two_temperature_values
[
chamber_two_numerator
]
...
...
@@ -115,15 +118,20 @@ if __name__ == "__main__":
set_temp_chamber_two
(
CHAMBER_TWO_TARGET_TEMP
)
#wait until both temperatures are reached
while
not
(
temperature_chamber_one_reached
.
wait
()
and
temperature_chamber_
one
_reached
.
wait
()
):
while
not
(
temperature_chamber_one_reached
.
wait
()
and
temperature_chamber_
two
_reached
.
wait
()
):
pass
print
(
"
Temperature reached!
"
)
#wait for 30 Minutes
time
.
sleep
(
60
*
15
)
#invert array for chamber two
chamber_two_temperature_values
=
chamber_two_temperature_values
[::
-
1
]
#invert array for chamber one
chamber_one_temperature_values
=
chamber_one_temperature_values
[::
-
1
]
#skip first element, because we inverted!
shift
=
1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment