-
Notifications
You must be signed in to change notification settings - Fork 10
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
Not floating point display #8
Comments
I have the same issue too. It seemed to me that some displays either have the semi-colon or the dots, according to some research i did on the web. Did it work before the latest update? |
No, with the former version displaying "1.65" the result is "1 :65" with a blank between 1 and : (my display only have a semi-colon). Trying to display "12.65" results in "2 :65" |
I think that the problem is in file TM1637.h, line 77 and following. It is necessary to detect the dot character, then set dp in that position and not decrement position in buffer. |
I have had this issue before. Some displays don't let the user enable the dot led other don't let enable the colon (Google search). This is usually also mentioned somewhere on the purchase page. |
Yes, I agree, dot is eight bit in the display, that must be "or-ed" with the 7-segment code to display the digit and turn the dot on. |
About the "or"-ed part. Yeah i thought of it, but i found it nicer to have a separate spot for the dot entirely. I suppose i could change this during the next update. |
The problem, I think, is that a "." in the argument of display method is leaving a blank because expected variable is decremented anyway. |
I think i am misunderstanding you. Could you maybe implement what you are trying to tell me and submit a pull request if you have time? I still don't understand. |
Yes, the dot led should be turned on, but only the dot, not the others leds of the segments. |
I am more confused than ever. #include <TM1637.h>
TM1637 tm;
void setup()
{
tm.begin();
}
void loop()
{
tm.displayRawBytes({DisplayDigit().setDot()}, 1);
delay(5000);
} ? |
Ok. I will change it. |
Added. Can you test it? |
I tried and it works. I also checked with padding and offset. I think that you can close this issue :) |
Yup. Thanks. |
Hi, I am facing a similar issue, but with a screen with both dots and colon. The library uses a colon as a dot for decimals. The colonOff() won't work. I would like to know how to implement a solution, maybe one that specifies the type of screen (dot, colon, both) |
Interesting ... Does displaying floating point values with decimal digits work? |
|
A priori, i would say that the display from the link that you have provided doesn't support decimal digits (Even though they are physically present). |
That could be the case. |
Wow cool video. The program is working as expected. What did you mean with "it varies"? As far as i know the TM1637 can only either support the decimal LEDs or the Colon. (Had to learn the hard way. It is usually mentioned on the decription page of the display). One way to similate a dot/decimal LED, is to use a space: 1.23 => 1 23. Or 1.23 => 1_23 . |
"It varies" is part of a comment I deleted sorry! |
You could get the same display, just with dot support instead.
A hot fix would be to convert the values to string, modify them, then display. String convertValue(double value)
{
String val = value;
val.replace(".", "_");
return val;
}
then tm1637.display(convertValue(1.1));
Weird that the switch works if there is something displayed on the second digit. I will take a look at what is happening later. |
Typ => Original value => on Display pad => 1 => 1000 Try the example |
Thank you very much for your help. Now I have it clear what I can do and what not. I will do something as you describe to replace the dots (which clearly don't work by any means). |
Welcome.
I think so. Read the schematic of the TM1637. It can multiplex either the colon or the dots. Despite this, the display still comes with both, probably to save manufacturing costs. |
When displaying a floating point value (12.3456, f.e.), a blank digit is displayed instead of decimal point.
The text was updated successfully, but these errors were encountered: