niejianyong 发表于 2013-12-16 18:21:51

mpu6050实例化失败,求教!

本帖最后由 niejianyong 于 2013-12-16 18:26 编辑

库文件也是论坛下载的,代码也是,都是一个帖子里面的
库文件(.h + .cpp 在libraries目录下的mpu6050下放的,libraries也有同样的文件)
但是:出现实例化失败可能是哪方面的原因,求指点,谢谢
#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050.h"
MPU6050 accelgyro;(出错)

sketch_dec16a:14: error: 'MPU6050' does not name a type
sketch_dec16a.ino: In function 'void setup()':
sketch_dec16a:33: error: 'accelgyro' was not declared in this scope
sketch_dec16a.ino: In function 'void loop()':
sketch_dec16a:45: error: 'accelgyro' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
页: [1]
查看完整版本: mpu6050实例化失败,求教!