Programming

We model our circuits and test snap-coding in Tinkercircuits before translating it to C++ and loading it into our micro-controllers:
arduino.cc

Programming unites the mechanical and the electrical, enabling mechatronics and robotics through control systems. By learning a computer language, we learn how a computer processes information and makes decisions based on a series of logical evaluations. It’s at this confluence of mathematics and language that we can develop a host of 21st-century business skills, especially creative and critical problem-solving.

In Tinkercircuits we introduce programming through code-blocks, a block-based graphical programming language also known as “snap” or “scratch” used for education. Code blocks serve as scaffolding, enabling students to advance their designs without requiring a rigorous coding background. It introduces the principles of structured programming while students learn to read and write in C++.

A sample block of snap code that moves a servo motor and lights an LED when loaded to the properly assembled Arduino circuit

We can combine the necessary components and then virtually load and test our code in the Tinkercircuits simulator. After proving the concept in our virtual environment, the snap code blocks are translated into C++ for loading onto an Arduino microprocessor.

The physical electronics are modeled in Tinkercircuits and the simulator will predict what problems you might encounter and if the code will work with your design

Our student interns have compiled a series of independently led activities to help implement code with basic electronics:

  1. Tinkercircuits supplement: Introduction to using Arduino, snap programming, LEDs, and servo motors in Tinkercircuits
  2. How to make a traffic light: use Tinkercircuits and snap coding to activate LEDs
  3. Activate LED with a pushbutton: use C++ text programming in Tinkercircuits
  4. Fading through the rainbow: use C++ text programming to control RGB LED in Tinkercircuits (here is a screen recording of the final result)

Here are some additional at-home tools and resources to help students from 5-8+ learn programming languages: