In this way, we don't need to know what the single chip microcomputer has done, and we just need to connect wires. Actually, I can't use B4R. I tried to write a library for the first time. This library is incomplete and needs to be modified, but it is not clear what went wrong. My English is poor, so I have to rely on the browser to translate. Therefore, there are many incomprehensible places in the tutorial found.
B4X:
Sub Process_Globals
Public Serial1 As Serial
Dim myled As LED
Dim timer1 As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
myled.Initialize(13,True)
Log("AppStart")
timer1.Initialize("Timer1_Tick",100)
timer1.Enabled = True
End Sub
Private Sub Timer1_Tick
myled.on()
Delay(300)
myled.off()
Delay(300)
End Sub