Introduction: Intel Edison Temperature Logger With RBG-LCD

About: 31 years old tinker and diy hobbyist. From Oulu, Finland. IG @mkarvonen_instructables

First of all, Thank you very much Instructables+Intel for the Edison board and the grove starter kit plus!

This project is the first thing i did with the board just to test it and it is very easy for anyone to do.

More user friendly project's that anyone can build coming soon!

Step 1: Unboxing and Setting Up the Board

Obviously start by unpacking all the things!

Setting up the Edison board first.

Install the Edison module to the base board and screw it firmly.

Install the white legs under the board to use them as a stand, Or screw them on top of the board to use them as a stand for components.

Then start discovering the grove kit plus.

Everything is packed neatly and tidy. First thing that hit my eye was the RGB-LCD screen, The shield and the temperature sensor. Also the 8 GB micro SD card was interesting.

So the first thing that came in my mind was live temperature printed to LCD screen. But with a little bonus.

By using the RGB feature, the screen changes its color.

This helps reading the screen from a distance by knowing the temperature by color.

Also the SD card has some usage.

What will you do with the temperature if you don't log it down to the card?

Follow this build for more info!

Step 2: Install the Drivers and Software + Sketches

Download the software and drivers for the board from here.

Be sure to download the right one for your OS.

After download unzip the Arduino software and install the driver pack.

Connect the board to PC via USB. Check that the switch next to the USB ports at the Edison is turned towards the USB ports.

Wait for the system to install the drivers.

After successful installation you should see a new drive named Edison popup. The drive is 767 MB big.

If not, check the device manager for errors.

If you have any questions about the drivers or Arduino software just ask. I will answer usually in 24 hours.

Sketchbooks can be downloaded fromhere.

Step 3: Start Building

The build itself is really simple.

All you need is the shield, LCD-screen and the temperature sensor.

For installation you will need two wires that connect to the shield (included in package) and an SD card.

Connect those to the Edison board and stick it to the computer.

Now we start with the code that will come inside it..

Step 4: The Code

The code is pretty simple and it is easy to understand.

First include needed library and address global variables.

#include 
#include "rgb_lcd.h" #include #include const int pinTemp = A0; const int chipSelect = 4; float temperature; int B=3975; float resistance; rgb_lcd lcd;

After that is time to build void setup.

This is needed in any program.

In the setup there is start for the serial and for the LCD screen. Also the SD card is applied here.

void setup()
{ Serial.begin(115200); lcd.begin(16, 2); lcd.print("Temperature"); Serial.print("Start write to card.");
  if (!SD.begin(chipSelect)) {
    Serial.println("No card or failure");
    return;
  }
  Serial.println("Card found");
}

Void breath variable is done here. This one has the ability to fade the color when it changes.

void breath(unsigned char color)
{
    for(int i=0; i<255; i++)
    {
        lcd.setPWM(color, i);
        delay(5);
    }
    delay(500);
    for(int i=254; i>=0; i--)
    {
        lcd.setPWM(color, i);
        delay(5);
    }
}

Void loop is also needed in any program.

this is where the whole program sets in. The loop means that the program will continue forever.

void loop()
{ if (temperature >25){ breath(REG_RED); } if (temperature <25){ breath(REG_GREEN); } if (temperature <20) { breath(REG_BLUE); } lcd.setCursor(5,1); lcd.write(0b11011111); lcd.setCursor(6,1); lcd.print("C"); int val = analogRead(pinTemp); resistance=(float)(1023-val)*10000/val; temperature=1/(log(resistance/10000)/B+1/298.15)-273.15; Serial.println(temperature); lcd.setCursor(0,1); lcd.print(temperature); String dataString = "";
 
    File dataFile = SD.open("Temperatures.txt", FILE_WRITE);
    if (dataFile) {
    dataFile.println(temperature);
    dataFile.close();
    
}
    else {
    Serial.println("error opening datalog.txt");
       
  }     
}

Step 5: Upload the Program and Enjoy.

The RGB screen colors are limit values that are good for inside the house.

If the readings are meant to be made from outside i would change the limited color values.

Almost forgot to tell that this works also with 9V battery and that means it is portable. The file included is the log file that was greated at the same time i was writing this text.

The 8 GB SD card can hold a years worth of temperature data. the log is about 2 hours long and the same could be written over 121151 times to the card.

That's about it. If you want you could build a case for thing go for it. This is just a raw build and the parts are going to be in use the next projects.

There will be a lot of build's done with the Intel Edison Iot (internet of things) board so remember to follow me.

Thank you for reading and have a nice day.

:)