User Tools

Site Tools


plugins:bbc_microbit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
plugins:bbc_microbit [2016/10/23 19:35]
madlyr Added MicroBitCtrl methods and usage
plugins:bbc_microbit [2016/12/24 07:08]
stevegarman [Getting Started] pairing
Line 7: Line 7:
 //:!: Please make sure you have the Espruino firmware file installed on your micro:bit before trying to use this plugin. See [[http://www.microbit-js.org]] for more details.// //:!: Please make sure you have the Espruino firmware file installed on your micro:bit before trying to use this plugin. See [[http://www.microbit-js.org]] for more details.//
  
-//:!: You have to install the plugin over the plugin section within DroidScript//+//:!: You have to install the plugin from the plugin section within DroidScript// 
 + 
 +//:!: In order to use this plugin, the micro:bit must not be paired with your Android phone or tablet. // 
 +If you have paired it by mistake, go into the Bluetooth settings of the Android device and choose **forget** from the settings// 
  
 =====Using the BBC micro:bit Plugin===== =====Using the BBC micro:bit Plugin=====
Line 19: Line 23:
  
 ===== MicroBit Methods ===== ===== MicroBit Methods =====
-^ Method ^ Description ^ +^ Method                                                                             ^ Description                                     
-| [[microbit_analogread|AnalogRead( pin )]] | | +| [[microbit_analogread|AnalogRead( pin )]]                                                                                          
-| [[microbit_connect|Connect( address )]] | | +| [[microbit_connect|Connect( address )]]                                                                                            
-| [[microbit_createcontroller|CreateController( size )]] | | +| [[microbit_createcontroller|CreateController( size )]]                                                                             
-| [[microbit_disconnect|Disconnect()]] | | +| [[microbit_disconnect|Disconnect()]]                                                                                               
-| [[microbit_getimage|GetImage()]] | | +| [[microbit_getimage|GetImage()]]                                                   Returns full path to micro:bit top view image.  
-| [[microbit_getversion|GetVersion( num, txt )]] | | +| [[microbit_getversion|GetVersion( num, txt )]]                                                                                     
-| [[microbit_oncancel|OnCancel()]] | | +| [[microbit_oncancel|OnCancel()]]                                                                                                   
-| [[microbit_onconnect|OnConnect()]] | | +| [[microbit_onconnect|OnConnect()]]                                                                                                 
-| [[microbit_ondevice|OnDevice( name, address, bonded, rssi )]] | | +| [[microbit_ondevice|OnDevice( name, address, bonded, rssi )]]                                                                      
-| [[microbit_ondisconnect|OnDisconnect()]] | | +| [[microbit_ondisconnect|OnDisconnect()]]                                                                                           
-| [[microbit_onreceive|OnReceive( data )]] | | +| [[microbit_onreceive|OnReceive( data )]]                                                                                           
-| [[microbit_onselect|OnSelect( title, body )]] | | +| [[microbit_onselect|OnSelect( title, body )]]                                                                                      
-| [[microbit_reset|Reset()]] | | +| [[microbit_reset|Reset()]]                                                                                                         
-| [[microbit_save|Save()]] | | +| [[microbit_save|Save()]]                                                                                                           
-| [[microbit_scan|Scan( address )]] | | +| [[microbit_scan|Scan( address )]]                                                                                                  
-| [[microbit_scrolltext|ScrollText( text, interval )]] | | +| [[microbit_scrolltext|ScrollText( text, interval )]]                                                                               
-| [[microbit_send|Send( msg )]] | | +| [[microbit_send|Send( msg )]]                                                                                                      
-| [[microbit_sendcode|SendCode( code )]] | | +| [[microbit_sendcode|SendCode( code )]]                                                                                             
-| [[microbit_setleds|SetLEDs( bits )]] | | +| [[microbit_setleds|SetLEDs( bits )]]                                                                                               
-| [[microbit_setonbutton|SetOnButton( callback )]] | | +| [[microbit_setonbutton|SetOnButton( callback )]]                                                                                   
-| [[microbit_setonconnect|SetOnConnect( callback )]] | | +| [[microbit_setonconnect|SetOnConnect( callback )]]                                                                                 
-| [[microbit_setondevice|SetOnDevice( callback )]] | | +| [[microbit_setondevice|SetOnDevice( callback )]]                                                                                   
-| [[microbit_setondisconnect|SetOnDisconnect( callback )]] | | +| [[microbit_setondisconnect|SetOnDisconnect( callback )]]                                                                           
-| [[microbit_setonevent|SetOnEvent( callback )]] | | +| [[microbit_setonevent|SetOnEvent( callback )]]                                                                                     
-| [[microbit_setonmotion|SetOnMotion( callback )]] | | +| [[microbit_setonmotion|SetOnMotion( callback )]]                                                                                   
-| [[microbit_setonreceive|SetOnReceive( callback )]] | | +| [[microbit_setonreceive|SetOnReceive( callback )]]                                                                                 
-| [[microbit_setontemp|SetOnTemp( callback )]] | | +| [[microbit_setontemp|SetOnTemp( callback )]]                                                                                       
-| [[microbit_setsplitmode|SetSplitMode( mode, p1, p2 )]] | | +| [[microbit_setsplitmode|SetSplitMode( mode, p1, p2 )]]                                                                             
-| [[microbit_startscan|StartScan()]] | | +| [[microbit_startscan|StartScan()]]                                                                                                 
-| [[microbit_stopscan|StopScan()]] | | +| [[microbit_stopscan|StopScan()]]                                                                                                   
-| [[microbit_watchaccelerometer|WatchAccelerometer( precision, interval, cancel )]] | | +| [[microbit_watchaccelerometer|WatchAccelerometer( precision, interval, cancel )]]                                                  
-| [[microbit_watchbutton|WatchButton( name, cancel )]] | | +| [[microbit_watchbutton|WatchButton( name, cancel )]]                                                                               
-| [[microbit_watchinput|WatchInput( pin, cancel )]] | |+| [[microbit_watchinput|WatchInput( pin, cancel )]]                                                                                  |
  
  
 ===== Using MicroBitCtrl Control ===== ===== Using MicroBitCtrl Control =====
 +
 +This control shows micro:bit image which shows interactive LED array and Bluetooth indicator.
  
 In order to use the MicroBitCtrl control, you must first load the plugin and initialize MicroBit object: In order to use the MicroBitCtrl control, you must first load the plugin and initialize MicroBit object:
Line 117: Line 123:
  
 ===== MicroBitCtrl Methods ===== ===== MicroBitCtrl Methods =====
-| [[microbitctrl_clear|Clear()]] | | +| [[microbitctrl_clear|Clear()]] | Clears LEDs to gray color. 
-| [[microbitctrl_sendledstates|SendLEDStates()]] | Sends new LED states to micro:bit | +| [[microbitctrl_sendledstates|SendLEDStates()]] | Sends new LED states to micro:bit
-| [[microbitctrl_setbluetoothstate|SetBluetoothState( connected )]] | | +| [[microbitctrl_setbluetoothstate|SetBluetoothState( connected )]] | If connected is true, then function sets Bluetooth indicator in blue color, if false, in gray color. 
-| [[microbitctrl_setled|SetLED( x, y )]] | | +| [[microbitctrl_setled|SetLED( x, y )]] | Sets LED in x and y position (range 0..4). It sets LED in red color. 
-| [[microbitctrl_toggleled|ToggleLED( x, y )]] | | +| [[microbitctrl_toggleled|ToggleLED( x, y )]] | Toggles LED in x and y position (range 0..4). It sets LED in red or gray color. 
-| [[microbitctrl_imgtouch_ontouch|imgTouch_OnTouch( ev )]] | |+| [[microbitctrl_imgtouch_ontouch|imgTouch_OnTouch( ev )]] | Custom LED array touch handler. |
  
  
plugins/bbc_microbit.txt · Last modified: 2019/03/04 16:22 (external edit)