WiFi Shield 101 Update: missing library problem

Hi- I'm running Arduino IDE 1.8.1 with a WIFI SHIELD 101, and I'd like to update the firmware , but the sketch required to communicate with the wifi shield,

"/*
FirmwareUpdate.h - Firmware Updater for WiFi101 / WINC1500.
Copyright (c) 2015 Arduino LLC. All right reserved."

calls for the following libraries to be installed:

#include <WiFi101.h>
#include <spi_flash/include/spi_flash.h>

and of course I have <WiFi101.h>, but I just cannot find <spi_flash/include/spi_flash.h> after extensive searching.

I believe the errors I'm receiving while compiling the sketch are due to this missing library.

Does anyone have a copy they could lend? :wink:

Thanks,
Steve

It's part of the WiFi101 library. It should be located at {sketchbook folder}/libraries/WiFi101/src/spi_flash/include/spi_flash.h. If it's not there then your installation of the library must be messed up somehow and you should remove and then reinstall it using Library Manager.

steven_belanger:
I believe the errors I'm receiving while compiling the sketch are due to this missing library.

If so it would be very obvious from reading the error:

C:\Users\per\AppData\Local\Temp\arduino_modified_sketch_230993\FirmwareUpdater.ino:21:42: fatal error: spi_flash/include/spi_flash.h: No such file or directory

 #include <spi_flash/include/spi_flash.h>

If you're not seeing an error similar to that then you have a different problem.

Many thanks for your rapid response!

Well perhaps my included library files are okay (even though '#include <spi_flash/include/spi_flash.h>' does not appear as Orange text in the sketch, as "WiFi101.h' does).

I can follow the directory as you suggested all the way to the 'spi_flash.h' file, and there are no other copies of the WiFi folder/files anywhere else...

So that leaves my errors:

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\Steven\AppData\Local\Temp\arduino_modified_sketch_686783\sketch_feb12a.ino: In function 'void receivePacket(UartPacket*, uint8_t*)':

sketch_feb12a:64: error: 'fromNetwork32' was not declared in this scope

pkt->address = fromNetwork32(pkt->address);

^

sketch_feb12a:66: error: 'fromNetwork16' was not declared in this scope

pkt->payloadLength = fromNetwork16(pkt->payloadLength);

^

C:\Users\Steven\AppData\Local\Temp\arduino_modified_sketch_686783\sketch_feb12a.ino: In function 'void loop()':

sketch_feb12a:93: error: 'toNetwork16' was not declared in this scope

uint16_t res = toNetwork16(MAX_PAYLOAD_SIZE);

^

exit status 1
'fromNetwork32' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Do you feel my pain?

Thanks again,

Steve

steven_belanger:
(even though '#include <spi_flash/include/spi_flash.h>' does not appear as Orange text in the sketch, as "WiFi101.h' does).

The only reason WiFi101 is orange is because that word is in the library's keywords.txt file. It means absolutely nothing if a file name is colored or not.

steven_belanger:
C:\Users\Steven\AppData\Local\Temp\arduino_modified_sketch_686783\sketch_feb12a.ino

have you tried compiling the unmodified FirmwareUpdater sketch? I just compiled it for Mega 2560 using Arduino IDE 1.8.1 and it worked fine.

I have the same problem, I'm using Mac though. The directory that it shows for the library used is not as same as the one included in the code. I guess that might be the problem, don't know how to solve it yet :confused:

Using library WiFi101 at version 0.14.3 in folder: /Users/ApplePro/Documents/Arduino/libraries/WiFi101
Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI

Any help is highly appreciated