DS18x20 no device #667
mauroForlimpopoli
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Good morning,
I'm using a net with 2 sensors DS18B20 . Following your example:
...
try {
sensor = new DS18X20({
bus,
index: 1
});
trace('Found 2nd:', sensor.toString(), '\n');
} catch {
trace('No 2nd!\n');
}
I
...
it works fine, but if disconnect a sensor, I get this error:
C:\moddable\modules\drivers\onewire\DS18X20.js (49) # Break: throw!
How can I receive only an alert and not a "throw new Error("no device");" that crash the device ?
Regards
Beta Was this translation helpful? Give feedback.
All reactions