Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Praktika GruLalT
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
Sanjayan Linganesan
Praktika GruLalT
Commits
45ee0765
Commit
45ee0765
authored
4 years ago
by
Sanjayan Linganesan
Browse files
Options
Downloads
Patches
Plain Diff
Uebung_2.2
parent
0fa4f099
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Uebung_3_DC_Motor/src/main.cpp
+11
-1
11 additions, 1 deletion
Uebung_3_DC_Motor/src/main.cpp
with
11 additions
and
1 deletion
Uebung_3_DC_Motor/src/main.cpp
+
11
−
1
View file @
45ee0765
...
...
@@ -35,7 +35,10 @@ void setSpeed(float speed)
// (https://www.ti.com/lit/ds/symlink/l293.pdf) geschrieben werden.
// Input der Funktion: Ist-Drehrichtung als Boolean
// Rückgabe der Funktion: nichts
void
setdirection
(
boolean
istDirection
)
{
digitalwrite
()
}
// TODO: Erstelle die Funktion "getIstSpeed".
// Die Aufgabe dieser Funktion ist es, die am Potentiometer eingestellte
// Geschwindigkeit als Wert zwischen 0 und 5 zurückzugeben.
...
...
@@ -49,7 +52,14 @@ void setSpeed(float speed)
// Input der Funktion: nichts
// Rückgabe der Funktion: Ist-Geschwindigkeit im Bereich von 0.00 bis 5.00 als
// Float auf zwei Nachkommastellen genau.
bool
getIstSpeed
()
{
analogRead
(
0
);
for
(
float
IstGeschwindigkeit
=
0.00
;
float
IstGeschwindigkeit
<=
5.00
;
IstGeschwindigkeit
++
){
return
float
IstGeschwindigkeit
;
}
}
// Diese Funktion gibt die Ist-Drehrichtung zurück.
// true = Uhrzeigersinn, false = Gegenuhrzeigersinn
bool
getIstDirection
()
...
...
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