Hi all, I am having issues getting a Benewake TF mini lidar unit to work on a teensy 4.0. I am using the library https://github.com/opensensinglab/tfmini . The following code works just fine on an arduino uno but I cant get this code to work on the teensy. I tried pins 0 and 1 on the teensy and putting said changes in the code as well to no avail. All i see on the serial monitor is "initializing...". Is this a library issue? Any guidance in getting this Lidar to work on the teensy is much appreciated. Thank you all for your time.
#include <SoftwareSerial.h>
#include "TFMini.h"
SoftwareSerial mySerial(10, 11); // Uno RX (TFMINI TX), Uno TX (TFMINI RX)
TFMini tfmini;
void setup() {
Serial.begin(115200);
Serial.println ("Initializing...");
mySerial.begin(TFMINI_BAUDRATE);
tfmini.begin(&mySerial);
}
void loop() {
// Take one TF Mini distance measurement
uint16_t dist = tfmini.getDistance();
uint16_t strength = tfmini.getRecentSignalStrength();
// Display the measurement
Serial.print(dist);
Serial.print(" cm sigstr: ");
Serial.println(strength);
delay(25);
}
#include <SoftwareSerial.h>
#include "TFMini.h"
SoftwareSerial mySerial(10, 11); // Uno RX (TFMINI TX), Uno TX (TFMINI RX)
TFMini tfmini;
void setup() {
Serial.begin(115200);
Serial.println ("Initializing...");
mySerial.begin(TFMINI_BAUDRATE);
tfmini.begin(&mySerial);
}
void loop() {
// Take one TF Mini distance measurement
uint16_t dist = tfmini.getDistance();
uint16_t strength = tfmini.getRecentSignalStrength();
// Display the measurement
Serial.print(dist);
Serial.print(" cm sigstr: ");
Serial.println(strength);
delay(25);
}