What next
Try connecting an LED to CodeBug to light up when it senses motion, just like the security lights.
You could also try connecting a sounder to make a motion alarm. In your code you may want to put a check to see if the motion detector has been triggered and play a note until one of CodeBug’s buttons is pressed. Use it to detect intruders in your sweet cupboard or secret den!
How about connecting your CodeBug to a Raspberry Pi and triggering the Pi Camera to snap a photo of your intruders.