Comments (7)
The strrev() function (used to reverse the given string) is a built-in function in C and is defined in string.h header file, which is a standard header file for all C++ compilers.
Please check that you have string.h on your computer.
What development environment are you using?
from md_parola.
I work with the Arduino IDE 2.0.3.
from md_parola.
IDE 2.0.3 under Windows 10 with target Arduino Uno compiles cleanly on my system.
from md_parola.
I compile with a WEMOS D1 (esp8266).
The problem is, strrev is no standard C library function.
from md_parola.
I tried to reverse the Array by myself.
I changed BUF_SIZE to 7.
The Serialmonitor shows everything is ok, BUT
I don't understand, why is reverseMessage empty??????
And newMessage is an Array! Why can i print it so simple with Serial.print ???
If i skip the reverse action, the LCD works.
from md_parola.
Your reverse function is logically flawed. The string is generally not the size of the buffer (so you should use strlen() not BUF_SIZE) and you are not handling the terminating nul character properly in the reversal process. The standard strrev() does the reverse in the same buffer (ie, no additional memory required).
Here is the code for the strrev() function from the libraries:
void strrev(unsigned char *str)
{
int i;
int j;
unsigned char a;
unsigned int len = strlen((const char *)str);
for (i = 0, j = len - 1; i < j; i++, j--)
{
a = str[i];
str[i] = str[j];
str[j] = a;
}
}
Also, for future reference, please include text and not graphics when including code or debug output in your messages as these are easier to handle if we need to cut/paste for testing.
from md_parola.
Thanks.
I will try this.
from md_parola.
Related Issues (20)
- MD_Parola initialization fails after reboot HOT 29
- 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
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.