Back to Parent

//Condition for sensor to turn on
//temperature below zero and minimum force present
  if(temperature<32 && fsrReading>150)
  {
    // Map the temp sensor value into the PWM range (0-255)
    // and store as the led brightness
    ledBrightness = map(fsrReading, 0, 4095, 0, 255);

    // fade the LED to the desired brightness
    analogWrite(ledPin, ledBrightness);
  }
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0