Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bits_time_of_flight_controller
Manage
Activity
Members
Labels
Plan
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
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
bits_libs
bits_time_of_flight_controller
Commits
759bb547
Commit
759bb547
authored
May 10, 2022
by
Severin Landwein
Browse files
Options
Downloads
Patches
Plain Diff
change names
parent
5956d75f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
examples/tof_array/measurement.ino
+32
-0
32 additions, 0 deletions
examples/tof_array/measurement.ino
with
35 additions
and
3 deletions
README.md
+
3
−
3
View file @
759bb547
...
@@ -29,7 +29,7 @@ Möchte man mehr als 5 Time of Flight Sensoren verwenden, so müssen ebenfalls a
...
@@ -29,7 +29,7 @@ Möchte man mehr als 5 Time of Flight Sensoren verwenden, so müssen ebenfalls a
## **Anwendung**:<br />
## **Anwendung**:<br />
<br
/>
<br
/>
Zur Verwendung siehe zunächst das Beispiel
`
tof_array
.ino`
Zur Verwendung siehe zunächst das Beispiel
`
measurement
.ino`
<br
/>
<br
/>
...
@@ -40,12 +40,12 @@ Zur Verwendung siehe zunächst das Beispiel `tof_array.ino`
...
@@ -40,12 +40,12 @@ Zur Verwendung siehe zunächst das Beispiel `tof_array.ino`
**Instanziieren:**
**Instanziieren:**
```
arduino
```
arduino
TimeOfFlightController tof_
array
;
TimeOfFlightController tof_
controller
;
```
```
**Zum messen mit den Time of Flight Sensoren wird folgende Methode verwendet:**
**Zum messen mit den Time of Flight Sensoren wird folgende Methode verwendet:**
```
arduino
```
arduino
int value = tof_
array
.get_distance(index);
int value = tof_
controller
.get_distance(index);
```
```
-
`index`
: Time of Flight Sensor Nummer 0-4
-
`index`
: Time of Flight Sensor Nummer 0-4
...
...
This diff is collapsed.
Click to expand it.
examples/tof_array/
tof_array
.ino
→
examples/tof_array/
measurement
.ino
+
32
−
0
View file @
759bb547
#define DEBUG_TOF
//
#define DEBUG_TOF
#include
"time_of_flight_controller.h"
#include
"time_of_flight_controller.h"
TimeOfFlightController
tof_
array
;
TimeOfFlightController
tof_
controller
;
int
t
es
t
[
5
]
=
{};
int
valu
es
[
5
]
=
{};
void
setup
()
void
setup
()
{
{
Serial
.
begin
(
115200
);
Serial
.
begin
(
115200
);
Wire
.
begin
();
Wire
.
begin
();
tof_
array
.
init
();
tof_
controller
.
init
();
}
}
void
loop
()
void
loop
()
{
{
t
es
t
[
0
]
=
tof_
array
.
get_distance
(
0
);
valu
es
[
0
]
=
tof_
controller
.
get_distance
(
0
);
t
es
t
[
1
]
=
tof_
array
.
get_distance
(
1
);
valu
es
[
1
]
=
tof_
controller
.
get_distance
(
1
);
t
es
t
[
2
]
=
tof_
array
.
get_distance
(
2
);
valu
es
[
2
]
=
tof_
controller
.
get_distance
(
2
);
t
es
t
[
3
]
=
tof_
array
.
get_distance
(
3
);
valu
es
[
3
]
=
tof_
controller
.
get_distance
(
3
);
t
es
t
[
4
]
=
tof_
array
.
get_distance
(
4
);
valu
es
[
4
]
=
tof_
controller
.
get_distance
(
4
);
Serial
.
print
(
t
es
t
[
0
]);
Serial
.
print
(
valu
es
[
0
]);
Serial
.
print
(
" "
);
Serial
.
print
(
" "
);
Serial
.
print
(
t
es
t
[
1
]);
Serial
.
print
(
valu
es
[
1
]);
Serial
.
print
(
" "
);
Serial
.
print
(
" "
);
Serial
.
print
(
t
es
t
[
2
]);
Serial
.
print
(
valu
es
[
2
]);
Serial
.
print
(
" "
);
Serial
.
print
(
" "
);
Serial
.
print
(
t
es
t
[
3
]);
Serial
.
print
(
valu
es
[
3
]);
Serial
.
print
(
" "
);
Serial
.
print
(
" "
);
Serial
.
println
(
t
es
t
[
4
]);
Serial
.
println
(
valu
es
[
4
]);
}
}
\ 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