Emerging Tech 1

Bruce Norton

our sites

internet of things exercises & projects

Capiskills


Arduino Intro

For this unit we will be solving real-world problems (or just making things more convenient) using the internet-of-things. Specifically we'll be using Arduinos and coding in C++ (cee plus, plus). Here are some things we'll do:

  • create electronic circuits
  • program an Arduino to read inputs and write outputs to perform tasks for us
  • connect and control sensors and devices
  • become part of a community of makers, inventors, problem-solvers.
  • Read more about the Arduino from the source.
Arduino: an open-source electronics platform based on easy-to-use hardware and software. It's intended for anyone making interactive projects.

Arduino Resources

Here are some valuable resources to get started:


Capiskills are life skills

our industry partners stress the need for life skills

Alongside our IoT project, we'll be focussing on developing at least 1 area of life skills.

  • VA.1 Creating Design Projects
  • NGE.1 Design Solutions
  • plus:
    • HOS.1 Manage My Work and Set Goals
    • HOS.2 Build Networks
    • NGE.3 Collaborate Effectively
    • PD.3 Demonstrate Social Skills and Awareness
    • NGE.2 Present to an Audience
  • See the Capyskills Grids

    Capiskills

    Choose a competency, evaluate your level and give evidence to support your self-evaluation. Do this in 3 short paragraphs

    • which Capiskill did you choose? Why?
    • which level are you at & what do you need to work on to improve
    • provide evidence to support your self-evaluation
    • bonus: comment on Capiskills & the project to help us improve.

    Please fill out this survey form on Capiskills.


    project 4: IoT project

    Create an IoT project that solves a problem, makes life easier or just entertains us.

    Focus on the process, describing your project. On your site add short sections for the following:

    Take photos & videos. Share your code.

    sensors

    Download code from Instructables (or from my libary)

    Hobbytronics documentation

    image of 37 arduino sensors
    sensors

    option 4.7: photoresistors

    Optional exercises may be good for practice or help you with your project.

    • photoresistors
    • led lights
    • resistors
    start simple, 1 resistor, 1 led
    once that works repeat 2x
    bonus image
    option 4.7

    option 4.8 motor

    Control a motor via a transitor. Based on project 9.

    • motor
    • Mosfet transistor
    • ignition switch
    • diode (one-direction)
    • resistor
    4.8 vroom vroom vroom

    option 4.9 lcd screen

    Write to an LCD screen. Based on project 11.

    • lcd screen
    • magic switch
    • potentiometer
    • resistor
    • lots of wire connectors!!
    4.9 time to chat
    4.9 more wires

    option 4.10 display temperature on the lcd screen

    Measure the temperature. Write to an LCD screen.

    • lcd screen
    • temperature sensors
    • potentiometer
    • resistor
    • lots of wire connectors!!
    4.10 what's the weather like
    4.10 what's the weather like

    4.4 RGB Potentiometer

    Control an RGB light with potentiometers for R, G & B

    • 4-pin RGB LED light
    • 3 potentiometers
    • 3 capacitors
    • resistor
    4.4 control rgb light with potentiometer

    4.5 piezo potentiometer

    make a piezo sing with a potentiometer

    • piezo (hockey puck kinda thingy)
    • potentiometer
    • capacitor
    • resistor
    4.5 make some noise with a piezo

    4.6 servo potentiometer

    control a servo (180ยบ motor) with a pot

    • servo motor
    • potentiometer
    • capacitor
    • resistor
    4.6 let's move the needle
    4.6 code on IoT Cloud

    ex 4.1 let there be light

    Create a circuit that lights up an LED. You will need the following:

    • arduino & breadboard
    • led light
    • 220 ohm resistor
    • wire connections

    Wire up your board like as seen in the image. When you plug in the USB, the LED light should appear.

    questions??

    • What do the + and - indicate?
    • What does the resistor do?
    • Does it matter if we swap the resistor and wire?

    Take a photo of your board to post to your site. Add heading & figcaption.

    ex 4.1 light circuit

    ex 4.2 you are in control

    Add a button to turn on the light.

    • same as ex 4.1 plus:
    • a switch

    Wire up your board like the image. When you plug in the USB, the LED light should turn on when you press the button, closing the circuit.

    Take a photo of your board to post to your site.

    ex 4.2 light switch@!!@

    ex 4.3 digital control

    Control the light with code.

    • same as ex 4.2 plus:
    • some more wires
    • some code

    Wire up your board like the image. Add the code below & upload it to the Arduino.

    Take a photo of your board to post to your site.

    void setup() { // put your setup code here, to run once: //define pin modes I/O pinMode(2, INPUT); pinMode(8, OUTPUT); //set up Serial port to debug Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: //read pin 2 input (0 == LOW or 1 == HIGH) if(digitalRead(2) == LOW){ //send digital signal to pin 8 (0 == LOW or 1 == HIGH) digitalWrite(8, LOW); }else{ digitalWrite(8, HIGH); } delay(100); //print pin 2 "input" should be 0 is button not pressed or 1 if pressed Serial.println(digitalRead(2)); }

    questions??

    • Can you change the code so that the button turns off the LED?
    • What are some equivalent ways of expressing 1 and 0 (zero)?
    • Bonus challenge: add a second LED that does the opposite of the first when you click the button.
    ex 4.3 digital light control

    4.3 challenge: control 2 lights with 1 switch

    our et1/ sites