-
• #2
Hi,
Sorry for the delay. The issue is you're running that command in the web browser, and not on the Puck itself.
For instance to set the LED you do
Puck.write("digitalWrite(LED1,1);\n");
not justdigitalWrite(LED1,1);
So what you need is:
Puck.eval("Puck.getBatteryPercentage()", function(value) { console.log(value); });
Hi there, this simple code gives me a
should it not just work in the web as in the console?