Current News

Moderator: Mmiscool

User avatar
By forlotto
#49064 Aha!

So this was likely the problem with the website code and tables as well!!!

The fella with the theromostat issues should try the latest version and see how he fairs with his tables!
User avatar
By Multifitter
#49084 Hi,
I don´t know if the problems with my ESP´s are caused by the Basic or by the hardware.
I have connected the ESP8266-01 via CP2102 to my USB-Port. RX/TX connected also for serial monitoring. Everything works fine except the "slow" output to Browser/SerialMonitor.
Slow means, that the serialprintln of a variable in my program takes approximately 1 second (including some calculations inside the loop).
Now it becomes strange...
If I boot up the ESP (disconnecting from USB and wait several seconds then connect), and run my program the first time it runs FAST! Fast means, a 20 to 30 times faster output and much more lines in the serial monitor. Tried this with 3 ESPs!
Is there a "slowmode" which I run? Or could it be a thermal problem, i noticed that the ESP´s are "hot", I think something around 50°C.
ESP is booting into AP-mode.

//EDIT
I got it!
If the Message appears "1 winsock connected 192.168.4.2" the ESP is slow as mentioned above!
After "1 winsock Disconnected!" (what causes this?) the ESP runs fast.
Could it be a Windows problem? I run Win7/64.
Yes, and it´s a thermal problem also, after some seconds "fullspeed", the ESP stops working and is going to boot again...
I ordered 10 pcs of ESP8266-12E, i hope that they are much more stable, i need them as AP for tests of Trilateration (Multilateration i guess^^ )
User avatar
By Mmiscool
#49093 The websockets will attwmpt to send informatiom to any browser that is connected.

There is a 60 second time out that if a browser is not connected it stops sending data to that browser. This may be part of your symptoms. Can you post some code that runs slowly?
User avatar
By Multifitter
#49138 Testprogram:
Code: Select all'program to run 3 different colored LED-stripes with different number of blinks and different freqency
'GUI and other stuff removed
'

cls

maxanzahlblinks =10

anzahlblinksrot = 6   '
delayblinksrot = 20
anzahlblinksgruen = 5
delayblinksgruen = 10
anzahlblinksblau = 4
delayblinksblau = 10

pinblau = 1   'LED
pinrot = 2
pingruen = 0

rotiston=0
blauiston=0

[top]


button "Lass mich blinken!", [blinkMe]
'button "Exit", [getMeOutOfHere]
wait


[blinkMe]

anzahlrot = anzahlblinksrot*2
anzahlblau = anzahlblinksblau*2

serialprintln "delayblinksrot=" & delayblinksrot
serialprintln "anzahlblinksrot=" & anzahlblinksrot

t = millis()   'millisekunden seit boot

do    'immer eine komplette sequenz von maximal 10 blinks*2 sekunden= Dauer 20 sekunden

m = millis()-t 'Millisekunden seit start

zeitscheiberot = int(m/delayblinksrot/100)   'timeslice for red LED
zeitscheibeblau = int(m/delayblinksblau/100)
roton = (zeitscheiberot % 2)   'ON and OFF
blauon = (zeitscheibeblau % 2)

if roton=0 then
   if rotiston=0 then  'flag to execute io only one time per cycle
     if zeitscheiberot<anzahlrot then
      rotiston=1
      'io(po,pinrot,1)
     end if
   end if
else
'   if rotiston=1 then
'       rotiston=0
'       'io(po,pinrot,0)
'   end if
end if


if blauon=0 then 
  if blauiston=0 then
   if zeitscheibeblau<anzahlblau then
      blauiston=1
      'io(po,pinblau,0)
   end if
  end if
else
   if blauiston=1 then
     blauiston=0
     'io(po,pinblau,1)
   end if
end if

serialprintln blauiston & "     "  & m  'shows approximately every 100ms at the serial monitor cause of delay

delay 100

loop until m>15000  'run 15 seconds

'io(po,pinrot,0)
'io(po,pinblau,1)

print "ENDE"
wait

First run, i got following expected output at serial monitor, approximately one per 100milliseconds (delay 100 in the code) plus some milliseconds executing calculations (doesn´t matter)
1 7
1 170
1 315
1 459
1 604
1 749
1 894
0 1038
0 1188
0 1333
0 1477
0 1624
0 1768
0 1914
1 2058
1 2213
1 2360
1 2506
and so on, every second the signal (first column) changes, second column is the time since do/loop starts. loop runs 15 seconds.

After hit the "blink me" button again (second run) following happens:
1 216
0 1637
1 2918
1 4354
0 5562
1 6820
1 8256
0 9464
0 10907