xaliax Posted May 22, 2014 Report Share Posted May 22, 2014 Hi, I'm new in the forum, First I would like to introduce myself. I'm a student of mechanical engineering, and I'm working on a flight computer for a rocket and I'm using this sensor. I'm having problems with the example sketch, and I hope someone can help me, here is the log: In file included from msp430_i2c.c:14: i2c.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'I2Cdev' msp430_i2c.c: In function 'I2C_masterInit': msp430_i2c.c:50: error: 'I2C_PxSEL' undeclared (first use in this function) msp430_i2c.c:50: error: (Each undeclared identifier is reported only once msp430_i2c.c:50: error: for each function it appears in.) msp430_i2c.c:50: error: 'SDA_PIN' undeclared (first use in this function) msp430_i2c.c:50: error: 'SCL_PIN' undeclared (first use in this function) msp430_i2c.c:51: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:51: error: 'UCSWRST' undeclared (first use in this function) msp430_i2c.c:52: error: 'UCB1CTL0' undeclared (first use in this function) msp430_i2c.c:52: error: 'UCMST' undeclared (first use in this function) msp430_i2c.c:52: error: 'UCMODE_3' undeclared (first use in this function) msp430_i2c.c:52: error: 'UCSYNC' undeclared (first use in this function) msp430_i2c.c:53: error: 'UCSSEL_2' undeclared (first use in this function) msp430_i2c.c:54: error: 'UCB1BR0' undeclared (first use in this function) msp430_i2c.c:54: error: 'I2C_PRESCALE' undeclared (first use in this function) msp430_i2c.c:55: error: 'UCB1BR1' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_enable': msp430_i2c.c:73: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:73: error: 'UCSWRST' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_disable': msp430_i2c.c:91: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:91: error: 'UCSWRST' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_setSlaveAddress': msp430_i2c.c:113: error: 'UCB1I2CSA' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_setMode': msp430_i2c.c:133: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:133: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_isBusBusy': msp430_i2c.c:153: error: 'UCB1STAT' undeclared (first use in this function) msp430_i2c.c:153: error: 'UCBBUSY' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_enableInterrupt': msp430_i2c.c:181: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:184: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_disableInterrupt': msp430_i2c.c:211: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_clearInterruptFlag': msp430_i2c.c:235: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterSendSingleByte': msp430_i2c.c:260: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c:260: error: 'UCB1TXIE' undeclared (first use in this function) msp430_i2c.c:266: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:266: error: 'UCTR' undeclared (first use in this function) msp430_i2c.c:266: error: 'UCTXSTT' undeclared (first use in this function) msp430_i2c.c:269: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:269: error: 'UCB1TXIFG' undeclared (first use in this function) msp430_i2c.c:272: error: 'UCB1TXBUF' undeclared (first use in this function) msp430_i2c.c:278: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteSendStart': msp430_i2c.c:308: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c:308: error: 'UCB1TXIE' undeclared (first use in this function) msp430_i2c.c:314: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:314: error: 'UCTR' undeclared (first use in this function) msp430_i2c.c:314: error: 'UCTXSTT' undeclared (first use in this function) msp430_i2c.c:317: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:317: error: 'UCB1TXIFG' undeclared (first use in this function) msp430_i2c.c:320: error: 'UCB1TXBUF' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteSendNext': msp430_i2c.c:345: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c:345: error: 'UCB1TXIE' undeclared (first use in this function) msp430_i2c.c:347: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:347: error: 'UCB1TXIFG' undeclared (first use in this function) msp430_i2c.c:351: error: 'UCB1TXBUF' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteSendFinish': msp430_i2c.c:375: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c:375: error: 'UCB1TXIE' undeclared (first use in this function) msp430_i2c.c:377: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:377: error: 'UCB1TXIFG' undeclared (first use in this function) msp430_i2c.c:381: error: 'UCB1TXBUF' undeclared (first use in this function) msp430_i2c.c:387: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:387: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteSendStop': msp430_i2c.c:409: error: 'UC1IE' undeclared (first use in this function) msp430_i2c.c:409: error: 'UCB1TXIE' undeclared (first use in this function) msp430_i2c.c:411: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:411: error: 'UCB1TXIFG' undeclared (first use in this function) msp430_i2c.c:415: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:415: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteReceiveStart': msp430_i2c.c:435: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:435: error: 'UCTR' undeclared (first use in this function) msp430_i2c.c:437: error: 'UCTXSTT' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteReceiveNext': msp430_i2c.c:456: error: 'UCB1RXBUF' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteReceiveFinish': msp430_i2c.c:478: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:478: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c:484: error: 'UC1IFG' undeclared (first use in this function) msp430_i2c.c:484: error: 'UCB1RXIFG' undeclared (first use in this function) msp430_i2c.c:488: error: 'UCB1RXBUF' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterMultiByteReceiveStop': msp430_i2c.c:508: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:508: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterSingleReceiveStart': msp430_i2c.c:530: error: 'GIE' undeclared (first use in this function) msp430_i2c.c:536: error: 'UCB1CTL1' undeclared (first use in this function) msp430_i2c.c:536: error: 'UCTR' undeclared (first use in this function) msp430_i2c.c:539: error: 'UCTXSTT' undeclared (first use in this function) msp430_i2c.c:545: error: 'UCTXSTP' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_masterSingleReceive': msp430_i2c.c:568: error: 'UCB1RXBUF' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_readBytesFromAddress': msp430_i2c.c:679: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function) msp430_i2c.c:705: error: 'I2C_RECEIVE_MODE' undeclared (first use in this function) msp430_i2c.c:709: error: 'I2C_RECEIVE_INTERRUPT' undeclared (first use in this function) msp430_i2c.c: In function 'I2C_writeBytesToAddress': msp430_i2c.c:740: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function) msp430_i2c.c:746: error: 'I2C_TRANSMIT_INTERRUPT' undeclared (first use in this function) Quote Link to comment Share on other sites More sharing options...
xaliax Posted June 7, 2014 Author Report Share Posted June 7, 2014 anyone? Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted June 9, 2014 Report Share Posted June 9, 2014 Hi, Trivial question, but just to confirm things: Are you using MSP430? We need more info so somebody can help you. MPU's board? MCU board? Wiring? Example you are trying to run? Quote Link to comment Share on other sites More sharing options...
xaliax Posted July 2, 2014 Author Report Share Posted July 2, 2014 I'm using the mpu6050 and that's the problem that the examples are giving. The board that I'm using is http://hackaday.com/2014/05/04/spin-a-pcb-for-your-most-beloved-sensors/ And a arduino. Quote Link to comment Share on other sites More sharing options...
xaliax Posted July 7, 2014 Author Report Share Posted July 7, 2014 Update, managed to solve the problems now I have an issue, I ran the Arduino i2c bus scanner and im getting 0x68 and 0x77 for my board, since I assumed that AD0 low for the mpu6050 remained 0x68 I left the code as it is, but im getting garbage output on the serial monitor Quote Link to comment Share on other sites More sharing options...
xaliax Posted July 12, 2014 Author Report Share Posted July 12, 2014 Nothing? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.