Trying to run the example code for the PCD8544 and get the following error. Looks like it is a problem in the module. How can I fix this?
SPI1.setup({ baud: 2000000, sck:A5, mosi:A7, order:'msb' });
var g;
function onInit() {
g = require("PCD8544").connect(SPI1,A6,C1,C3);}
function lcd() {
g.clear();
g.drawString("Hello",0,0);
g.drawLine(0,10,84,10);
g.flip();
}
>onInit()
ERROR: Using '.' operator on non-object at line 1 col 16
{var a=Graphics.createArrayBuffer(84,48,1,{vertical_byte:!0});setTimeout(function(){digitalWrite(c,0);digitalPulse(f,0,10);setTimeout(function(){b.send([33,191,20,6,32,12],d);void 0!==e&&e()},100)},100);a.flip=function(){digitalWrite(c,0);b.send([64,128],d);digitalWrite(c,1);b.send(this.buffer,d)};a.setContrast=function(a){digitalWrite(c,0);b.send([33,128|Math.clip(127*a,0,127),32,12],d)};return a}
^
at line 1 col 34
{var a=Graphics.createArrayBuffer(84,48,1,{vertical_byte:!0});setTimeout(function(){digitalWrite(c,0);digitalPulse(f,0,10);setTimeout(function(){b.send([33,191,20,6,32,12],d);void 0!==e&&e()},100)},100);a.flip=function(){digitalWrite(c,0);b.send([64,128],d);digitalWrite(c,1);b.send(this.buffer,d)};a.setContrast=function(a){digitalWrite(c,0);b.send([33,128|Math.clip(127*a,0,127),32,12],d)};return a}
^
in function "connect" called from line 2 col 47
in function "onInit" called from line 1 col 8
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.
Trying to run the example code for the PCD8544 and get the following error. Looks like it is a problem in the module. How can I fix this?