Check this post of mine:
I think I found out what was happening - the capacitance of the breadboards are wrecking the signals. See my other post on this: viewtopic.php?f=45&t=11446&p=54175#p54175
Hope this helps.
Regards to All.
- Albert Einstein
Explore... Chat... Share...
Moderator: Mmiscool
tft.setup(16, 4, 1)
tft.touch.setup(15)
spi.setfrequency(100000)
bar1 = tft.obj.bar("RPM",200,0,120,30, 2, 65535, tft.rgb(0,25,255))
bar2 = tft.obj.bar("TEMPERA",200,50,120,30, 2, 65535, tft.rgb(0,25,255))
bar3 = tft.obj.bar("VELOCID",200,100,120,30, 2, 65535, tft.rgb(0,25,255))
bar4 = tft.obj.bar("AIRFLOW",200,150,120,30, 2, 65535, tft.rgb(0,25,255))
bar5 = tft.obj.bar("POSITION",200,200,120,30, 2, 65535, tft.rgb(0,25,255))
tft.text.cursor(160,5)
tft.print("RPM")
tft.text.cursor(160,55)
tft.print("TMP")
tft.text.cursor(160,105)
tft.print("VEL")
tft.text.cursor(160,155)
tft.print("MAF")
tft.text.cursor(160,205)
tft.print("POS")
but1 = tft.obj.button("SEL", 5,90,150,70,4)
tft.obj.setlabel(but1,"0000")
Telnetbranch [obdii]
aaa = telnet.client.connect("192.168.1.111", 35000)
bbb = telnet.client.write("ATE0" & chr(13))
PID = 0
OPTION = 1
tft.obj.setvalue(bar1, 100)
Timer 250, [rpm]
touchbranch [touchme]
wait
[touchme]
touch_obj = tft.checktouch()
if touch_obj = but1 then
tft.obj.invert(but1)
OPTION = OPTION + 1
if OPTION = 6 then
OPTION = 1
end if
if OPTION = 1 then
tft.obj.setvalue(bar1, 100)
else
tft.obj.setvalue(bar1, 0)
end if
if OPTION = 2 then
tft.obj.setvalue(bar2, 100)
else
tft.obj.setvalue(bar2, 0)
end if
if OPTION = 3 then
tft.obj.setvalue(bar3, 100)
else
tft.obj.setvalue(bar3, 0)
end if
if OPTION = 4 then
tft.obj.setvalue(bar4, 100)
else
tft.obj.setvalue(bar4, 0)
end if
if OPTION = 5 then
tft.obj.setvalue(bar5, 100)
else
tft.obj.setvalue(bar5, 0)
end if
end if
return
[obdii]
tcp = telnet.client.read.str()
tam = len(tcp)
if tam = 16 or tam = 13 then
cmd = mid(tcp,6,2)
if cmd = "0C" then
tcp = hextoint(replace(mid(tcp,9,5)," ",""))
tcp = str(int(tcp / 4))
tft.obj.setlabel(bar1, tcp)
if OPTION = 1 then
tft.obj.setlabel(but1,tcp)
end if
end if
if cmd = "05" then
tcp = hextoint(replace(mid(tcp,9,5)," ",""))
tcp = str(int(tcp) - 40)
tft.obj.setlabel(bar2, tcp)
if OPTION = 2 then
tft.obj.setlabel(but1,tcp)
end if
end if
if cmd = "0D" then
tcp = hextoint(replace(mid(tcp,9,5)," ",""))
tcp = str(int(tcp))
tft.obj.setlabel(bar3, tcp)
if OPTION = 3 then
tft.obj.setlabel(but1,tcp)
end if
end if
if cmd = "10" then
tcp = hextoint(replace(mid(tcp,9,5)," ",""))
tcp = str(int(tcp / 100))
tft.obj.setlabel(bar4, tcp)
if OPTION = 4 then
tft.obj.setlabel(but1,tcp)
end if
end if
if cmd = "11" then
tcp = hextoint(replace(mid(tcp,9,5)," ",""))
tcp = str(int(tcp * 0.392156))
tft.obj.setlabel(bar5, tcp)
if OPTION = 5 then
tft.obj.setlabel(but1,tcp)
end if
end if
end if
wait
[rpm]
PID = PID + 1
if PID = 6 then
PID = 0
end if
if PID = 1 then
ccc = telnet.client.write("01 0C" & chr(13))
end if
if PID = 2 then
ccc = telnet.client.write("01 05" & chr(13))
end if
if PID = 3 then
ccc = telnet.client.write("01 0D" & chr(13))
end if
if PID = 4 then
ccc = telnet.client.write("01 10" & chr(13))
end if
if PID = 5 then
ccc = telnet.client.write("01 11" & chr(13))
end if
wait
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]