You are reading a single comment by @user7143 and its replies. Click here to read the full conversation.
  • I am fairly new to Javascript and am trying to understand why I am having an issue displaying gps data on a PCD8544. If I comment out the GPS code the display will characters. When the GPS code is included the LCD screen does not display any characters. I tried converting the lat1 variable from number to string but that did not work. WHat am I doing wrong?

    A2.write(0); // GND
    A4.write(1); // VCC
    SPI1.setup({ baud: 2000000, sck:A5, mosi:A7 });
    
    var g;
    
    
    function onInit() {
      g = require("PCD8544").connect(SPI1,A6,B0,B1­, function() {
        g.clear();
        g.drawString("Hello",0,0);
        g.drawLine(0,10,84,10);
        g.flip();
      });
    
    }
    
    onInit();
    
    
    
    Serial4.setup(57600,{tx:C10,rx:C11});
    var gps = require("GPS").connect(Serial4, function(data) {
      lat1 = data.lat;
      g.clear();
      g.drawString(lat1,0 ,0);
      g.flip();
      });
    
About

Avatar for user7143 @user7143 started