Comments (5)
The sprit animation includes text, not just a sprite, so you will need to animate a " " (space).
You need to set up 2 zones, one for the graphics and one for the text. You can run each zone as per normal Parola animations. The Parola_Sprites_Library example shows how to run a sprite animation. Read https://arduinoplusplus.wordpress.com/2018/04/19/parola-a-to-z-sprite-text-effects/for more info.
If you truly want to mix text and graphics then it will be more complicated. See the example Parola_TG_Combo and the blog post https://arduinoplusplus.wordpress.com/2018/03/29/parola-a-to-z-mixing-text-and-graphics/,
from md_parola.
Thank you @MajicDesigns , If I'm not doing wrong I already setup 2 zones:
P.setZone(0, 1, 3); // Set up first 3 displays as Zone 0
P.setZone(1, 0 , 0); // Set up last display as Zone 1
P.displayZoneText(0, message, PA_CENTER, P.getSpeed()*5, P.getPause(), PA_SCROLL_LEFT, PA_SCROLL_LEFT);
P.setSpriteData(1, heart, W_HEART, F_HEART, heart, W_HEART, F_HEART); // Set sprite data for Zone 1
About mixing text and graphics I kind not doing it, once the text is animated in one zone don't affect other zone (of bitmap). Im not sure what happening..
from md_parola.
setSpriteData() only sets the data for the sprite in the zone. You also need to displayZoneText() using the sprite, as per the blog post article and the examples provided.
from md_parola.
Thank you @MajicDesigns yep I realize it later, but ever trying pass the message it are not happening:
P.displayZoneText(1, "", PA_CENTER, P.getSpeed(), P.getPause(), PA_SPRITE, PA_SPRITE);
P.setSpriteData(1, heart, W_HEART, F_HEART, heart, W_HEART, F_HEART);
But I kind find another way, I'm using both libraries:
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
Create a bitmap for instance:
const uint8_t heartBitmap[8] = {0x1c, 0x3e, 0x7e, 0xfc, 0xfc, 0x7e, 0x3e, 0x1c};
A message:
message = "Right Answer!";
and setup both:
mx.begin();
set zones, etc then display message:
P.displayZoneText(0, message, PA_CENTER, P.getSpeed()*2, P.getPause(), PA_SCROLL_LEFT, PA_SCROLL_LEFT);
and Image:
for (uint8_t col = 0; col < 8; col++) {
mx.setColumn(DISPLAY_TO_USE, col, imageToDisplay[col]);
}
That was the best solution, but I believe you could do better for sure.
from md_parola.
Good to know it works for you.
FYI, you need define the sprite data before you do the animation:
P.setSpriteData(1, heart, W_HEART, F_HEART, heart, W_HEART, F_HEART);
P.displayZoneText(1, "", PA_CENTER, P.getSpeed(), P.getPause(), PA_SPRITE, PA_SPRITE);
I think the libraries will ignore animation when the string is empty ("") as there is nothing to display. You should try a space (" ").
Also, not go practice to declare a new mx object like you did. First blog post referenced above shows how to do it properly.
from md_parola.
Related Issues (20)
- CP437 Font File HOT 1
- Scrolling text one time HOT 1
- Interrupt text effect in anytime HOT 3
- Use of MD_parola HOT 2
- [QUESTION] turn specific pixel on or off? HOT 2
- Remanant residual text on Double_Height on 2x19 matrix HOT 5
- How can I change HARDWARE_TYPE and MAX_DEVICES from the loop depending on some integer variables HOT 1
- Pixel errors and display reset HOT 1
- For UNO r4 minima is this lib ported ? or just works as it is HOT 1
- I want to use Hindi font. How can i use ? HOT 1
- Display Clear is not working HOT 2
- issue on P.displayAnimate() parola HOT 3
- avr/io.h HOT 1
- access the dot display buffer before animation ? HOT 4
- Software SPI not working on Arduino Nano ESP32 HOT 2
- Is there a way to access the framebuffer directly? HOT 1
- Show RtcDS3231.h time on Max7219 HOT 9
- Can't Grow Down A Font Character as One Character When Using 2 FC16 Modules HOT 8
- " 'MD_Parola.h' not found" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md_parola.