Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rtc anders formuliert
es gilt, wenn NEXTION Rückseite Baterrie eingesetz wurde.
1.Erstelle 2 Stück Textfelder:
Klick auf "Text"
definieren unter Attribute:
-"type": 116
-"id": (wird automatisch erstellt)
Einstellungen: "type": 52 "id": (wird automatisch erstellt) "objektname": benenne es "timeString" "vscope": entweder "global für alle Seiten, oder "local" "sta": Number" "val": 1 2/2 Klick auf "Variable (X)"
Einstellungen: "type": 52 "id": (wird automatisch erstellt) "objektname": benenne es "cov" "vscope": "local" "sta": Number" "val": 1
2/3 Klick auf "Variable (X)" 9 mal, um 9 Stück "va" zu ehalten alle definieren unter "Atribute":
Einstellungen:
"type": 52
"id": (wird automatisch erstellt)
"objektname": "va0"
"vscope": "local"
"sta": "String"
das rest von Einstellungen zu ruhen lassen, wie sie sind... 2/3 für alle andere "va"-s genauso erstellen, nur "objektname" ändern, auf "va1","va2","va3"......"va8"
Unter "Timer Event" schreibe das hinein:
covx rtc3,va0.txt,2,0
covx rtc4,va1.txt,2,0
covx rtc5,va2.txt,2,0
va3.txt=va0.txt+":"+va1.txt+":"+va2.txt
covx rtc6,va4.txt,10,0
covx rtc2,va5.txt,2,0
covx rtc1,va6.txt,2,0
covx rtc0,va7.txt,4,0
if(rtc6==0)
{
va4.txt="Sonntag"
}else if(rtc6==1)
{
va4.txt="Montag"
}else if(rtc6==2)
{
va4.txt="Dienstag"
}else if(rtc6==3)
{
va4.txt="Mittwoch"
}else if(rtc6==4)
{
va4.txt="Donnerstag"
}else if(rtc6==5)
{
va4.txt="Freitag"
}else if(rtc6==6)
{
va4.txt="Samstag"
}
va8.txt=va4.txt+"-"+va5.txt+"-"+va6.txt+"-"+va7.txt if(va3.txt!=time.txt)
{
time.txt=va0.txt+":"+va1.txt+":"+va2.txt
}
if(va8.txt!=date.txt)
{
date.txt=va4.txt+"-"+va5.txt+"-"+va6.txt+"-"+va7.txt
}
Klick auf "Debug"
In deinem Textfeld wird die Zeit und Datum automatisch erstellt.
"Upload" oder mit Speicherkarte auf Nextion bringen