• 1 Prelude
    • 1.1 What is a microcontroller
    • 1.2 Examples of what you can build and do
    • 1.3 What’s In The Can
    • 1.4 What’s On The Board
    • 1.5 Sensors & Extras Overview
  • 2 Getting Started
    • 2.1 Connecting To Snap
    • 2.2 Using Snap!
    • 2.3 Troubleshooting Connection
    • 2.4 Downloads
  • 3 Building The Robot
    • 3.1 Using Stepper Motors
    • 3.2 Using Servo Motors
    • 3.3 Assemble Shoni
    • 3.4 Programming the Robot
  • 4 Systems Thinking
    • 4.1 Circuits
    • 4.2 Binary Input/Output and Computers
    • 4.3 Blink An LED
    • 4.4 Button Input
  • 5 Getting Fancy
    • 5.1 Blink RGB
    • 5.2 Analog Input
    • 5.3 Light Sensor
    • 5.4 Pulse Width Modulation
    • 5.5 Breadboard & Wiring
  • 6 Sensors and Extras
    • 6.1 Potentiometer
    • 6.2 Ultrasonic distance
    • 6.3 Endstop Switch
    • 6.4 Force Sensitive Resistor
    • 6.5 Soil Humidity
    • 6.6 Temp/Humidity
    • 6.7 Relay
    • 6.8 Microphone
    • 6.9 Piezo Vibration
  • 7 Resources
    • 7.1 Final Frontier
    • 7.2 Using the Robot In A Can kit with the Arduino IDE
    • 7.3 More Resources…

Robot In A Can Guidebook

4.3 Blink An LED

Let’s use the computer to send a binary signal out of one of its GPIO pins. Here we can see we instruct GPIO pin number 4 to turn on, then wait one second, then turn off, wait one second in the off position, then the code repeats forever…

The electric signal would look like this:

Wire Like This

GPIO # 4 <–> R

Code Screenshots

Drag to the desired GPIO pin and then choose On or Off

Drag to the desired GPIO pin and then choose On or Off

Code for LED Blink, one second on, one second off, repeat

Code for LED Blink, one second on, one second off, repeat

Video Guide