Other [SOLVED]Wifi Problem with LOLIN32 and B4R2.00 Beta...

rbghongade

Active Member
Licensed User
Longtime User
Dear friends,
Unfortunately I was not able to get this simple code to compile.
B4X:
Private Sub AppStart
    Serial1.Initialize(115200)
    Log("appstart")
   
    led.Initialize(5,led.MODE_OUTPUT)
   
    timer1.Initialize("timer1_Tick",500)
    led.DigitalWrite(True)
    If wifi.Connect2("SSID","password") Then
    timer1.Enabled=True
    Log("Waiting for connection.")
    Log("My ip: ", wifi.LocalIp)
    Else
        Log("Failed to connect to Wifi.")
    End If
   
End Sub

Sub timer1_tick
    Dim oldstate,newstate As Boolean
    oldstate=led.DigitalRead
    newstate=Not(oldstate)
    led.DigitalWrite(newstate)
   
End Sub

Here is the log dump (attached as text file):
(could not insert log output exceeds 5000 characters!)
 

Attachments

  • Log.txt
    74 KB · Views: 307

rbghongade

Active Member
Licensed User
Longtime User

Attachments

  • SCREENSHOT B4R SELECTOR.png
    SCREENSHOT B4R SELECTOR.png
    20.5 KB · Views: 283
Last edited:
Upvote 0

rbghongade

Active Member
Licensed User
Longtime User
Dear Erel,
It seems that I was using an older version of rESP8266.h. The new one contains #ifdef... for ESP32, but now the error is same except that "Wifi.h" is not found!

PS :Problem Solved: Simply updated the Arduino IDE to the latest version!
Thanks everyone, and apologies for wasting your valuable time!
 
Last edited:
Upvote 0
Top