Module 5: Introduction to SquareWear


Module 5: Introduction to SquareWear

Goal of this Module: Introduce students to the basics of SquareWear
Module 5: Introduction to SquareWear Document Download

Module: Introduction to SquareWear
SquareWear Kit: 
  • breadboard
  • jumper wires
  • LEDs RYBG
  • 3 volt battery
  • coin holder
  • button
  • Lesson
    Driver for SquareWear Mac Free Download
    Driver for SquareWear Windows Free Download
    Arduino Software Free Download
    breadboardDoc1

    Setup
     
    Arduino2

    Upload Sample Code
      
    breadboardDoc3

    Edit the Code
     
    breadboardDoc4

    int redLED = 8; int blueLED = 13; int greenLED = 12; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(redLED, OUTPUT); pinMode(blueLED, OUTPUT); pinMode(greenLED, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(redLED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(redLED, LOW); // turn the LED off by making the voltage LOW delay(1000); digitalWrite(blueLED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(blueLED, LOW); // turn the LED off by making the voltage LOW delay(1000); digitalWrite(greenLED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(greenLED, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
    Clean up the Code
     
    breadboardDoc5

    int LEDs[] = {8,13,12}; // array of LED pins int numLEDs = 3; // number of LED pins // the setup routine runs once when you press reset: void setup() { // initialize each digital pin as an output. for ( int i = 0; i < numLEDs; i++ ) pinMode(LEDs[i], OUTPUT); } // the loop routine runs over and over again forever: void loop() { // make each LED flash for ( int i = 0; i < numLEDs; i++ ) { digitalWrite(LEDs[i], HIGH); // turn the LED on delay(1000); // wait for a second digitalWrite(LEDs[i], LOW); // turn the LED off delay(1000); // wait for a second } }
    Write Your Own Code
     
    breadboardDoc5 Find RGB values Site

    Get to Know the SquareWear Further
     
    breadboardDoc5

    Use the Photoresistor
     
    breadboardDoc5
    Use the Temperature Sensor
     
    breadboardDoc5

    Modify the Temperature Sensor Code
     
    breadboardDoc5

    Use the Buzzer
     
    breadboardDoc5

    Make Your Own Sketch
     
    breadboardDoc5