Day 3 – Lost in Space

DIP (Dual Inline Package) switch:

3 switches:

-On or Off

-1 or 0

-True or False

-Yes or No

Conditional Logic:

-IF (Primary decision making tool in code)

-ELSE IF (Says to move on to the next condition); always follows and IF or another ELSE IF

-ELSE (Runs if all else fails); if nothing else (IF or ELSE IF) to run, do this

Ground or GND:

-Zero voltage reference

-Provides a path for electricity’s return

Voltage or VCC:

-Voltage at the common collector

-The power-supply source; the ‘engine’

Pull down resistor (the second resistor on board):

-Makes sure circuit behaves properly when switch is off

Inputs:

-A message from HERO board

-Something from sensors, buttons, switches

-For this project, the DIP switch is the Input

Outputs:

-Signals sent out from HERO board

-Could be triggered by code conditions or other sensor readings

-For this project, the LED is the output

Working with DIP switch for project:

-When DIP Switch = ON, ‘DigitalWrite’ is executed, turning LED ‘ON’ or ‘HIGH’

-When DIP Switch = OFF, the ‘else’ block is executed instead, grounding the LED circuit

= or == signs:

= is for assignment

== is for comparison

This entry was posted in Microcontrollers and tagged , . Bookmark the permalink.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.