Comments on: NodeMCU Lesson 14 — 4-Digit 7 Segment LED Display & MQTT https://osoyoo.com/2017/05/21/nodemcu-lesson-14-4-digit-7-segment-led-display-mqtt/ Project Tutorial for Arduino compatible products Mon, 03 Jul 2023 06:57:55 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: DonOKetty https://osoyoo.com/2017/05/21/nodemcu-lesson-14-4-digit-7-segment-led-display-mqtt/comment-page-1/#comment-1472 Fri, 12 Jun 2020 23:22:03 +0000 https://osoyoo.com/?p=5751#comment-1472 I would like to display an MQTT message that has a decimal point in it, for example 3.3 or 19.1

I note that the TM1637Display library has showNumberDecEx() as another display setting which should support this, but I cannot make this work – I can make it show the colon, but the value of the MQTT reading is always truncated at the decimal, eg. 3.3 comes out as 3, 19.1 comes out as 19

I also cannot position the start segment of the number – the value “The position least significant digit” means nothing to me!

Can anyone suggest a code modification that uses that display setting and will show an MQTT value of this nature, with the value either side of the colon representing the decimal point? Thanks!

]]>