Adafruit_L3GD2 (gyroscope) Library

Hello,

I have a gyroscope that I got from Adafruit that works great with the Arduino. I believe the library is not platform agnostic so it should work on the Spark Core. When I copy and paste the .h file above the setup() and loop() functions and press ‘verify’ I get an error that says “There was an error saving firmware. Sorry about that.”

Am I wrong in thinking I can use this library on the Spark Core? https://github.com/adafruit/Adafruit_L3GD20

Does anyone know why I’m getting an error saving firmware?

Thanks,
Alex

Can you show us a screenshot?

It should be able to be saved…

Just realized that my session just expired. I was able to somehow log on via IE (I’ve been having a hard time behind my proxy at work), so it must have been blocking it. Here’s my post about my other issue

2 Likes

@AlexMiller,

I have published the code into the library. You can use it directly from there :smiley:

I created a new app and included the .h and .cpp files (I think, it said they were already in the app after I did the first one), but it gives me a bunch of compiling errors. Do you think I’m doing something wrong?
@kennethlimcp

@AlexMiller, I have a version of that library that works with the Adafruit Unified Sensor Library . You can get everything on my repo here.

@peekay123 I copied the .h file into a sample program (above setup() and loop() ) and I copied the .cpp below setup() and loop(). When I press ‘verify’ I get this error:

In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:29,
from lasttest.cpp:17:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
lasttest.cpp:20:29: fatal error: Adafruit_Sensor.h: No such file or directory
#line 16 
^
compilation terminated.
make: *** [lasttest.o] Error 1

@AlexMiller, you need to include the .cpp and .h files from the Adafruit_Sensor-master folder as well. Those are your missing files :smile: