-->
Page 1 of 2

MQTT and Chinese 32x8 Led Matrix scrolling

PostPosted: Tue Dec 15, 2015 2:24 pm
by mugginsjm
Hi
I'm in need of some help. My goal is to use an ESP-12 to scroll text using a chinese 32x8 led matrix (2 of in fact).
I have already battled my way through most of the problems including row-wise fonts and have now got it working. I want it to subscribe to several MQTT topics and scroll the message twice.
The issue I have is that whilst the text is scrolling the callback function does not see the next incoming MQTT message and I don't know how to resolve this. I think this project might be useful to others and am happy to post my (novice) sketch.
Any guidance appreciated.
John

Re: MQTT and Chinese 32x8 Led Matrix scrolling

PostPosted: Wed Dec 16, 2015 8:33 am
by mugginsjm
I attach sketch. Ideally if several topics were subscribed to and multiple messages were incoming, they would be queued.
thanks
John

Re: MQTT and Chinese 32x8 Led Matrix scrolling

PostPosted: Wed Dec 30, 2015 5:19 am
by bobcroft
John, I am not certain of the exact cause of your problem but on taking a look at your code I see a delay(70) in the display update. I would suggest changing that to a non blocking delay. My logic is that if a subscribed message comes in during that delay it will be missed. I believe the issue is to do with persistence of messages, the Arduino / ESP pubsubclient library only has a QOS of 0 which means the message is sent but there is no further try to sent or confirmation of receipt.
If you look at the website of hiveMQTT there is a brilliant tutorial series on MQTT .
If you know how to use the Eclipse environment using the Espressif SDK then there is a more fully functional MQTT client available from TuanPm.
Hope that helps

Bob

Re: MQTT and Chinese 32x8 Led Matrix scrolling

PostPosted: Wed Dec 30, 2015 2:58 pm
by mugginsjm
Hi Bob
Thanks for your advice on this. I have already tried non blocking delay but for some reason it scrolls partially and then collapses with a "wdt reset". I'm at a loss here. Also I think that the PubSubClient by Knolleary supports QOS. I've messed with that too but to no avail.
thanks
John