I can't be much help - this is really a forum for the Espruino JavaScript interpreter.
You could however compile that and run it - with the code above - on the Pi :) While I don't think hardware I2C is properly implemented, you could use software I2C on any GPIO pins.
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 can't be much help - this is really a forum for the Espruino JavaScript interpreter.
You could however compile that and run it - with the code above - on the Pi :) While I don't think hardware I2C is properly implemented, you could use software I2C on any GPIO pins.