Created
          December 9, 2017 01:19 
        
      - 
      
 - 
        
Save hotpaw2/c1d497fd064993b77c560fb911e9ba31 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
hotpaw2 created this gist
Dec 9, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ 100 rem BLE peripheral button service emulation 102 rem for HotPaw Basic 1.7.7 , 2017-12 , by [email protected] 104 rem Provides the same button service as a TI SensorTag 106 rem Tap on the iPhone display to send a BLE notification 108 rem Enter any character to exit 110 rem 120 fn btle.init() 130 print "Initializing ..." 140 fn sleep(1) : fn sleep(1) 160 fn btle.name(1,"HotPaw Button Test") 180 fn btle.advertise(1,"FFE0","FFE1","0") 200 fn sleep(1) : fn sleep(1) 220 print "Starting BLE button service" 240 while (1) 250 fn sleep(0.05) 260 if fn mouse(0) <> 0 265 print "sending tap" 270 fn btle.update(1,str$(i)) 275 while fn mouse(0) <> 0 : fn sleep(0.05) : wend 280 endif 290 if len(inkey$ ) > 0 then exit while 300 wend 380 fn btle.advertise(-1) 390 print "Ending BLE peripheral services" 990 end