squix78 / MAX7219LedMatrix

Library for the ESP8266 on Arduino IDE displaying text on multiple 8x8 led matrices
MIT License
159 stars 71 forks source link

My module only has up to pin d8? #9

Closed joeybab3 closed 3 years ago

joeybab3 commented 7 years ago

How might i go about connecting clock and data when my module only goes up to d8?

witnessmenow commented 7 years ago

Im sure you have long since fixed this, but Wemos and NodeMCU boards are label the pins different to the base ESP8266 pins

See the pin out here https://www.wemos.cc/product/d1-mini.html

CLK is D5 CS is whatever you want (I used D3) DIN is D7

koichirose commented 7 years ago

I'm having trouble with this, too. Using a D1 mini with its LED matrix shield.

From what I can see here, and here, the pins should match. D5 is CLK (GPIO13 in this library), D7 is DIN (GPIO14 in this library).

Tried the example but can't make it work, all i can see is garbled text

joeybab3 commented 7 years ago

I did end up Fixing it, ill go back and see what i did

joeybab3 commented 7 years ago

Yes, it goes: D7->DIN D5->CLK D4->CS And the code should work

koichirose commented 7 years ago

Thank you for your answer after all this time.

Setting CS as D4 will actually blink the embedded LED on the wemos!

Here's my code:

#include <cp437font.h>
#include <LedMatrix.h>
#include <SPI.h>

#define NUMBER_OF_DEVICES 1
#define CS_PIN D4
LedMatrix ledMatrix = LedMatrix(NUMBER_OF_DEVICES, CS_PIN);

void setup() {
  Serial.begin(115200); // For debugging output
  Serial.println("begin");
  ledMatrix.init();
  ledMatrix.setIntensity(10); // range is 0-15
  ledMatrix.setText("A");
}

void loop() {
  ledMatrix.clear();
  ledMatrix.scrollTextLeft();
  ledMatrix.drawText();
  ledMatrix.commit(); // commit transfers the byte buffer to the displays
  delay(200);
}

I can't figure out what's wrong and right now, actually, I can't even see the garbled text anymore. No output at all.