| 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)
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?
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
| 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)
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
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
| 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)
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
| 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)
// It is based on a program original written by Dr. Nitin Patil of Mindsensors and modified
// by Scott Briscoe.
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).
Some guy name Xander on another site said this device requires pull-up resistors