element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Small Codebug Project for Halloween
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 31 Oct 2016 7:48 PM Date Created
  • Views 899 views
  • Likes 3 likes
  • Comments 4 comments
  • codebug
  • blockly
  • sharethescare
  • javascript
  • pumpkin
  • halloween project
  • python3
Related
Recommended

Small Codebug Project for Halloween

Former Member
Former Member
31 Oct 2016

 

image

#ShareTheScare this Halloween

Visit our Halloween space and find out how to win one of two Cel Robox 3D Printers. There are two ways to win:

  • Build and document your past or present Halloween projects.
  • Tweet your best engineering spook with #ShareTheScare.
Share your Project and Win
#ShareTheScare Competition
The Ben Heck Show Episodes

 

In order to impress my granddaughter with the importance of computers, I decided to enhance the pumpkin she drew on this morning.  While she is napping, I carved the pumpkin and installed a Codebug SoC project that I completed (http://www.codebug.org.uk/create/codebug/13991/acapulco-gold/ ).  Blockly programming is fairly simple for old-enough-to-concentrate kids (not my granddaughter yet!) using the Blockly language and they can achieve quite a bit (future engineers!).  I do suggest checking out the aforementioned web domain.

 

Here is the Codebug next to my finger for size comparison:

image

Then,

  • I downloaded my program (acapulco-gold.cbg)
  • Loaded the Codebug with the program (copy + paste from Downloads folder to popped-up "codebug" folder - see web site for precise instructions)
  • Installed the CR2032 battery (so to run disconnected from USB)
  • Inserted the Codebug into the case I ordered to protect it from the elements (E.g. body sweat, pumpkin drippings)

Picture:

image

Just press button "A" (upper left) to start program and insert into pumpkin:

image

 

My substandard video of the effect indoors (it's not nighttime yet!):

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Blockly source code:

image

Equivalent Python (I've run it.  Yes, it functions just as well as Blockly.):

image

 

Anyone can develop in Python or Javascript with Codebug.  One bit of warning:  The Python-related preparation notes are incorrect as stated.  The following is a more useful set of instructions for preparing to develop in Python:

 

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3

### Manually, download https://bootstrap.pypa.io/get-pip.py to get pip3 source code.

sudo python3 get-pip.py
sudo pip3 install codebug_tether
sudo apt-get install python3-serial

 

If you then do the following, you should see no errors:

python3
>>> import codebug_tether
>>> codebug = codebug_tether.CodeBug()
>>> codebug.set_pixel(2, 2, 1)

 

Useful documentation:

CodeBug – Block Help

CodeBug – Transfering to CodeBug

CodeBug – Activity Raspberry Pi Controlled Codebug With I2C

CodeBug – Search  (see my set-up corrections above)

  • Sign in to reply

Top Comments

  • clem57
    clem57 over 8 years ago +1
    Happy Halloween To and family Clem PS Nice work also.
  • Former Member
    Former Member over 8 years ago in reply to clem57

    clem57 Thanks and Happy Halloween to the two you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 8 years ago

    Happy Halloween To and family

    Clem

    PS Nice work also.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to mcb1

    mcb1 Thanks.  The insubstantial MP4 is back there now.  I'll try to add another one when it gets dark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 8 years ago

    Nice.

    It's always great to introduce kids to electronics in amnanaer that perks their interest.

     

    I can't seem to play the video, but I have no doubt the effect is brilliant at night.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube