Divetens Value one one MAX7219 Display

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
spike318
New user
Posts: 2
Joined: 26 Apr 2024, 14:40

Divetens Value one one MAX7219 Display

#1 Post by spike318 » 26 Apr 2024, 14:47

Hi i've a max display and the hardware is working, but no i want differtent variables displayed on one display device,
I have 4 MQTT value's that i want to display every 5 seconds, this must be done by rules ?
mqttmax.png
mqttmax.png (26.06 KiB) Viewed 98 times
How can i create a rule to display these 4 value for 5 seconds.

User avatar
Ath
Normal user
Posts: 3544
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Divetens Value one one MAX7219 Display

#2 Post by Ath » 26 Apr 2024, 16:37

Something like this:

Code: Select all

on system#boot do
  LoopTimerSet,1,5 // Perpetual repeating timer
endon

on rules#timer=1 do
  let,1,%v1%+1
  if %v1% > 4
    let,1,1
  endif
  if %v1%=1
    DotMatrix,txt,1,"Value1: [MQTT#Value1]"
  elseif %v1%=2
    DotMatrix,txt,1,"Out 2: [MQTT#Value2]"
  elseif %v1%=3
    DotMatrix,txt,1,"Shed left: [MQTT#Value3]"
  elseif %v1%=4
    DotMatrix,txt,1,"Terras: [MQTT#Value4#D.1]" // 1 decimal
  endif
endon

You can adjust the prefixes accordingly, of course ;) and apply value formatting if desired.
/Ton (PayPal.me)

spike318
New user
Posts: 2
Joined: 26 Apr 2024, 14:40

Re: Divetens Value one one MAX7219 Display

#3 Post by spike318 » 26 Apr 2024, 17:40

Hey Thank you very much it solved my problem thankz

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest