NXC - Reading temperature from TPA81
Re: NXC - Reading temperature from TPA81
Tiago,
Thanks for responding so quickly
- Xander
Thanks for responding so quickly
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC - Reading temperature from TPA81
No Problem Xander, I hope it helps...mightor wrote:Tiago,
Thanks for responding so quickly
- Xander
Tiago Caldeira
www.nxt4you.com
RobocupJunior Rescue TC for 2012
RobocupJunior Rescue OC Co-Chair for Mexico2012
www.nxt4you.com
RobocupJunior Rescue TC for 2012
RobocupJunior Rescue OC Co-Chair for Mexico2012
Re: NXC - Reading temperature from TPA81
Can you look at how the OP was trying to use the device and correct his hardware configuration if there is anything wrong with it?
Can you get RobotC to work with this device using the standard LEGO I2C speeds? What does sensorI2CCustom mean? Is that different than how you would configure RobotC to communicate with the LEGO Ultrasonic sensor? Does custom mean "fast"?
Also, as you can see the NXC code looks identical to the RobotC code, so do you have any ideas why this device will be causing a bus error the way that the OP has his hardware configured?
John Hansen
Can you get RobotC to work with this device using the standard LEGO I2C speeds? What does sensorI2CCustom mean? Is that different than how you would configure RobotC to communicate with the LEGO Ultrasonic sensor? Does custom mean "fast"?
Also, as you can see the NXC code looks identical to the RobotC code, so do you have any ideas why this device will be causing a bus error the way that the OP has his hardware configured?
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: NXC - Reading temperature from TPA81
Well, there was mention of the usage of pull-ups which are apparently not supposed to be used. Tiago has used this device successfully in the past.
sensorI2CCustom is an I2C sensor at regular ~10k clock, no 9V pin. It's a vanilla I2C device.
- Xander
sensorI2CCustom is an I2C sensor at regular ~10k clock, no 9V pin. It's a vanilla I2C device.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC - Reading temperature from TPA81
mightor wrote:Well, there was mention of the usage of pull-ups which are apparently not supposed to be used. Tiago has used this device successfully in the past.
sensorI2CCustom is an I2C sensor at regular ~10k clock, no 9V pin. It's a vanilla I2C device.
- Xander
For some reason, the robot-electronic devices (eg.: SRF08 and TPA81) don't need pull up resistor. They have some kind of non planned resistance that doesn't need to put external ones.
Xander, could you replicate the i2c scanner program to NXC ?
Tiago Caldeira
www.nxt4you.com
RobocupJunior Rescue TC for 2012
RobocupJunior Rescue OC Co-Chair for Mexico2012
www.nxt4you.com
RobocupJunior Rescue TC for 2012
RobocupJunior Rescue OC Co-Chair for Mexico2012
Re: NXC - Reading temperature from TPA81
So both of you have looked at the picture of his hardware and are certain that he has everything connected correctly?
As far as I can gather he has tried it with and without pullup resistors.
Porting RobotC code to NXC is extremely simple. I probably already have an i2c scanner program written in NXC.
John Hansen
As far as I can gather he has tried it with and without pullup resistors.
Porting RobotC code to NXC is extremely simple. I probably already have an i2c scanner program written in NXC.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: NXC - Reading temperature from TPA81
I am not going to have much time between now and next Saturday to do much roboting/programming. So I won't be able to do it.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC - Reading temperature from TPA81
Perhaps you would have time to tell me what he meant by "the i2c scanner program".
Does he mean mindsensors.com scandev utility which I ported to NXC back in July of 2007 or something else you wrote more recently?
John Hansen
Does he mean mindsensors.com scandev utility which I ported to NXC back in July of 2007 or something else you wrote more recently?
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: NXC - Reading temperature from TPA81
On the new ROBOTC firmwares there's a tryme program that's an I2C device scanner. It's probably very much like the Mindsensors one
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC - Reading temperature from TPA81
The comment at the start of i2c_scanner.c says
Some guy name Xander on another site said this device requires pull-up resistors
http://www.robotc.net/forums/viewtopic. ... 203#p12203
That seems to contradict what was said above.
John Hansen
So it's the same, in essence, as my NXC version of the mindsensors.com scandev.c program which I wrote back in 2007. There's no way that scanner could possibly work in this case since the TPA81 doesn't support register 0x10 (which is what the scanner program tries to read 8 bytes from).// It is based on a program original written by Dr. Nitin Patil of Mindsensors and modified
// by Scott Briscoe.
Some guy name Xander on another site said this device requires pull-up resistors
http://www.robotc.net/forums/viewtopic. ... 203#p12203
That seems to contradict what was said above.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: Semrush [Bot] and 3 guests