CodeBug GlowBugs User manual

http://www.codebug.org.uk
Createyourownpersonalpatternandsequencebycreatingsimpleprogramsonline.
Learntheessentialsofcomputersciencewhilecreatingmesmerisinglightshows.
IdealforbringingeyecatchingcolourtoanyCodeBugcraftproject.
BeforeusinganyCodeBug™devicealwaysreadtheinstructionsandprecautions
carefully.
Product Highlights
Uses:
● Introductoryplatformforlearningprogrammingandelectronics
● Wearablesprojects

● Decorations
● IdealforTwitter,FacebookandMinecraftetc.notifications
● Digitalcrafts–createinteractivegreetingscards,decoractions,boardgamesand
more
Features:
● Simpleandquicktogetstarted–justpluginandprogram!
● 1RGB(RedGreenBlue)LEDperGlowBug
● EachLEDhas256brightnesslevelsforRed,GreenandBlueallowingfor16777216
differentcolours
● 6crocclippable&sewablelegsforconnectingtoCodeBug™andotherGlowBugs
● Draganddropprogrammingfromwebbrowser
● Onlinesupport,communityandeducationaltutorials
● Windows,MacandLinuxcompatible
● CanbetetheredwithCodeBug™tobecontrolledfromacomputerortablet
Technical Specifications:
● Power:5Vthroughpowerleg(fromCodeBug™poweredbyUSB)
● Approx39mmwidex47mmhigh
● PCBthickness1.7mm
GlowBugs technical diagram
Connecting GlowBugs
ToattachGlowBugstoCodeBug
TM
,attachacrocclipfromGNDonCodeBug
TM
toGNDon
theleftsideoftheGlowBug,repeatthisforPWRfromCodeBug
TM
tothe5Vontheleftside
oftheGlowBug.Thenconnectacrocclipfromleg3onCodeBug
TM
totheDATAINlegon

theGlowBug.YoucanconnectmoreGlowBugsbyconnectingtherightsideoftheprevious
GlowBugtotheleftsideofthenextGlowBug,asshowninthepicturebelow.
GlowBugs connected to CodeBug™ with croc‐clips

Simplified GlowBugs connection diagram

Programming CodeBug™ GlowBugs
GlowBugsarecontrolledusingCodeBug™,whichmeanstoturnalightonaGlowBug,you
needtocreateaprogramforCodeBug™.It’seasytoprogramCodeBug™throughthe
websitehttp://www.codebug.org.uk/create.Ifyou’veneverprogrammedCodeBug™before,
visitthegettingstartedtutorialonthewebsitetolearnmore.
Onthe‘createpage’,you’llalsofindanemulator,whichshowsonscreenwhatwillhappen
beforeyourunyourprogramonthephysicalCodeBug™.
Show the GlowBugs emulator
ToshowtheemulatedGlowBugs:
● Createanewprogramhttp://www.codebug.org.uk/create/codebug/new/
● ClicktheGreencoginthetoprightcorneroftheCodeBug™emulatorbox
Show the CodeBug™ emulator setting by clicking the cog (circled in red)
● Onthepopupthatappears,ticktheColourTailcheckboxandthenclickthe
GlowBugsx5orGlowBugsx10radiobuttons
● ClicktheApplybutton

Enable GlowBugs hardware
GlowBugs x 5 emulator; shows the colour each of the 5 lights will shine

Creating your first program
NowyouhaveemulatedGlowBugsdisplayedyouarereadytocreateyourCodeBug
TM
programtocontrolthelights.
ToturnalightonyouneedtotoaddablockfromtheColourTailmenu.Theseblocksneed
toknowthenumberofthelight(orpixel)youyouwanttocontrolandthecolouryouwantto
setit.TheGlowBugsarenumberedwiththeoneconnecteddirectlytoCodeBug
TM
startingat
zero .
1
Colour Tail block menu opened
TosetthecolourofoneoftheGlowBugpixels,youcanuseoneoftwoblocks:
ThesetcolourpixeltocolourblockallowsyoutospecifythecolourofaGlowBug,froma
paletteofcommoncolours.
set colour pixel to colour block with palette open
1http://www.howtogeek.com/149225/whydocomputerscountfromzero/or
https://en.wikipedia.org/wiki/Zerobased_numbering

Thesetcolourpixelblockallowsyoutospecifyhowred,greenandbluearemixed
together.Youcangetmorecoloursthanthoseshowninthepaletteanditalsomakesiteasy
foryoutousenumberorvariableblocksforeachofthe3componentcolours.
set colour pixel block

Sample Program
Here’sasampleprogramthatchanges5GlowBugsbetweenredandlimegreenin
sequence.
Sample GlowBugs program with the emulator showing what will happen
TransferyourprogramforcontrollingGlowBugsontoyourCodeBug™justasyouwouldany
otherontoyourCodeBug™program.RefertotheDownloadinstructions.
Whenreloadingprograms,toavoidhavingtounplugtheMicroUSBfromCodeBug™,
unplugtheendoftheMicroUSBcablethatplugsintoyourcomputer.

Powering GlowBugs by USB
CodeBug™andGlowBugscanbepoweredfrommost5VUSBpowersupplies,e.g.
computerUSBports,phonechargers,USBbatterypacksetc.
ThebrightfullcolourLEDsonGlowBugsrequiremorepowerthanCodeBug™(upto540mA
onfullwhitebrightness).AlwaysmakesureyouaredeliveringenoughpowertoCodeBug™
fortheGlowBugs.CoinbatterieswillnotworkwithGlowBugs;insteadwerecommendUSB
chargerpacksforportableuse.
Different ways of powering CodeBug™ and GlowBugs

Activities
Forfunthingstomakeanddoforallskilllevels,checkoutthevastnumberofengaging
CodeBug™GlowBugsactivitiesandwalkthroughguidesontheCodeBug™website.Visit
http://codebug.co.uk/learn/forideasandeasytofollowstepbystepinstructions.
Examples of GlowBugs activities available from http://www.codebug.org.uk

Warnings
● Chokinghazard.
● ChildrenshouldnotuseCodeBug™GlowBugswithoutadultsupervision.
● DonotpowerCodeBug™usingitslegs,USBand/orbatteryatthesametime.
● CodeBug™GlowBugsarenotintendedforuseinlifecriticalsystems.
● Donotexposetowater,moistureorextremesoftemperature.
● Takecarewhilsthandlingtoavoidmechanicalandelectricaldamagetothedevice
andconnectors.
● Takesuitableprecautionstominimiseriskofcausingdamagebyelectrostatic
discharge.
● Connectiontounapproveddevicesmayaffectcomplianceorresultindamagetothe
deviceandinvalidateanywarranty.
● ConnectionstoCodeBug™extensionsshouldonlybemadewiththepowersupply
disconnected.
● EnsurethatCodeBug™devicesarepoweredbyasuitablyratedpowersupplythat
complieswiththerelevantregulationsandstandardsapplicabletothecountryof
intendeduse.
● Itistheuser’sresponsibilitytoensureifthedeviceisfittedinasuitableenclosure
thatitoffersappropriateprotectiontoensuresafeandproperoperation.
Compliance Information
● ThisCodeBug™GlowBugdevicecomplieswiththerelevantprovisionoftheRoHS
DirectivefortheEuropeanUnion.IncommonwithallElectronicandElectrical
EquipmenttheCodeBug™deviceshouldnotbedisposedofinhouseholdwaste.
Alternativearrangementsmayapplyinotherjurisdictions.
● ItisaclassBproduct.EMCemissiontestswereperformedwithCodeBug™
poweredbybattery,andUSB.ESDhandlingprecautionsshouldbeobserved.
CodeBug™maybeconsideredacomponentifintegratedintoanotherproduct.Any
persondesigningordevelopingaproductthatusesoneormoreCodeBug™devices
isresponsibleforensuringcomplianceandthatanymodificationtotheCodeBug™
deviceorinterconnectionofotherelementsanddevicesdoesnotchange
compliance.
● ThisClassBdigitalapparatuscomplieswithCANICES3(B).Cetappareil
numériquedelaclasseBestconformeàlanormeNMB003duCanada.
● Thisdevicecomplieswithpart15oftheFCCRules.Operationissubjecttothe
followingtwoconditions:(1)Thisdevicemaynotcauseharmfulinterference,and(2)
thisdevicemustacceptanyinterferencereceived,includinginterferencethatmay
causeundesiredoperation.
http://www.codebug.co.uk
CodeBug™GlowBugisdesignedintheUKbyOpenLXSPLtd.RegisteredOfficeUnit7
SalmonFields,Royton,OldhamOL26HT.
CodeBug™isdistributedbyPremierFarnellUK,150ArmleyRoad,LeedsLS122QQ,UK

ManufacturedintheUKandPRC.
DesignedintheUK.
DocumentationRevision1.0August2015
RaspberryPiisaTrademarkoftheRaspberryPiFoundation.AllotherTrademarks
acknowledged.
Table of contents
Popular Microcontroller manuals by other brands

Texas Instruments
Texas Instruments Hercules RM48 user guide

PLX Technology
PLX Technology PCI 9056RDK-LITE Hardware reference manual

ST
ST STM32F7 Series Application notes

ST
ST STEVAL-MKBOXPRO user manual

NXP Semiconductors
NXP Semiconductors MC9S08QL8 MCU Series Reference manual

Texas Instruments
Texas Instruments MSP430G2231 user guide