stm32f3discovery hc-sr 04 not work #4116
Replies: 1 comment
-
Posted at 2014-09-27 by DrAzzy When you say it doesn't work, what do you mean? Does it give errors? Inaccurate data? Posted at 2014-09-27 by alexrlopez86 does not fail simply does not work ,does not display output Posted at 2014-09-27 by DrAzzy Sounds like it's not seeing any response from the HC-SR04.
If that displays nothing, it confirms that the part isn't behaving as expected. Do you have it connected to 5v tolerant pins, and 5v power? From what I see on the web, the HC-SR04 requires 5 volts. Posted at 2014-09-28 by alexrlopez86 tested the code and the function "SetWatch" does not work in stm32f3discovery Posted at 2014-09-29 by @gfwilliams There's a bug on GitHub about this: espruino/Espruino#183 It was posted in January, 9 months ago. So has setWatch ever worked on the F3 for you? Unfortunately the F3 isn't a supported board, so unless you want to try and fix it yourself you'll have to use a different board if you want setWatch. Ideally the Espruino board we provide - the money from those sales means that we can actually afford to test it and make sure that things like this get fixed. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-27 by alexrlopez86
Hello everyone
sorry if I do not extend (the English is not my forte)
not know the cause but the "HC-SR04" does not work with 1.70 or 1.71 espruino 27th Sep in stm32f3discovery. espruino 1.71 significantly improves the fault persists, tested the code and it works in ministm32_32
Test code
var sensor = require("HC-SR04").connect(A0,A1,function(dist) {
console.log(dist+" cm away");
});
setInterval(function() {
sensor.trigger(); // send pulse
}, 500);
Beta Was this translation helpful? Give feedback.
All reactions