Here is a tone function that does Arduino's tone()
The buzzer is connected between pin 6 and ground :
Code:
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Delay( 1000)
tone( 6 , 500, 500)
Delay( 100)
tone( 6 , 750, 500)
Delay( 100)
tone( 6 , 1000, 500)
Delay( 100)
tone( 6 , 1500, 500)
End Sub
Sub tone(Pin As Byte, freq As Int, duration As ULong)
Dim sound As Pin
sound.Initialize(Pin,sound.MODE_OUTPUT)
Dim d As ULong =...
from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/1NZCGyQ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire