Здравствуйте, прошу помочь с библиотекой. Мне нужно использовать барометр, но при компиляции выходит только тлен. Код (Text): Arduino: 1.6.3 (Windows 7), Плата"Arduino Leonardo" In file included from IIOS_HANDLE.ino:1:0: C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:15:30: error: expected ')' before 'addr' L3G4200D_TWI(uint8_t addr = L3G4200D_TWI_ADDRESS); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:20:9: error: 'int16_t' does not name a type int16_t readX(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:21:9: error: 'int16_t' does not name a type int16_t readY(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:22:9: error: 'int16_t' does not name a type int16_t readZ(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:26:23: error: 'uint8_t' has not been declared void setRange(uint8_t range); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:29:9: error: 'uint8_t' does not name a type uint8_t _addr; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:30:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg1; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:31:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg4; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:37:9: error: 'int16_t' does not name a type int16_t readAxis(uint8_t reg); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/l3g4200d.h:38:9: error: 'uint8_t' does not name a type uint8_t readByte(uint8_t reg); ^ In file included from IIOS_HANDLE.ino:2:0: C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:15:31: error: expected ')' before 'addr' LIS331DLH_TWI(uint8_t addr = LIS331DLH_TWI_ADDRESS); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:20:9: error: 'int16_t' does not name a type int16_t readX(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:21:9: error: 'int16_t' does not name a type int16_t readY(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:22:9: error: 'int16_t' does not name a type int16_t readZ(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:26:23: error: 'uint8_t' has not been declared void setRange(uint8_t range); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:29:9: error: 'uint8_t' does not name a type uint8_t _addr; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:30:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg1; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:31:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg4; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis331dlh.h:38:9: error: 'int16_t' does not name a type int16_t readAxis(uint8_t reg); ^ In file included from IIOS_HANDLE.ino:3:0: C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:16:29: error: expected ')' before 'addr' LIS3MDL_TWI(uint8_t addr = LIS3MDL_TWI_ADDRESS); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:20:9: error: 'int16_t' does not name a type int16_t readX(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:21:9: error: 'int16_t' does not name a type int16_t readY(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:22:9: error: 'int16_t' does not name a type int16_t readZ(); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:30:23: error: 'uint8_t' has not been declared void setRange(uint8_t range); ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:36:9: error: 'uint8_t' does not name a type uint8_t _addr; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:37:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg1; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:38:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg2; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:39:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg3; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:40:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg4; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:41:9: error: 'uint8_t' does not name a type uint8_t _ctrlReg5; ^ C:\Users\AdminS\Documents\Arduino\libraries\Troyka-IMU-master/lis3mdl.h:50:9: error: 'int16_t' does not name a type int16_t readAxis(uint8_t reg); ^ Ошибка компиляции.
Тоже столкнулся с этой проблемой. Я поступил просто, вырезал все лишнее из библиотеки. В файле troyka-imu.h оставляем только: Код (C++): class Barometer : public LPS331 { }; И оставляем два файла с именем LPS331.h и LPS331.cpp Вуаля, работает. Библиотека, походу, кривая, но, к счастью, не на барометре.
А если придется использовать и другие IMU модули? Планировал поставить позже полную версию этого датчика.