We start the project by visiting the CodeBug website http://www.codebug.co.uk and creating an account. It only takes a few minutes. While logged in, clock on Create to start a new project. Don't forget to save your work!
The interface for CodeBug contains an area to the right of the screen with is the primary programming interface. There are a series of menus that are used to store the blocks with can be dragged from the menus into the coding area. Good blocks are made to connect together, and that is what we intend to do!
Now that you have familiarized yourself with the interface, let's get started on a basic project.
What you need:
One of the primary design characteristics of the CodeBug (besides how adorable it is) is that it is made to be worn. Combine it's wearable and the 5X5 LED grid display is perfect for creating a scrolling name badge!
Let's start coding our Scrolling Name Badge and we begin at...well the start which is a pre-existing block in which the coding is ready to be built on! The Start block can be used to configure CodeBug when we run the emulation on the interface, for this project we will keep it as is.
For this block of code we are going to select the Scroll Sprite block from the Sprite Menu and connect it to the Start Block. This block will scroll the content to the left of the LED matrix. Since we will need something to scroll, let's also go ahead and use the Get String Sprite, also found on the Sprite Menu, and connect it to the Scroll Sprite block. The default text for the Scroll Sprite block is "Hello World", which we have replaced with "element14". Within the Scroll Sprite block you can change the rate of which the letter will scroll (we have is set at the default 100ms) or the direction of the scroll ( left,right,up, down).
From there you can run an emulator to see how the program would look on the CodeBug...
With the code working, click on Download, it's just under the simulator controls. When the code downloads, plug in a USB to micro USB into your computer. While holding Button A of your CodeBug also insert the micro USB to the CodeBug. The top left LED in the matrix on the CodeBug will flash. Your computer should also recognize the CodeBug as a USB drive on your computer. Copy the code downloaded from the CodeBug website to the USB drive and run the program by pressing Button B.
Make the badge wearable by inserting a battery into the holder on the back of the CodeBug and attaching to wherever you see fit
See more CodeBug projects and learn how you can get one of your own by visiting: 10 CodeBug Projects in 10 Days