B4R Question ESP8266 problem with start program

BaGRoS

Active Member
Licensed User
Longtime User
The program only works after uploading. When I turn the power off and on again, it does not start.

 

BaGRoS

Active Member
Licensed User
Longtime User
B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public Serial1 As Serial
    Private Timer1 As Timer
    Private led As Pin
    Private d1pins As D1Pins
   
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
   
    led.Initialize(d1pins.D4 , led.MODE_OUTPUT)
    Log("LED INIT")
       
    Timer1.Initialize("Timer1_Tick", 1000)
    Timer1.Enabled = True 'don't forget to enable it
   
End Sub

Private Sub Timer1_Tick
   
    led.DigitalWrite(Not(led.DigitalRead))

End Sub
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
I make more tests.
When I connected to computer then WeMOS nit blinking
BUT
when this same WeMOS is connected to external power supply, then working without problem.
 
Upvote 0
Top