go_away

Author Topic: errors in TPA81 initialization code in Webbtolib  (Read 1244 times)

0 Members and 1 Guest are viewing this topic.

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
errors in TPA81 initialization code in Webbtolib
« on: May 31, 2010, 12:39:08 AM »

Hi,

I got two errors when initializing the TPA81 in the new Webbotlib.

"../Servos.c:31: error: extra brace group at end of initializer

../Servos.c:31: error: (near initialization for 'tpa.temperature')


below is the part of code I got these errors.

Code: [Select]
#include "C:\My_Robot\WebbotLib\Sensors\Temperature\Devantech\TPA81.h"
Devantech_TPA81 tpa=MAKE_Devantech_TPA81();
Any help would be much appreciated.

Thanks


Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,072
  • Helpful? 107
Re: errors in TPA81 initialization code in Webbtolib
« Reply #1 on: May 31, 2010, 06:19:07 PM »
Thanks for the 'heads up'.
To fix your problem: then write the code in the same way as Project Designer does ie specifying the default I2C address:
Code: [Select]
Devantech_TPA81 temperature = MAKE_Devantech_TPA81_At(0xD0);
And the problem should go away.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
Re: errors in TPA81 initialization code in Webbtolib
« Reply #2 on: June 01, 2010, 01:01:58 PM »


ok,

I'll try it and let you know.

Thanks!


 

Related Topics

  Subject / Started by Replies Last post
10 Replies
3300 Views
Last post September 02, 2008, 10:00:50 PM
by Admin
9 Replies
2968 Views
Last post March 03, 2010, 01:17:31 PM
by GearMotion
2 Replies
1579 Views
Last post March 19, 2010, 12:37:08 AM
by teoxan
0 Replies
522 Views
Last post October 19, 2010, 04:30:06 AM
by vasu


Get Your Ad Here