SPI library usage with Pro Micro

Hi guys

I want to use the SPI library with my Pro Mirco 5V but even when using a standard sample file from the Arduino Homepage I get the error:

Arduino: 1.6.0 (Mac OS X), Board: “SparkFun Pro Micro 5V/16MHz”

hello_world.ino:21:19: fatal error: SPI.h: No such file or directory

When I change the board to Arduino Uno, the compilation works without problems, only when I select the Pro Micro Board the error appears. The problem is the same on Windows and OS machines…anybody an Idea what to do ? Help would really appreciated.

Cheers

Toni

Come on guys, really nobody ever used the Pro Micro with SPI or even I2C ? I guess there is something wrong with my Compiler configuration but I can’t figure it out. Even a super simple program (basic code-lines and command to include wire.h or spi.h) will work when choosing the Arduino Uno but I get an error as soon as I select Pro Micro Board (any of them). I also tried to copy the libraries in the document folder, but all with no success.

Anybody please help me out here :?

You haven’t provided the source code that doesn’t compile, so the best we can do is guess.

I just loaded SPIFlash_ReadWrite.ino from here: https://github.com/LowPowerLab/SPIFlash

It compiles with no errors with either Arduino Uno or SparkFun Pro Micro 5V/16Mhz selected under Arduino 1.6.4 on my Windows 7 PC.

You can post your code so we can review it, or perhaps your installation is faulty. If you think it is the installation, you can uninstall and reinstall Arduino.

Without code there is not much to go on.

  • Chip

I do not work for SparkFun.

There is no code except for:

#include <SPI.h>

void setup() {

}

void loop() {

}

If I select as board the “Arduino Uno” the code compiles just fine, if I select as board the “Spark Fun ProMicro” I get the error message that the SPI.H file is not found.

I cannot duplicate your error. For me it works fine with any of Arduino Uno, SparkFun Pro Micro 5v/16MHz and SparkFun Pro Micro 5v/8MHz. I tested this on Arduino 1.6.4 release.

  • Chip

I do not work for SparkFun.