You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi. That's a very good point. Espruino can use inheritance, but as you say I'm not using it in the modules. As it is, the 'getTemp' method will be redefined for each call to connect.

    It'd be a really good idea to re-write them in such a way that the functions could be re-used. Could you paste up what you think a better version of the DS18B20 module would be? It'd be nice to re-arrange the existing modules while there aren't that many of them :)

About

Avatar for Gordon @Gordon started