• Oops. Try with: https://gist.githubusercontent.com/gfwilliams/da8f09f91c8d0011cbae/raw/72d4e9e462ccff66703d47797b350694357fa56d/ADS1X15.js

    @allObjects, the if (!isNaN(channelSpec)) test doesn't work properly in Espruino. Looks like there's a bug there that means isNaN([1,2]) is false.

    edit: just fixed it, but it'll only get into the 1v81 release

  • isNaN([1,2])... I thought I had 'tested' that... but may be on the wrong plaform... as said. Going for typeof (=== "number") would probably be a better choice, even better than checking for array.

About

Avatar for Gordon @Gordon started