I’m attempting to get a HC-SR04 ultrasonic sensor to work with a Xenon board, but the Xenon only has 3.3V. I’ve been using the usual
#include <HC_SR04.h> and hardware wise have been trying to get the voltage down using a 1K and 2K resistor — but I seem to always get either -1 or values that fluctuate (and are pretty much what I’d get without the sensor being there at all!).
Has anyone had any luck getting an ultrasonic sensor to work nicely with the Xenon boards? My guess is that it’s because there’s no 5V on it, but it could be something else I’m missing?
Here’s what I’ve got connected up in my last attempt:
Any help is much appreciated!