Not sure where the problem lies, but
var sensor1 = require("DS18B20").connect(ow, 0); var sensor2 = require("DS18B20").connect(ow, 1); var sensor3 = require("DS18B20").connect(ow, 2); var sensor4 = require("DS18B20").connect(ow, 3); sensors = [sensor1, sensor2, sensor3, sensor4];
works, but
sensors = ow.search().map(function (device) { return require("DS18B20").connect(ow, device); });
does not. any suggestions?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Not sure where the problem lies, but
works, but
does not.
any suggestions?