Go Down

Topic: question about sevseg library (Read 281 times) previous topic - next topic

wilykat

I wanted to make something that uses 4 digits 7 segment display and it will alternate between clock and temperature.  I didn't see it at a glance but will the library support the degree by using segment a, b, f, and g when display temp in F, and segment d, e, and g when displaying in C?  Or is there a different library suited to this?

septillion

Yes, but not all that easy because setSegments() only supports setting all segments :/ W

But why not print a C or a F? Instead of a C and a degree symbol?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

PaulRB

#2
Jan 19, 2018, 04:08 pm Last Edit: Jan 19, 2018, 04:15 pm by PaulRB
...degree ...when displaying in C?
Just to let you know, it is considered a little old-fashioned to display temperature as, for example "28°C" meaning "28 degrees Centigrade". It is more usual these days to show "28C" meaning "28 Celsius". With "Celsius", you do not need to say "degrees".

wilykat

Er that's not what I meant, beside that wasn't how the signs of 1970s displayed.  I made a quick GIF to explain what I was going to display:

The degree symbol is for F only and the lower case c is for C only.

(eventually I'll move to using several warm white LEDs for a segment to simulate the old sign look using light bulbs, this will require transistor driver)

I looked inside sevseg.cpp and all the info is quite well documented and it has nearly all of alphabet. Since 7 segment alphabet looks awful (we have 14 and 16 segments plus LCD is cheap and easier to use anyway) I can just remove most of the unneeded alphabets, change the C to a lower case style, and add degree symbo: B01111000

bloodnok_vc

it is considered a little old-fashioned
By whom?

With "Celsius", you do not need to say "degrees".
I'd be very keen to see an authoritative reference for that. (Not that I disagree: I've not used a degree symbol for ages, and it just takes up a screen slot for nothing, but I wonder if you're not thinking of Kelvin, where "degrees" (neither the word nor the symbol) was never required?)


PaulRB

#5
Jan 20, 2018, 11:18 am Last Edit: Jan 20, 2018, 11:20 am by PaulRB
I could not find an authoritive reference, I must admit. But I'm pretty sure I remember being told that by university lecturers and research assistants, and that was 30 years ago.

@wilykat, if your display shows only "12°", how will people know if that is C or F? The next screen in your animation is clearly in C, but they might only glance at the display for a moment and not see that.

Delta_G

#6
Jan 20, 2018, 09:17 pm Last Edit: Jan 20, 2018, 09:18 pm by Delta_G
I could not find an authoritive reference, I must admit. But I'm pretty sure I remember being told that by university lecturers and research assistants, and that was 30 years ago.

It's Kelvin where you don't need to say degrees.  It has to do with the difference in the way the units are defined.  With C and F you have two digits defined on the scale by some physical property and the units are degrees of change between those two points (percentages if you think about it).   With Kelvin things are defined differently.  There you actually have a 0 point at a 0 quantity at absolute zero instead of 0 being defined for some arbitrary point and you have a unit size defined.  So that is more of a "pure" unit like meters or grams. 
|| | ||| | || | ||  ~Woodstock

Go Up