-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP8266 Support #7
Conversation
Started over with a fresh fork of the DMD2 library, since I'd borked things up so badly with the old one, developing in my own branch.
After a number of Compiles and Uploads, I've found these values to be optimal for minimal flicker.
This frees up timer1, which is used for all PWM functions on the ESP8266/Arduino fork, as there is no hardware PWM available. Why? Because then the DMD2 library's brightness control works. Apart from SoftDMD, this port is now feature complete.
Thanks heaps for this, sorry for the ridiculously long time to reply - this got stuck down my TODO list. It's now merged, I added some notes in the README about using w/ ESP8266 and also tagged a new 0.0.3 version so it should become available in the Board Manager shortly. |
Thank you very much but one problem is there when we want to display any string its possible but when we go for scrolling the string then after 10 to 12 sec its shows stack overflow. |
DMD2 is great working for ESP8266/nodeMCU. you just initialize/define PIN on ESP8266 #define pin_A 16 #define DISPLAYS_WIDE 1 because ESP8266 PIN's is default set on LOW |
@mohitsachan33 try to scroll text without space |
Hi @helmisusanto thanks for the update. Did you use level shifter? |
are you mean p10 with 2 rows? you need using 2 esp8266 for row 1 and row 2. PIN OUT first ESP full with first panel p10. |
how can i change the size panel inside loop? |
hello my friends I have 2 module p10 (64x16 screen) I need drive it with NODE MCU ESP32 not ESP8266 please help me |
I have a question on connection DMD---ESP8266 (Here is my ESP8266: https://circuit-diagramz.com/wp-content/uploads/2018/11/ESP8266-12e-Pinout-12.jpg ). So what pins are "sck", "clk" and "noe"? |
I figured out how to connect DMD---ESP8266. DMD_pin_R --- GPIO13 (SPI MOSI) You can connect the following DMD-pins to GPIO-pins you like, but you must define them in your code as helmisusanto wrote on Feb 11, 2018. According code:
Good luck! |
Do I need a logic level shifter? As I checked, the DMD is able to receive a 3.3V signal (A, B, three SPI lines), but of course the OE has smaller value so the DMD is a bit dimmer, but I don't need a super bright display. |
Works well for me without level shifter. |
But in your links they use 5V Arduino. This thread is about 3.3V ESP |
Yes, OK, sorry. I begun with NodeMCU 1.0 without level shifter. |
Actually I am not using a NodeMCU, but an ESP32 S2 mini with 27 IO pins. It works with this library but some changes were needed. |
can you explain the detail ?? |
I think everyone should move to another library https://github.com/busel7/DMDESP I try to use dmd2 for advanced code like adding mqtt, mdns, and making it more readable, but DMD2 always makes my nide mcu keeping hard restart I tried to change to DMDESP everything works fine. |
Hi Helmi, is it also work for ESP32 ? |
Note - If you have 3 rows, the second one will be reversed! |
SoftDMD is not included, yet, but otherwise this is feature complete. (I've used a preprocessor statement to disable SoftDMD on the ESP8266)
All demo sketches compile and execute as they were meant to, the only change needed being changing SoftDMD to SPIDMD.
The
#define ESP8266_TIMER0_TICKS
in DMD2_Timer.cpp sets the delay between runningscan_running_dmds
via timer0 interrupt in microseconds, the default I've set is 1000, seems to work well with 4mhz SPI clock, which is also a default.Why timer0?
Because the ESP8266 has no hardware PWM, so the ESP8266/Arduino project is using timer1 for software PWM, a.k.a analogWrite. The only other ESP8266 library that currently uses timer0 is for Servo control, the likelihood that someone will use servos with a DMD is low compared to wanting to be able to adjust DMD brightness.
How to connect:
You'll probably want to use a level shifter, I used a TXS0108E that worked quite well. I imagine some 7400 and 4000 series chips that have been used in such a way before could also be substituted.
One more thing: The kinds of frequencies everything is required to run at to make this work probably doesn't lend itself too well to a solderless breadboard, my ESP8266 is on a soldered breadboard and it works pretty well, but sometimes it hiccups due to the capacitance between the tracks on the board, people are welcome to try, but I thought you should know the potential risks of using a solderless breadboard.
EDIT: Swapped GPIO15 from sck to noe, swapped GPIO0 from noe to sck, I apologise for the change, putting noe on gpio15 (which is held low for the ESP8266's boot mode) keeps the DMD from displaying garbage while the ESP8266 boots.
See https://github.com/esp8266/Arduino for more details.