Temp Logger Code Helo -Arduino UNO , ds81B20 (inside,outside) Sd card module

I want my SD card to read, write and save two temperatures from DS18B20's.
I was able to have the serial monitor print the two temperatures and have them labelled like i like.
Taking things one step (Component) at a time I am really struggling with the code for the SD module.
I have run the SD library example for my cards info and it is FAT32 bit and connected correctly.

Here is the Code

#include <Wire.h>

#include <SPI.h>

#include <SD.h>

// This Arduino sketch reads DS18B20 "1-Wire" digital
// temperature sensors.
// Tutorial:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// Assign the addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

//one_wire sensor address finder 
DeviceAddress insideTemperature = { 0x28, 0x19, 0x5C, 0x3A, 0x22, 0x20, 0x01, 0x70};
DeviceAddress outsideTemperature = { 0x28, 0x27, 0xDD, 0x22, 0x22, 0x20, 0x01, 0xAC };

//Change this to match your SD shield or Module
const int ChipSelect =4;

//Name File
char filename[] = "Test.CSV";
//Create a file to store data
File myFile;

void setup(void){
  // start serial port
  // Start up the library
  // set the resolution to 10 bit (good enough?)
  sensors.setResolution(insideTemperature, 10);
  sensors.setResolution(outsideTemperature, 10);
  delay(500);//Wait for newly restarted system to stabalize
  //make sure that the default chip select pin is set to 
  //output, even if you dont use it:
  //pinMode(53, OUTPUT); // MEGA
  pinMode (10,OUTPUT); //UNO
    Serial.print("Initializing SD card...");
      if (!SD.begin(10)) 
    Serial.println("initialization failed!");
    while (1);
    Serial.println("initialization done.");


void printTemperature(DeviceAddress deviceAddress)
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Serial.print(" F: ");

void loop(){ 
  Serial.print("Getting temperatures...\n\r");
  sensors.requestTemperatures(); // Call readings from the addresses
  Serial.print("Inside temperature is: ");
  Serial.print("Outside temperature is: ");

  myFile = SD.open(filename, FILE_WRITE);//<<<<<<<<<<<<< OPEN

//sensorValue function
float sensorValue (byte deviceAddress[])
  tempC = sensors.getTempC (deviceAddress);
  return tempC;

error message :

C:\Users\jorda\Documents\Arduino\arduino_ds18b20_temperature_sensor\arduino_ds18b20_temperature_sensor.ino:103:3: note: suggested alternative: 'memcpy'
tempC = sensors.getTempC (deviceAddress);
exit status 1
no matching function for call to 'print(DeviceAddress)'

any suggestions will be put to the test :slight_smile:

also any tips for searching these kinds of error messages would be appreciated.

Thanks !!!



Please post the error messages, in their entirety, in code tags. Use the "copy error messages" button.

The error message is too long.

I changed verbose language preference to compile to no avail.
What should I do?

Has your card been formatted in the proper manner? If in doubt, check the sticky at the head of the Storage forum.

Thanks for your reply!

I just checked the micro SD card was correctly formatted and it is set to FAT32 by default.

I am using Arduino 1-Wire Tutorial

but dont know how/what code to use for the SDModule