I have also just put the ADS1X15 module onto the website, so you no longer need all the code I posted. You just need:
I2C1.setup({ scl : ..., sda: ...} );
var ads = require("ADS1X15").connect(I2C1); // <--- this now pulls everything from the internet
ads.setGain(256); // +/- 0.256mV
ads.getADC(0, function(val) {
console.log("Reading: "+val);
});
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.
I have also just put the ADS1X15 module onto the website, so you no longer need all the code I posted. You just need: