In the second tutorial, Massimo Banzi will teach you how to build a vintage spaceship interface with the new Arduino Starter Kit. This project demonstrates how to use simple inputs and outputs with Arduino and how to control them by writing code.
This video is also an excellent starting point for people that know electronics, but have never used Arduino before, as Massimo introduces the basic concepts of wiring up sensors and controlling actuators via some very simple code uploaded to the Arduino board.
The “spaceship interface” is about the construction of a scenographic set consisting of a set of blinking LEDs, whose behaviour can be controlled through a button. Three LEDs and one button are connected to the Arduino board and some code is introduced to make the two red LEDs blink. When the button is pressed, the red LEDs are turned off and the green LED turns on. When the button is released, the two red LEDs go back to blinking mode.
The most interesting part of this project is the code, Massimo explains how to write instructions in the Arduino development environment and then upload them as a program onto the Arduino board. The Arduino can then be detached from the computer and execute the code independently, working as a standalone product.
You will learn how to define constants and variables. Constants are used to name the pins controlling the LEDs and the button switch. Massimo demonstrates how to write the basic setup code that is executed when the Arduino board is powered up or on reset and then explains how to write the main loop, within which you can put a code that keeps checking the state of the sensors and turns on the LEDs, by changing the values associated with the different Arduino pins.
Massimo also gives an overview of the if-statement, which is used to change the state of the circuit, turning off the red blinking LEDs and turning on the green LED. The delay() function is also introduced as a means to control the blinking delay.
This is also a great intro to simple electronics programming - without any complex software barriers - for people already familiar with electronics, but not with code. You can subscribe to more videos about Arduino here
Like this Leave a Comment