Pinterest Stumbleupon Whatsapp
Ads by Google

I’m an Arduino novice. I’ve used my starter kit What’s Included In An Arduino Starter Kit? [MakeUseOf Explains] 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 10 Great Arduino Projects for Beginners 10 Great Arduino Projects for Beginners Completing an Arduino project gives you a sense of satisfaction like no other. Most beginners aren't sure where to start though, and even beginner's projects can seem rather daunting. Read More while I was still fumbling through the instructions trying to make sense of it all.

What is Scratch 4 Arduino?

scratch-website-mit

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.

Ads by Google

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 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 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-4-android-code

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) 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: The Traffic Light Controller Arduino Programming For Beginners: The Traffic Light Controller Last week, we learnt about the basic structure of an Arduino program and took a closer look at the 'blink' example. Hopefully you took the opportunity to experiment with code, adjusting the timings. This time,... 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

  1. 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...

    Wkr

  2. 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?

  3. 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

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

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

  5. 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.

  6. 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?

Leave a Reply

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