Hello,
I've come back to experimenting with this excellent tool and I've noticed there's a Waveform class.
I've been trying to use it on a VET6 running v1.48 (I can't get newer versions to work - just get a white screen when I flash it).
var w = new Waveform(256);
for (var i=0;i<1024;i++) w.buffer[i] = 128+Math.sin(i*Math.PI/128)*127;
analogWrite(A4, 0.5);
w.startOutput(A4, 4000);
After the first line I get the error "ERROR: Constructor should be a function..."
I am not sure how to use Classes, or if it is automatic. Is this Class not included in v1.48 - or the VET6?
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.
Hello,
I've come back to experimenting with this excellent tool and I've noticed there's a Waveform class.
I've been trying to use it on a VET6 running v1.48 (I can't get newer versions to work - just get a white screen when I flash it).
After the first line I get the error "ERROR: Constructor should be a function..."
I am not sure how to use Classes, or if it is automatic. Is this Class not included in v1.48 - or the VET6?
Many thanks,
Harry