DIY Programming

Afraid of Programming in Code? Try Scratch For Arduino

Bryan Clark 24-04-2015

I’m an Arduino novice. I’ve used my starter kit What’s Included In An Arduino Starter Kit? [MakeUseOf Explains] I have previously introduced the Arduino open-source hardware here on MakeUseOf, but you’re going need more than just the actual Arduino to build something out of it and actually get started. Arduino "starter kits" are... Read More for a few simplistic projects with my 12-year-old, but outside of that I haven’t ventured further due to my fear of code. Sure, I can knock out some HTML and CSS with the best of them, but when it comes to actual programming, I’m pretty useless.


Scratch 4 Arduino could just change that. It’s not coding; but it allows novices like me to build exciting Arduino projects with a visual interface. It’s not going to teach you how to how to program, but it does teach fundamental principles that are useful should you decide to progress to “real” programming. It’s simple, it’s fun, and my son made me look like the world’s biggest moron by picking up the syntax and usage of each block while I was still watching documentation videos, in Spanish (later I found some English tutorials that I’ll link up as we go).

In short, he was well on his way to building something useful 15 Great Arduino Projects for Beginners Interested in Arduino projects but not sure where to begin? These beginner projects will teach you how to get started. Read More while I was still fumbling through the instructions trying to make sense of it all.

What is Scratch 4 Arduino?


Scratch 4 Arduino – or S4A – is a modification of a visual code builder built by the Lifelong Kindergarten Group at MIT Media Lab. It’s a free interactive development environment that features visual blocks that you can drag and drop onto the script area to execute without ever having written a single line of code.

S4A allows you to use these blocks to handle just about any of the tasks the Arduino board can handle, such as managing sensors, actuators, servo motors, and the like. While it does have its limitations, if you’re a novice – like me – there isn’t much you’ll run into that S4A can’t handle.


What Makes it Different From Learning to Code?

One of the main problems when coding is the idea that you’re looking at a foreign language that doesn’t have any contextual meaning. Using the block format as opposed to writing code by hand accelerates learning immensely. My 12-year-old picked it up just by playing around with it while I was still watching the instructional videos.

Once you have S4A installed, and connected to your Arduino What is Arduino: Everything You Need to Know (In Video) What is an Arduino and why should you care? In this video, I attempt to answer that question, and more. Read More , changes you make are reflected on the Arduino immediately, as long as it remains connected to your laptop. Technically speaking, the code is not compiled and “uploaded” to the Arduino, rather it remains running on your machine with only the sensor data being pulled from and outputs going to the Arduino.

A Stepping Stone to Programming?

If you’re serious about creating amazing Arduino projects (like an Arduino laser turret Pew Pew! How To Build A Laser Turret With An Arduino Are you bored? Might as well build a laser turret. Read More ), you should definitely learn the intricacies of code at some point. In the mean time, S4A gives you an easy segue into programming by teaching you fundamentals that will transfer over, such as thinking creatively, systematically, and learning reasoning skills that are essential to programming.

In fact, schools all over the world are now integrating Scratch into their curriculum to teach children the fundamentals of programming.


Getting to Know S4A


Scratch currently works on Windows, Mac, Linux (Debian and Fedora 1.5) and Raspbian (Debian for RaspberryPi), so no matter how you intend to use it, chances are there’s a version for you. After downloading the Arduino environment and S4A, you’ll simply plug your Arduino in to the USB port on your computer, open the firmware file and select your board and firmware through the tools menu of the S4A interface.

From there, you can start dragging and dropping blocks into place and programming your Arduino Arduino Programming - Playing With Shift Registers (a.k.a Even More LEDs) Today I’ll attempt to teach you a little bit about Shift Registers. These are a fairly important part of Arduino programming, basically because they expand the number of outputs you can use, in exchange for... Read More .

Edit: It’s worth noting that while S4A worked admirably the first time I used it, the program was rather glitchy in subsequent attempts. At times it would just close itself, or was frustratingly laggy. I haven’t tested the platform on Windows or Linux, but on OS X, it was hit or miss. Let us know in the comments if you experience similar issues. 


Where to Start

The S4A website has several beginners projects, and while they’re not all that sexy to look at, they’ll certainly get your feet wet when it comes to creating code using Scratch. Once you’re finished with the on-page examples, the workshop materials download features several more projects as well as additional information on how to use Scratch to create code for your Arduino.

Simple projects, such as building a traffic light Arduino Programming for Beginners: Traffic Light Controller Project Tutorial Building an Arduino traffic light controller helps you develop basic coding skills! We get you started. Read More and toying with the code to adjust timing of a blinking LED will have you well on your way to learning the interface.

Where to Go From Here

From here, it’s all about putting the program to work for you. There are no right or wrong ways to use S4A and you’re really only limited by your imagination. If you want to learn more, the following video series does a great job of introducing S4A and showing you just what goes into creating usable code for your next Arduino project. Have fun!

Have you used S4A? What did you like or dislike about it? Do you think it’s a good alternative for the code-challenged techies out there (like me)? Let me know what you think in the comments below.


Image Credit: Script on Computer via Shutterstock

Related topics: Arduino, Programming, Scratch.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. ionic
    February 7, 2019 at 10:24 pm

    Yes, it's quite laggy on Mac as well.

  2. Russell
    January 28, 2018 at 3:56 pm

    So does the Arduino need to be plugged in while it is executing the command? or can the program be loaded to the Arduino and run without a cable (with a battery attached)

  3. Joel
    July 5, 2016 at 9:42 pm

    Hi there... I have an Arduino UNO, Scratch 4 A1.6 (S4A1.6)....I am wanting to know what is the starting blocks to all of it. From even getting the computer or the program to identify the arduino.

    I have 0 knowledge abour them but I try...


    • Randy Moore
      August 12, 2017 at 2:40 pm

      S4A refuses to recognize your Arduino Uno? You will need to install the Scratch 4 Arduino (S4A) "Firmware" (an Arduino C Sketch) into your Arduino Uno before S4A will recognize your board. This can be downloaded from the official S4A website (URL: There are instructions there on how to do that. Be aware that you will need the Arduino IDE installed on your system to compile and download the S4A "firmware" sketch to your Arduino Uno (or similar) board. Once downloaded you won't need the Arduino IDE (at least not for a while) and S4A should recognize your Arduino board and you should be able to run S4A example scripts w/o problems.

      However, on some Arduino boards (here I'm thinking "Arduino Nano"), you may also need to load a special Serial port driver program into Windows, especially if you are using Windows 7 or early releases of WIndows 8 (and perhaps if using a Mac OSX system). There are several different manufacturers for Arduino Nanos and they may use a different "UART-to-USB bridge chips" ("FTDI FT232R" or "WCH-340G"). The "WCH-340G" serial port driver is not included with earlier releases of Windows and Mac OSX. There are numerous articles on the Internet about this problem with download sites for getting the driver. This same problem affects the NodeMCU (an ESP8266 based MCU) and perhaps other brand MCU boards.

  4. Ayush Rai
    April 26, 2015 at 6:22 am

    Yeah, that makes sense. I wasn't too sure about CSS being logic-free. I have built applications for Windows 8 and they have XAML to declaratively specify the UI. XAML can have some logic built into it too, I guess the same goes for CSS3.

    • Bryan Clark
      May 5, 2015 at 12:15 am

      It's getting harder to differentiate between a coder and programmer, isn't it?

  5. Ayush Rai
    April 25, 2015 at 8:51 am

    Although I get that the terms 'programmer' and 'coder' are often used interchangeably, programming is definitely a superset of coding. One of the most important aspects of programming is the algorithm or logic, which is language agnostic. Coding one of the processes in programming where the algorithm is implemented or written down to become understandable by a machine.

    Similarly, markup languages differ from programming languages. Markup languages cannot be used to express an algorithm, they just specify the structure or format of the associated content they are 'marking up'.

    • Bryan Clark
      April 25, 2015 at 9:37 am

      Actually, I always thought of it the same way, HTML and CSS being programming languages. But now I'm actually siding toward Dragonmouth, as our lead programmer James Bruce made a good point about this (and I quote) - "CSS3 has both iteration and logic." That's valid, so I guess it really could be considered programming.

      Maybe we'll call it "programming lite." 0_o

  6. Kevin Dethlefs
    April 25, 2015 at 5:30 am

    Also, Android: - Scratch like... Good resources out there for many of you. Even Unreal Engine has a visual coding method called Blueprints.

  7. Kevin Dethlefs
    April 25, 2015 at 5:29 am
    • Bryan Clark
      May 2, 2015 at 9:42 am

      Because Scratch 4 Arduino is for... well... Arduino.

  8. dragonmouth
    April 24, 2015 at 6:27 pm

    "I can knock out some HTML and CSS with the best of them, but when it comes to actual programming, I’m pretty useless."
    FYI, HTML and CSS are "actual programming." If you are under the impression that "actual programming" must involve esoteric non-intuitive commands, byzantine convoluted syntax and take years to learn, then you are badly mistaken. There are many "actual programming" languages that differ very little from English. So don't sell yourself short. If you know HTML & CSS, you know programming.

    Having said that, I disagree with your assertion that S4A is a "stepping stone to programming." It is as much a stepping stone as building with LEGOs or Lincoln Logs is a stepping stone to house construction.

    • Bryan Clark
      April 24, 2015 at 6:40 pm

      I think an argument could be made that LEGO is a building block to house construction.

      Kidding aside, S4A won't teach you how to write code. What it will teach you is how to think like a programmer. Each function within the software is designed to behave like a code snippet, so while you never actually see it, you begin to understand things like critical thinking, debugging, and objective problem solving -- all of which are essential if you want to go on to program (in code) later.

      I appreciate the comment!

    • serpentson
      April 24, 2015 at 6:46 pm

      It seems that /you're/ badly mistaken. HTML and CSS are markup languages, NOT programming languages so technically you're not an actual programmer; at best you're a self-sufficient user interface designer. Actual programming involves at least some basic logic control (conditions, iterations, etc.) which neither HTML nor CSS have. That said, proficiency in markup design as a different skillset, which itself deserves its own and merit and still a huge reason not for anyone to sell themselves short.

      And then, arguing that S4A -> programming == LEGOs -> construction just doesn't make sense. S4A, to be honest, is already legitimate programming. You're mistaken if you think that "programming" equals "coding". In fact, programming has nothing to do with coding. Programming has to do with setting something up to follow a set of instructions or a specific order of logic. By that argument, making a simple Rube-Goldberg is programming. Turning the knobs on your wristwatch is programming.

      Sorry dragonmouth, seems like the fire your breathe has no heat at all.

    • Jay
      April 24, 2015 at 7:58 pm

      I totally agree with serpentson. Coding is about syntax. Programming is about logic. Every programming language has it owns quirks, but if your logic is trained, it's only a matter of syntax if you switch between programming languages.

      Btw, I really like the article. Let's see if my 6th year old son can create anything once I buy the Arduino :)

    • Bryan Clark
      April 24, 2015 at 8:44 pm

      I agree with both of you. I was always taught that HTML and CSS were markup, not programming languages. That said, I think the point Dragonmouth was trying to make was that it is its own skillset, even if it isn't necessarily programming.

      Also, Jay... I highly recommend you get the Arduino starter kit (about $50 on Amazon). My son and I have had a great deal of fun putting together simple projects with the included components. Shoot us some photos once you finish something cool!

    • dragonmouth
      April 24, 2015 at 10:10 pm

      Whether HTML and CSS are programming languages or markup languages is just a matter of opinion, so is the difference between "programming" and "coding." Having done both, I can tell you that the difference is imaginary and is used by people to assign more prestige to one or the other. I've had unscrupulous HR weenies try to belittle my experience by saying "oh, you only were a coder" or "oh, you only were a programmer" depending which job I was applying for. If somebody can come up with a clear cut difference between a "programmer" and a "coder" I would be much obliged.

    • Bryan Clark
      April 25, 2015 at 9:38 am

      Actually, after our lead developer (James Bruce) commented in our team Slack, I'm starting to side with you on this one Dragonmouth. From James - "CSS3 has both iteration and logic."

      So I suppose (at least technically) that you could call anyone that can write CSS3 a programmer. Right?