title: Exit status 1 Error compiling for board Arduino/Genuino Uno for Accerlerometer
body: <p>So I am trying to build an accelerometer from an Arduino and this error message keeps popping up from a basic starter code I used from a library I downloaded.</p>
  
  <p>Here is a link to the library:<br>
  <a href="https://github.com/adafruit/Adafruit_LIS3DH" rel="nofollow noreferrer">https://github.com/adafruit/Adafruit_LIS3DH</a> </p>
  
  <p>Here is the starter code:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;Wire.h&gt;
  #include &lt;SPI.h&gt;
  #include &lt;Adafruit_LIS3DH.h&gt;
  #include &lt;Adafruit_Sensor.h&gt;
  
  // Used for software SPI
  #define LIS3DH_CLK 13
  #define LIS3DH_MISO 12
  #define LIS3DH_MOSI 11
  // Used for hardware &amp; software SPI
  #define LIS3DH_CS 10
  
  //software SPI
  Adafruit_LIS3DH lis = Adafruit_LIS3DH(LIS3DH_CS, LIS3DH_MOSI,
  LIS3DH_MISO,LIS3DH_CLK);
  //hardware SPI
  Adafruit_LIS3DH lis = Adafruit_LIS3DH(LIS3DH_CS);
  //I2C
  Adafruit_LIS3DH lis = Adafruit_LIS3DH();
  
  #if defined(ARDUINO_ARCH_SAMD)
  // for Zero, output on USB Serial console, remove line below if using 
  programming port to program the Zero!
  #define Serial SerialUSB
  #endif
  void setup(void) {
  #ifndef ESP8266
    while (!Serial);     // will pause Zero, Leonardo, etc until serial 
  console opens
  #endif
  
  Serial.begin(9600);
  Serial.println("LIS3DH test!");
  
  if (! lis.begin(0x18)) {   // change this to 0x19 for alternative i2c 
  address
  Serial.println("Couldnt start");
  while (1);
    }
  Serial.println("LIS3DH found!");
  
  lis.setRange(LIS3DH_RANGE_4_G);   // 2, 4, 8 or 16 G!
  
  Serial.print("Range = "); Serial.print(2 &lt;&lt; lis.getRange());  
  Serial.println("G");
  }
  
  void loop() {
  lis.read();      // get X Y and Z data at once
  // Then print out the raw data
  Serial.print("X:  "); Serial.print(lis.x); 
  Serial.print("  \tY:  "); Serial.print(lis.y); 
  Serial.print("  \tZ:  "); Serial.print(lis.z); 
  
  /* Or....get a new sensor event, normalized */ 
  sensors_event_t event; 
  lis.getEvent(&amp;event);
  
  /* Display the results (acceleration is measured in m/s^2) */
  Serial.print("\t\tX: "); Serial.print(event.acceleration.x);
  Serial.print(" \tY: "); Serial.print(event.acceleration.y); 
  Serial.print(" \tZ: "); Serial.print(event.acceleration.z); 
  Serial.println(" m/s^2 ");
  
  Serial.println();
  
  delay(200); 
  }
  </code></pre>
  
  <p>And here is the error message:</p>
  
  <pre><code>Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Uno"
  
  Build options changed, rebuilding all
  In file included from /Users/smcmahon/Documents/Arduino/libraries/Adafruit_LIS3DH-master/examples/acceldemo/acceldemo.ino:5:0:
  /Users/smcmahon/Documents/Arduino/libraries/Adafruit_LIS3DH-master/Adafruit_LIS3DH.h:34:29: fatal error: Adafruit_Sensor.h: No such file or directory
   #include &lt;Adafruit_Sensor.h&gt;
                               ^
  compilation terminated.
  exit status 1
  Error compiling for board Arduino/Genuino Uno.
  
  This report would have more information with
  "Show verbose output during compilation"
  option enabled in File -&gt; Preferences.
  </code></pre>