Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d2bf9e0

Browse files
vl53l5cx
1 parent 01de6a6 commit d2bf9e0

File tree

13 files changed

+478
-1157
lines changed

13 files changed

+478
-1157
lines changed

‎.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* Capture data from VL53L5CX 8x8 Time of Flight sensor
3+
*/
4+
#include <Wire.h>
5+
#include <eloquent.h>
6+
#include <eloquent/modules/vl53l5cx.h>
7+
8+
9+
10+
void setup() {
11+
Serial.begin(115200);
12+
Wire.begin();
13+
14+
// turn on high speed communication
15+
tof8x8.highFreq();
16+
17+
// truncate readings further than 2m to 2m
18+
tof8x8.truncateAt(2000);
19+
20+
// you may optionally rescale to a given range
21+
//tof8x8.setRange(0, 255);
22+
23+
if (!tof8x8.begin())
24+
eloquent::abort(Serial, "vl53l5cx not found");
25+
26+
Serial.println("vl53l5cx is ok");
27+
}
28+
29+
30+
void loop() {
31+
if (tof8x8.read()) {
32+
tof8x8.printTo(Serial);
33+
delay(100);
34+
}
35+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#include <Wire.h>
2+
#include <eloquent.h>
3+
#include <eloquent/modules/vl53l5cx/stream.h>
4+
5+
#define RESOLUTION 8*8
6+
#define NUM_FRAMES 10
7+
8+
9+
Eloquent::Modules::VL53L5CXStream<RESOLUTION, NUM_FRAMES> stream;
10+
11+
12+
13+
void setup() {
14+
Serial.begin(115200);
15+
Wire.begin();
16+
17+
// turn on high speed communication
18+
stream.highFreq();
19+
20+
// truncate readings further than 2m to 2m
21+
stream.truncateAt(2000);
22+
23+
// you may optionally rescale to a given range
24+
//stream.setRange(0, 255);
25+
26+
// emit the "queue" event once every 2 frames
27+
stream.throttle(2);
28+
29+
if (!stream.begin())
30+
eloquent::abort(Serial, "vl53l5cx not found");
31+
32+
Serial.println("vl53l5cx is ok");
33+
}
34+
35+
36+
void loop() {
37+
if (stream.queue()) {
38+
stream.printTo(Serial);
39+
delay(100);
40+
}
41+
}

‎src/eloquent.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
#define ELOQUENTARDUINO_ELOQUENT_H
33

44
// entry point for the Eloquent Arduino library
5+
#include "./eloquent/utils.h"
56

67
#endif //ELOQUENTARDUINO_ELOQUENT_H

‎src/eloquent/.DS_Store

6 KB
Binary file not shown.

‎src/eloquent/apps/telegram/witnessmenow/TelegramCertificate.h

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /