New to Arduino Nano cannot autostart program

I’m using an Arduino Nano and intend to use it as the outside bit of my weather station.
I will be adding a wind direction and speed sensor once they arrive and I’ve worked it all out.

However for the moment I have a BME280 temp, humidity and pressure sensor connected and using the “sketch?” below it works fine

I got the sketch from the Sparkfun BME280 library and I am using it in I2C mode

I modified the sketch by removing the measurements I didn’t want or need, and I put in a ° symbol instead of using the word “Degrees”

I cannot get it to start when I power up the Arduino Nano, it will only start if I reupload the sketch to the Nano but if I disconnect it - I get nothing

Anyone got any ideas?

The sketch is below

BME280 Arduino and Teensy example
Marshall Taylor @ SparkFun Electronics
May 20, 2015

This sketch configures two BME280 breakouts.  One is configured as I2C and
the other as SPI.  Data from both are displayed.

Sensor A is I2C and connected through A4 and A5 (SDA/SCL)
Sensor B is SPI and connected through pins 10, 11, 12, and 13 through a
level shifter, with pin 10 being used for chip select.

Uses Wire.h for I2C operation
Uses SPI.h for SPI operation

Development environment specifics:
Arduino IDE 1.6.4
Teensy loader 1.23

This code is released under the [MIT License](
Please review the file included with this example. If you have any questions 
or concerns with licensing, please contact
Distributed as-is; no warranty is given.

#include <stdint.h>
#include "SparkFunBME280.h"

#include "Wire.h"
#include "SPI.h"

//Global sensor object
BME280 mySensorA;

void setup()
  //***Set up sensor 'A'******************************//
  //commInterface can be I2C_MODE or SPI_MODE
  mySensorA.settings.commInterface = I2C_MODE;
  mySensorA.settings.I2CAddress = 0x77;
  mySensorA.settings.runMode = 3; //  3, Normal mode
  mySensorA.settings.tStandby = 0; //  0, 0.5ms
  mySensorA.settings.filter = 0; //  0, filter off
  //tempOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensorA.settings.tempOverSample = 1;
  //pressOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
    mySensorA.settings.pressOverSample = 1;
  //humidOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensorA.settings.humidOverSample = 1;

  //***Initialize the things**************************//
  Serial.print("Program Started\n");
  Serial.println("Starting BME280s... result of .begin():");
  delay(10);  //Make sure sensor had enough time to turn on. BME280 requires 2ms to start up.
  //Calling .begin() causes the settings to be loaded
  Serial.print("Sensor A: 0x");
  Serial.println(mySensorA.begin(), HEX);


void loop()
  //Start with temperature, as that data is needed for accurate compensation.
  //Reading the temperature updates the compensators of the other functions
  //in the background.
  Serial.print("Temperature: ");
  Serial.print(mySensorA.readTempC(), 2);
 Serial.print((char)178);     // degree symbol
Serial.println("C");     // C character

  Serial.print("Pressure: ");
  Serial.print(mySensorA.readFloatPressure(), 2);
   Serial.println(" Pa");

  Serial.print("Altitude: ");
  Serial.print(mySensorA.readFloatAltitudeMeters(), 2);

  Serial.print("Altitude: ");
  Serial.print(mySensorA.readFloatAltitudeFeet(), 2);

  Serial.print("%RH: ");
  Serial.print(mySensorA.readFloatHumidity(), 2);
  Serial.println(" %");


I’m an idiot -

It was working properly

I didn’t realise that the port would close when the arduino resets, restarting the terminal program on the computer fixed it

Shows how new I am*