Very easy - it's almost copy/paste.
So this is the existing code: https://github.com/espruino/EspruinoDocs/blob/master/devices/ADS1X15.js#L115-L138
And it's copied from https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp#L143-L189
So honestly it's just a matter of seeing what's changed in this code and making a new function: https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp#L199-L240
It'd be a lot easier if someone who had one did it though, because I'll probably make some stupid mistake again :)
@Gordon started
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.
Very easy - it's almost copy/paste.
So this is the existing code: https://github.com/espruino/EspruinoDocs/blob/master/devices/ADS1X15.js#L115-L138
And it's copied from https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp#L143-L189
So honestly it's just a matter of seeing what's changed in this code and making a new function: https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp#L199-L240
It'd be a lot easier if someone who had one did it though, because I'll probably make some stupid mistake again :)