bootup

hi
i have problem with bootup uno
when i boot up output pin goes high for some seconds
how to stop ths
i did pullup resistor (4.7k) and pull down resistor
still same problem
sorry for bad english

#include <OneWire.h>
#include <DallasTemperature.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

// Onewire device is plugged into port 7 on the Arduino
#define ONE_WIRE_BUS 4

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

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

int currenttemp;

int minimum = 25; // change minimum and maximum temperature in degrees C.
int maximum = 27;

void setup(void)
{

lcd.begin(20, 4);
  lcd.print("current temp:");
  lcd.setCursor(0, 1);
// start serial port
Serial.begin(9600);

// Start up the library
sensors.begin();

pinMode(13, OUTPUT); //set up pin 13 for a warning LED
digitalWrite(13, HIGH);

pinMode(2, OUTPUT);
digitalWrite(2, HIGH); //set up pin 1 for a Solid State Relay

}

void loop(void)
{
  // read current temperature
  sensors.requestTemperatures();
  float temp = sensors.getTempCByIndex(0);
  lcd.setCursor(15, 0);
  lcd.print(temp);
// call sensors.requestTemperatures() to issue a global temperature
// reques
// t to all devices on the bus
Serial.print("Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println("DONE");

Serial.print("Temperature for the device 1 (index 0) is: ");
currenttemp = sensors.getTempCByIndex(0); //changing to getTempFByIndex will change the system to degrees F
Serial.println(sensors.getTempCByIndex(0));

if (currenttemp < minimum) {
digitalWrite(13, HIGH); // so that the warning LED light goes on
digitalWrite(2, HIGH); // so that the incandescent lightbulb goes on
}

if (currenttemp > maximum) {
digitalWrite(13, LOW);
digitalWrite(2, LOW);
}

}
}

Normally the pins would default to inputs so a pull-down resistor would hold them down.

Which pin(s) in particular are you having problems with? It's possible that they are being used by the bootloader.

Two pins are going high because you are telling them to do so :

pinMode(13, OUTPUT); //set up pin 13 for a warning LED
digitalWrite(13, HIGH);

pinMode(2, OUTPUT);
digitalWrite(2, HIGH); //set up pin 1 for a Solid State Relay

I don't think you need pullup resistors on Led and relay so you could use digitalWrite(2, LOW) ;

waski:
Two pins are going high because you are telling them to do so :

pinMode(13, OUTPUT); //set up pin 13 for a warning LED

digitalWrite(13, HIGH);

pinMode(2, OUTPUT);
digitalWrite(2, HIGH); //set up pin 1 for a Solid State Relay



I don't think you need pullup resistors on Led and relay so you could use digitalWrite(2, LOW) ;

thanku
its 100% ok just change code to digitalWrite(2, LOW); and no need pull up resistor