Embedded
Objectives
- Provide experience with embedded systems concepts that are central to IoT work:
- Basic I/O
- Complex I/O with Devices that have APIs (OLED, Temperature sensors, Servos)
- Handeling Time
- Event Driven Programming
Studios
Assignments
Module Goals
By the end of the Embedded module you should be able to answer the following questions:
- What is Ohm’s law?
- What is an LED?
- What is an RGB LED?
- How doe RGB LEDs work? (Both common anode and common cathode)
- What is a resistor?
- How does Ohm’s law relate to LEDs and microcontrollers?
- What is the
setup()
function typically used for? When and how often does it run?
- What is the
loop()
function used for? When/how does it run?
- What do
Timer
objects do and how are they used?
- What kinds of functions are available on the Photon for accessing the current time and date?
- How does the
Serial.print()
work?
- What is
Serial.begin()
and where/why is it used?
- What is Pulse-Width-Modulation?
- How does
analogWrite()
work?
- What does the
delay()
command do?
- What does the
millis()
command do?
- What are the
String
methods?
- What is a servo and what does it do?
- What are the methods of the
Servo
object available on the Photon/Arduino and how are they used?
- What are the distinctions between the major types of simple motors (Servos, DC motors)
- What are “pull” resistors and why are they used?
- What is a floating input and how might it behave?
- What is a “switch bounce”?
- What is a state machine? How/when/why are state machines useful?
And should be able to:
- Write a sketches that perform timed operations (both one-shot timers and repeating timers).
- Write a sketch that controls an RGB LED.
- Show the wiring needed for an RGB LED.
- Show the wiring needed for buttons.
- Write a sketch that debounces a button.
- Perform basic string operations.
- Use
print
and println
to debug the Photon.
- Use the
String
methods to parse input (for example, given a string that contains commas and numbers, like “255,255,123”).
- Implement a state machine from a description.
- Understand a state machine implementation and be able to create a state diagram from it.
- Read/create state diagrams.
And should be aware of:
- Basic structure of Arduino/Photon Programs.
- Basic use of state machines.
- Basic approach used to develop and deploy programs to the Photon.
- Where/how to access documentation for the functions available on the Photon.
- Basic concerns about voltage and current when working with microcontrollers.