LittleBits 'Softbits' for the Arduino

Related projects:
Softbits Live for Arduino
LittleBits Korg Synth Kit
LittleBits Midi Interface
LittleBits Arduino Synth Fun
LittleBits Broomstick Guitar
Broomstick MIDI guitar
Mouse Organ

LittleBits makes snap together modules. The modules use a simple 3 wire interface with magnetic snaps. The magnets are arranged so that an input and an output can be snapped together. The three wires are the two power supply wires, 0 volts (GND) and +5 volts (VCC). The third middle wire is the signal wire. Because of the magnets, if you try to connect two outputs together they push away from each other.

Starting with a power module (Blue) which only has an output, you can snap on any module that has an input. As you snap on more modules input to output, the modules form a chain. Some modules have extra input or outputs and when you snap modules on to these it starts to look more like a tree.

Softbits try to provide that snap together simplicity for Arduino programming. Softbits are arranged into chains that start with a power_on bit. After the power_on bit there can be any of the other softbits. The last softbit in a chain is normally the power_off bit. Here is a list of softbits.

This is a simple Softbits chain

power_on(1); input_a0(); output_a5(); power_off();

 

Some bits have two inputs. The second input will specify another chain to get the value from.

Using a bit that has two inputs such as the arith_plus bit.

power_on(1); input_a0(); power_off();
power_on(2); input_a1(); arith_plus(1); output_a5(); power_off();

The arith_plus bit is taking the value of chain 1 and adding it to the current value. The result of adding the a0 and a1 inputs is output to the d5 output as an analog value.

A full Softbits sketch looks like

	// A simple Softbits Demo
	#include "softbits.h"
	void setup()
	{
	  use_d5();
	  use_d9();
	  soft_setup();
	}

	void loop()
	{
	  power_on(1);
	  input_a0();
	  output_a5();
	  power_off();
	}

 

What it looks like in the Arduino IDEAs a circuit.

Writing complex programs on any platform can be daunting. Since LittleBits are targeted at kids and beginners, the programming bar for the Arduino is quite high. Simple programs that do basic input and output are easy to implement but tasks that Softbits have been developed for are things such as software envelope generators and Midi data processing to control kits such as the "LittleBits KORG Synth Kit".

The Softbits Demo is made up of 3 files that should be saved into a folder called softbits-demo.

softbits.ino
The main source code of the softbits.
softbits.h
This file is used to tell other source files what softbits are available.
softbits-demo.ino
A simple demo sketch that reads the a0 input, then it inverts it and outputs the value to the d5 output as an analog value. The demo sketch also reads the a1 input and outputs it to the d9 output as an analog value.

 
LittleBits logo
 
radioshack logo
 
Arduino logo