Connecting littleBits to Scratch 2.0

Hi everyone,

I put together a simple extension that allows you to program the littleBits Arduino bit using Scratch 2.0!

If you’re not sure what Scratch is, here is a description from

With Scratch, you can program your own interactive stories, games, and animations — and share your creations with others in the online community.
Scratch helps young people learn to think creatively, reason systematically, and work collaboratively — essential skills for life in the 21st century.
Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab. It is provided free of charge.


  1. Install the Scratch Browser Plugin
    Windows & Mac only. Sorry Linux users, I feel your pain

  2. Attach a power bit to the Arduino bit

  3. Connect the Arduino bit to the computer via USB cable

  4. Turn on the power bit

  5. Upload the littleBits_Scratch_Extension.ino using the Arduino IDE
    Full Arduino Bit Instructions here

  6. Download the Scratch 2.0 Base Project

  7. Create a new Scratch 2.0 project, click the File menu, then click Upload from your computer

  8. Choose the littleBits_Base_Project.sb2 you downloaded in step 5

  9. Now you can access the littleBit blocks in the “More Blocks” tab


General overview Installation method no longer valid. Refer to the instructions above.

Detailed setup and basic usage guide Installation method no longer valid. Refer to the instructions above.

Simple example project - Windmill Simulation

Source Code

Follow me on Twitter @khanning88


This is awesome, thanks for putting the effot. Can you provide us with a version of the extensions for the Offline version of Scratch 2.0?

Happy to work on it!

I’m currently working on a technology integration project with a K-5 school. We’ve integrated both Scratch and littleBits, and I thought this would be a great way to get our younger students into actually programming their littleBit creations!

The Scratch team will be releasing an updated version of offline Scratch 2.0 that supports the JavaScript extensions. Hopefully we see the new version within the next couple of weeks!

I’m a teacher working with some grade 5/6 students on a project too and hoping to complement it with programming also. Will keep my eyes out for the update. :smile: Thanks!

I updated the instructions today to reflect the changes to Scratch 2.0.

There’s still no support for JavaScript extension on the offline version of Scratch 2.0 unfortunately.

Awesome update @khanning! We’re definitely excited view the combination of littleBits and Scratch!

Does Scratch allow you to program the Arduino bit as a stand alone or must the bit be connected to a computer for it work? If so, is there a “scratch like” program that lets you program the Arduino as a stand alone?

The Scratch extension is not capable of programming the Arduino. Scratch needs to be connected through USB for the extension to work. The purpose of this extension is to extend Scratch projects to the physical world using littleBits or to introduce Arduino concepts with a programming language young students are familiar with.

I have not found a suitable “scratch like” program that allows you to program an Arduino. I actually started prototyping one just last week. It will be a rather large project, but it’s good to know that there is some interest for a block style Arduino IDE.

I think it would be a natural thing to do and a great contribution if you are able. You might check out this link and give us your thoughts:

This looks really interesting. I’m not a huge fan of the UI, but it seems to accomplish exactly what we were looking for.


This is really great. We’ve been working on a very full-featured Scratch extension for Scratch 2.0. While doing that we put together a modification of the Scratch for Arduino Project (S4A: It uses a specially modified version of Scratch 1.4. We modified their code so that you can use it with the littleBits Arduino Module directly (you don’t have to emulate anything else).Stay tuned for our Scratch 2.0 extension, but in the meantime try out our “Alpha” work, and if you have any questions about it, just ask us for help on the littleBits Arduino forum.

Oh yeah, and it seems Kreg you’ve decided to host a Google Hangout about Scratch 2.0. Can’t wait to see you there.

1 Like


That sounds great. So there will be an official littleBits Scratch 2.0 extension eventually?

I’m working with the Scratch team to create an official Arduino extension for Scratch 2.0. I would love to chat with you guys to see the blocks and wording you’ve decided on. The goal for us was to keep things as consistent as possible with the existing Scratch blocks.

Really excited to run across this. I run a CoderDojo that focuses on Scratch and just recently picked up some littlebits to use to start exposing the kids to hardware. I was expecting to have to figure out the integration of the two on my own. Nice to see it already being done!

Very cool. Thanks for doing this. I thought I had purchased all the bits I needed for my class, but now it looks as though I’m going to have to pick up some Arduino bits! :smile:


I was able to get your extension running in Scratch 2. It works great! I have a slide dimmer on a1 moving the cat back and forth which works fine. When I add a button to a0 to have the cat meow when the button is pressed as well, the digital read always seems to be false (even when the button is pressed). Perhaps, I’m doing something wrong. I tried using an if block with wrapped in forever and also tried the hat block (when a0 = HIGH). Thanks again for such a great extension.

@mattgalvin and @ichowmille,
Thank you for your encouragement. I would love to see some of the projects your students end up creating with Scratch!

The modules that only have an on/off state like the push button have to have power running through them. Try connecting the power module directly to the push button and test again.

Something like the fork module is handy for this. It would let you route power to three different input modules connected to the Arduino bit.

@kreg Thanks for the tips. I recall now that you mentioned that during the hangout. I’ll try it again later and let you know how it goes. The kids already had lots of fun using the slide dimmer as input for their Scratch projects.

One quick question (probably just littleBits in general) – would you know why the standard know dimmer doesn’t seem to produce the same output range as the slide dimmer? When testing in Scratch, the knob dimmer doesn’t even break 100 and the slide dimmer reaches all the way to 245. Thanks.

@khanning Hello! I am trying Scratch for the first time today. I uploaded your .sb2 file to the online project editor. Do I understand correctly that plugin download is no longer necessary or supported? I installed the littleBits_Scratch_Extension.ino to the Arduino, but I can’t make my leds on d1, d5 or d9 light up. I can make the cat move, so that’s progress. Any pointers for a Scratch noob?

I haven’t noticed this behavior. I wonder if there’s different version of the modules? I’ll try to test this today and get back to you.

Thank you! I forgot to include that step above. The Scratch Browser Plugin IS required and is now step 1 in the instructions. Let me know if you have any trouble getting it working!

Thanks for your reply! I downloaded the plugin and ran it from my desktop. The installer was fast. However I don’t see a Scratch file installed anywhere on my computer. Is there an executable or other file name I can search for on my computer?