@Gordon, I'll return to the ESP8266 thread soon-ish, and respond to your last question. Thanks for the help. For now I'm making use of the Espruino Wifi so I can ignore the ESP issue.
I got some of these: https://www.adafruit.com/product/661 SSD1306 displays. I can't get them working using SPI on my Espruino Wifi. I've tried a variety of connection arrangements. It should be simple but it seems every page has different instructions. I was using the table labeled "SPI" at the top of this page, but I now conclude it must be wrong: https://www.espruino.com/SSD1306
Table says: D0/SCK/SCLK => B5
I assume B5 means SPI1 MOSI (like Pico or Espruino Board). Why would I connect clock to master out / slave in?
So I'm reading the pins from this table according to the Pico pinout, checking if it makes sense, and connecting to the A pins for the same function on the Espruino Wifi. If they don't make sense, I'm trying to connect like pins to like pins. From what I see online, MOSI goes to MOSI, SCK goes to SCK, etc.
GND => `GND`
3.3V => `3.3V`
CLK => `A5` (`A5` = `SPI1 SCK`, a.k.a. `clock`)
DATA => `A7` (D1/MOSI/SDIN = `DATA`? `DATA` = MOSI? `A7` = `SPI1 MOSI`)
DC => `A1` (Internet says any GPIO, and `A8` is inaccessible. Assuming DC = `D/C`)
RST => `A0` (Internet says any GPIO, and `B7` is not an A pin)
CS => `GND`
Because all the example snippets I find use software SPI, so do I. Here's my test code that doesn't work:
function start(){
g.on();
// write some text
g.drawString("Hello World!",2,2);
// write to the screen
g.flip();
}
// SPI
var s = new SPI();
s.setup({mosi:A7, sck:A5});
var g = require("SSD1306").connectSPI(s, A1/*DC*/, A0/*RST*/, start, { height : 32 });
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.
@Gordon, I'll return to the ESP8266 thread soon-ish, and respond to your last question. Thanks for the help. For now I'm making use of the Espruino Wifi so I can ignore the ESP issue.
I got some of these: https://www.adafruit.com/product/661 SSD1306 displays. I can't get them working using SPI on my Espruino Wifi. I've tried a variety of connection arrangements. It should be simple but it seems every page has different instructions. I was using the table labeled "SPI" at the top of this page, but I now conclude it must be wrong: https://www.espruino.com/SSD1306
Table says:
D0/SCK/SCLK => B5
I assume B5 means SPI1 MOSI (like Pico or Espruino Board). Why would I connect
clock
tomaster out / slave in
?So I'm reading the pins from this table according to the Pico pinout, checking if it makes sense, and connecting to the A pins for the same function on the Espruino Wifi. If they don't make sense, I'm trying to connect like pins to like pins. From what I see online, MOSI goes to MOSI, SCK goes to SCK, etc.
Because all the example snippets I find use software SPI, so do I. Here's my test code that doesn't work: