Muscle jet-Post #2

A few bad news this past week.

tracking

In parallel I’m still working on the code:  Getting an analog input to change a color scale.

 

Based on this code and…..

also a light sensor code.

 

    /******************************************************************************

LilyPad Light Sensor Example
Angela Sheehan
SparkFun Electronics

This example code reads the input from a LilyPad Light Sensor and displays in
the Serial Monitor.

Light Sensor connections:
   * S pin to A3
   * + pin to A5
   * - to -

******************************************************************************/

// Set which pin the Signal output from the light sensor is connected to
// If using the LilyPad Development Board, change this to A6
int sensorPin = A3;
// Create a variable to hold the light reading
int lightValue;

void setup()
{
    // Set sensorPin as an INPUT
    pinMode(sensorPin, INPUT);

    // Set pin A5 to use as a power pin for the light sensor
    // If using the LilyPad Development Board, comment out these lines of code
    pinMode(A5, OUTPUT);
    digitalWrite(A5, HIGH);

    // Initialize Serial, set the baud rate to 9600 bps.
    Serial.begin(9600);
}

void loop()
{

 

for next week I’ll do what I had planned for this one:

  • Weaving the fiber optic
  • finishing the code