Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MessdatenSilo
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Kloock
MessdatenSilo
Commits
6df17933
Commit
6df17933
authored
Jun 15, 2022
by
SirWalross
Browse files
Options
Downloads
Patches
Plain Diff
Small update
parent
cf2df077
No related branches found
No related tags found
No related merge requests found
Pipeline
#764
failed
Jun 15, 2022
Stage: convert
Stage: upload
Stage: release
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/push.bash
+2
-2
2 additions, 2 deletions
scripts/push.bash
sketches/DmsMessung/DmsMessung.ino
+21
-71
21 additions, 71 deletions
sketches/DmsMessung/DmsMessung.ino
with
23 additions
and
73 deletions
scripts/push.bash
+
2
−
2
View file @
6df17933
...
...
@@ -12,9 +12,9 @@ scripts/./write.bash
sleep
10
#
python3 measure.py
python3 measure.py
#
sleep 10
sleep
10
echo
-e
"Starting python script:
\n
"
loop_count
=
1
...
...
This diff is collapsed.
Click to expand it.
sketches/DmsMessung/DmsMessung.ino
+
21
−
71
View file @
6df17933
#include
<HX711_ADC.h>
HX711_ADC
LoadCell
(
2
,
3
);
HX711_ADC
LoadCell2
(
6
,
7
);
HX711_ADC
LoadCell3
(
8
,
9
);
HX711_ADC
LoadCell4
(
12
,
13
);
static
float
Offset
=
0
;
static
float
Offset2
=
0
;
static
float
Offset3
=
0
;
...
...
@@ -42,29 +39,19 @@ void regelbetrieb(HX711_ADC zelle, HX711_ADC zelle2, HX711_ADC zelle3, HX711_ADC
messwert4
=
0
;
for
(
int
i
=
1
;
i
<=
anzahl
;
i
++
)
{
zelle
.
update
();
zelle2
.
update
();
zelle3
.
update
();
zelle4
.
update
();
messwert
=
messwert
+
(
getDaten
(
Offset
,
zelle
));
messwert2
=
messwert2
+
(
getDaten
(
Offset2
,
zelle2
));
messwert3
=
messwert3
+
(
getDaten
(
Offset3
,
zelle3
));
messwert4
=
messwert4
+
(
getDaten
(
Offset4
,
zelle4
));
delay
(
1
);
}
messwert
=
messwert
/
anzahl
;
messwert2
=
messwert2
/
anzahl
;
messwert3
=
messwert3
/
anzahl
;
...
...
@@ -74,57 +61,29 @@ void regelbetrieb(HX711_ADC zelle, HX711_ADC zelle2, HX711_ADC zelle3, HX711_ADC
messwert2
=
messwert2
/
calFac2
;
messwert3
=
messwert3
/
calFac3
;
messwert4
=
messwert4
/
calFac4
;
}
float
getDaten
(
float
offset
,
HX711_ADC
zelle
)
{
float
Offsetnew
=
offset
;
float
data
;
data
=
(
float
)
zelle
.
getRareData
()
-
Offsetnew
;
return
data
;
}
void
writeInData
()
{
if
(
Serial
.
available
())
{
Serial
.
read
();
delay
(
10
);
Serial
.
println
(
1
);
delay
(
10
);
regelbetrieb
(
LoadCell
,
LoadCell2
,
LoadCell3
,
LoadCell4
);
Serial
.
println
(
messwert
);
delay
(
10
);
...
...
@@ -145,12 +104,9 @@ float epsilonumgebung(float hierMesswert, float hierMesswertAlt) {
return
hierMesswert
;
}
void
setup
()
{
Serial
.
begin
(
9600
);
LoadCell
.
begin
();
LoadCell2
.
begin
();
LoadCell3
.
begin
();
...
...
@@ -166,8 +122,6 @@ void setup() {
LoadCell3
.
update
();
LoadCell4
.
update
();
Offset
=
getDaten
(
0
,
LoadCell
);
Offset2
=
getDaten
(
0
,
LoadCell2
);
Offset3
=
getDaten
(
0
,
LoadCell3
);
...
...
@@ -176,10 +130,6 @@ void setup() {
delay
(
500
);
}
void
loop
()
{
writeInData
();
}
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