DS1820B value stored as a variable?

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DS1820B value stored as a variable?

Post by adafruit_support_bill »

Yes. Post the temperatures.
Have you tested that all the leds work? Maybe add a little code to the setup to flash each one as a test.

You will also need some more code to turn off the 'other' leds off

Code: Select all

  if (TempF > 100)
{
    digitalWrite(redled, HIGH);
    digitalWrite(blueled, LOW);
    digitalWrite(whiteled, LOW);
    digitalWrite(pinkled, LOW);
}

... etc...


User avatar
crafty184
 
Posts: 21
Joined: Tue Oct 08, 2013 12:14 pm

Re: DS1820B value stored as a variable?

Post by crafty184 »

Hi Bill,

It works! I figured out I was missing this call to get the temperatures.

Code: Select all

  sensors.requestTemperatures();
Once I added that it worked!

And yes, you're right I do need to turn off the other LED's. ;) Thanks SO MUCH for all the help! I'll post a picture of it "in action" once we make more than a MVP.

Chris

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”