var fs=require("fs");
digitalWrite(A13,0);
var g=require("PCD8544").connect(SPI2,C4,C5,A3, function() {
g.clear();
g.drawString("LCD OK",0,0);
g.flip();
});
Note that I did not do anything to the SPI2 setup anywhere, under the reasoning that, since the SD card works after doing var fs=require("fs"), doing that must perform any necessary setup.
I was under the impression that SPI interfaces could be shared, as long as each device had it's own pin to select that device (which is lowered to select that device, ie, nss_pin in spi.send()) - is this incorrect?
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.
Note that I did not do anything to the SPI2 setup anywhere, under the reasoning that, since the SD card works after doing var fs=require("fs"), doing that must perform any necessary setup.
The LCD works. The SD card does not:
If I don't set up the LCD, it works.
I was under the impression that SPI interfaces could be shared, as long as each device had it's own pin to select that device (which is lowered to select that device, ie, nss_pin in spi.send()) - is this incorrect?