Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Praktika GruLaIT
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Haltiner
Praktika GruLaIT
Commits
337834c2
Commit
337834c2
authored
4 years ago
by
Raphael Haltiner
Browse files
Options
Downloads
Patches
Plain Diff
Uebung3.1
parent
23529a64
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Uebung_3_DC_Motor/src/main.cpp
+8
-8
8 additions, 8 deletions
Uebung_3_DC_Motor/src/main.cpp
with
8 additions
and
8 deletions
Uebung_3_DC_Motor/src/main.cpp
+
8
−
8
View file @
337834c2
...
...
@@ -61,7 +61,7 @@ void setDirection()
// Float auf zwei Nachkommastellen genau.
float
getSpeed
()
{
float
analogRead
(
A0
)
/
1023
*
5
;
float
(
analogRead
(
A0
)
/
1023
*
5
)
;
}
// Diese Funktion gibt die Ist-Drehrichtung zurück.
...
...
@@ -115,14 +115,14 @@ void setup()
// erneut aufgerufen wird.
void
loop
()
{
bool
x
=
getIstDirection
;
bool
y
=
getSpeed
;
// TODO: Auslesen der Ist-Geschwindigkeit und Ist-Richtung.
// Die erhaltene Werte sollen dann an setSpeed und setDirection weitergegeben werden.
void
Data
()
{
Serial
.
print
(
getIstDirection
);
Serial
.
print
(
getSpeed
);
}
Serial
.
print
(
"getIstDirection:"
);
Serial
.
println
(
x
);
Serial
.
print
(
"getSpeed:"
);
Serial
.
println
(
y
);
// TODO: Überprüfen ob die Soll-Bedingungen mit den Ist-Bedingungen übereinstimmen.
// Bei jedem Durchlauf der Loop-Funktion soll überprüft werden ob die aktuellen
// Ist-Werten den geforderten Soll-Werten entsprechen. Um bei der Geschwindigkeit
...
...
@@ -132,4 +132,4 @@ void loop()
// mySerial.println()
// (https://www.arduino.cc/reference/de/language/functions/communication/serial/println/)
// über den Serial Monitor ausgegeben werden und einen neuen Task erstellt werden.
}
\ No newline at end of file
}
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