DarkstarXT
New member
Hi, I search and could not found any other topic regarding the NewPing library and the teensy 4.1.
Hi have a 4 pins HC-SR04 connected to my teensy. I have used this library many times on other Arduino board and never had problems.
When I compile the project I get those errors
and
To reproduce this simply had the newping to any teensy 4.1 project
I have looked around and I saw that that the _triggerOutput and _echoInput are defined uint32_t if defined PARTICLE but not TEESYDUINO. I try to force them to uint32_t but got may error downstream.
Before going in a deep debug of the lib, is there something I'm missing here ?
I saw that this lib is supposed to be compatible with teensy board, but is the 4.1 to recent for them ?
Is there an other lib for using 4 pin sensor , the ping lib is made for 1 trig/echo pin ....
Thanks for the help !
Hi have a 4 pins HC-SR04 connected to my teensy. I have used this library many times on other Arduino board and never had problems.
When I compile the project I get those errors
Code:
NewPing.cpp:19:17: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
_triggerOutput = portOutputRegister(digitalPinToPort(trigger_pin)); // Get the output port register for the trigger pin.
and
Code:
NewPing.cpp:20:13: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
_echoInput = portInputRegister(digitalPinToPort(echo_pin)); // Get the input port register for the echo pin.
To reproduce this simply had the newping to any teensy 4.1 project
Code:
#include <NewPing.h>
NewPing sonar_front(6, 5, 200);
void setup() {
}
void loop() {
}
I have looked around and I saw that that the _triggerOutput and _echoInput are defined uint32_t if defined PARTICLE but not TEESYDUINO. I try to force them to uint32_t but got may error downstream.
Before going in a deep debug of the lib, is there something I'm missing here ?
I saw that this lib is supposed to be compatible with teensy board, but is the 4.1 to recent for them ?
Is there an other lib for using 4 pin sensor , the ping lib is made for 1 trig/echo pin ....
Thanks for the help !