Skip to content
  • There are no suggestions because the search field is empty.

Using littleBits with micro:bit

micro:bit is required for use and sold separately

Input Pins

The input pins P0, P1, and P2 transfer data from the littleBits circuit to the micro:bit. Normally, you would attach input bits (pink bits) to these pins. The micro:bit adapter is also powered through one of these pins.

  • Use input pins with the analog read or digital read blocks found under Advanced > Pins.

  • When using multiple inputs simultaneously, ensure all sensors are connected to a power source.

Output Pins

The output pins P13, P14, and P15 transfer data from the micro:bit to the littleBits circuit. Normally, you would attach output bits (green bits) to these pins.

  • Use output pins with the analog write or digital write blocks found under Advanced > Pins.

Analog vs. Digital

Think of digital like a standard ON-OFF light switch and analog like a dimmer switch:

  • Digital signals: Only ON (1) or OFF (0).

    • Digital write pins set output to 0 or 1.

    • Digital read pins return 0 or 1.

  • Analog signals: Can have a range of values.

    • Sensors return values from 0 to 99.

    • Analog write pins can output 0 to 1023.

    • Analog read pins return 0 to 1023.

  • To convert analog values from micro:bit to littleBits scale, divide by 10 to approximate the 0–99 range.

  • Values ≤ 40 correspond to digital 0; values ≥ 60 correspond to digital 1.

Recommended Pin Usage

Function Analog Read Digital Read Analog Write Digital Write
Accelerometer X      
Button   X    
Bar graph     X  
LED (any kind)       X
Bend sensor X      
Motion trigger   X    
Buzzer     X  
Wire to a sensor       X
Dimmer     X  
Remote trigger       X
DC motor     X  
Light sensor X      
Roller switch   X    
Fan     X  
Microphone X      
Slide switch   X    
Pressure sensor X      
Sound trigger   X    
IR transmitter     X  
Proximity sensor X      
Threshold   X    
Number       X
Pulse X      
Timeout   X    
Servo     X  
Bit random   X    
Toggle switch   X    
Speaker     X  
Slide dimmer     X  
Vibration motor     X  
Temperature sensor X      

Powering an Input

You can power an input on the micro:bit adapter from its output:

  1. Connect a wire from one of the output pins to a sensor, then to an input pin.

  2. In your program, use a digital write block set to 1 on the output pin.