CodeBug Blog

News and stories from The CodeBug Team

CodeBug's expansion port

Last week we announced servo control with CodeBug, and briefly mentioned that you can now use the expansion port on CodeBug with the Blockly blocks. The main benefit is that it makes it really easy to connect loads of other components like sensors with jumper wires, header pins, and use CodeBug in a breadboard, without the need for soldering or an adapter board.

![CodeBug breadboard] ( "CodeBug breadboard")

As well as the leg connections, CodeBug has a black expansion connector with power, ground and another 4 input/outputs. These are perfect for plugging in jumper wires or header pins. Look out for the new tutorials which make use of them.

Start block expansion

You can enable the expansion header with the online Blockly interface by clicking the cog on the start block. In the window that appears, tick the box next to extension pins input/output. Click the cog again to close this window, and you will see drop down menus for the 4 extra legs appear in the start block. The expansion header pins are labelled on the back of CodeBug with the same labels in start block, so you know which pin you are controlling.

Enabling expansion header

A great example of using the expansion header like this is our lightsaber demo for May the fourth. The servo producing the movement and GlowBugs lighting up the saber were controlled by CodeBug connected through its expansion header.

CodeBug has always been about making programming and electronics easy, while also allowing users to improve their skills and used more advanced methods for creating things. CodeBug's legs are great for getting started, while the expansion port connections are intended for when your confidence and experience grows. Unlike CodeBug's legs, the expansion port connections are not touch sensitive (no weak pull up) and there is no current limiting resistor. As such, you need to take a bit more care as CodeBug won't be as protected against wiring mishaps!

Expansion port map

Have a go yourself at using the expansion port with the Servo activity or with this Movement sensing activity. Show us what you make with the expansion header on Twitter!

Back to top