Results 1 to 5 of 5

Thread: I2C Header

  1. I2C Header

    I'm trying to use the I2C header on an Arbotix board, but I don't which pins are SDA, SCL, power, and ground. I guess I can just use a voltage meter for power and ground, but I don't know how to check the data and clock signals. Anyone know?

    Oh, and if it matters, the sensor I'm using on it is a Devantech Thermal Array Sensor.


    Edit: I also know I need pull-up resistors on the data and clock lines, but I'm not entirely sure what those are, or how to use them.

    Edit: I figured out what each of the pins does, but I still don't how to implement a pull-up resistor.
    Last edited by tylerkess; 03-29-2011 at 10:54 AM.

  2. #2
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    127

    Re: I2C Header

    Hmm, does seem we don't have a picture in the manual. However, the VCC line is on top (near the motor drivers), and the schematic shows that SCL is next to VCC, then SDA, then ground at the bottom of the header.

    A pullup resistor is simply going to be a 4.7k-ohm resistor between SDA and VCC and another between SCL and VCC.

    -Fergs

  3. Re: I2C Header

    Thanks. I was reading on the sensor's info page that the I2C bus should have the pull up resistors in it. Does the Arbotix have them, or do I need to connect them externally?

  4. #4
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    127

    Re: I2C Header

    Quote Originally Posted by tylerkess View Post
    Thanks. I was reading on the sensor's info page that the I2C bus should have the pull up resistors in it. Does the Arbotix have them, or do I need to connect them externally?
    You'll have to install them externally.

    -Fergs

  5. Re: I2C Header

    It's all hooked up.

    Below is some code I found on Google Code that is supposed to test it, but it doesn't do anything. Any ideas what might be wrong with it?

    // This is a simple example of how to use the TPA81 library
    #include <Wire.h>
    #include <Tpa81.h>
    // Create an instance of Tpa81, constructor is Tpa81(deviceID)
    Tpa81 thermo = Tpa81(0);
    void setup(){ // this is called once
    Wire.begin(); // this must be called to start the I2C bus
    Serial.begin(38400);
    }
    void loop(){ // print a reading every 2 seconds
    int i;
    unsigned char reading[8];
    // query the sensor
    i = thermo.getData(reading);

    // send up data to PC like "AMBIENT: p1, p2.... p8.\n"
    Serial.print(i); // print the ambient temperature;
    Serial.print(": ");
    Serial.print((int)reading[0]);
    for(i=1;i<8;i++){
    Serial.print(",");
    Serial.print((int)reading[i]);
    }
    Serial.println(".");
    delay(2000);
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Project Paid Contract Work- Replace I2C Remote with PC Interface
    By Brian M in forum Projects For Request and/or Sale
    Replies: 2
    Last Post: 09-27-2010, 12:31 PM
  2. I2C host controller
    By csdude in forum Arbotix, Microcontrollers, Arduino
    Replies: 8
    Last Post: 01-18-2010, 01:51 AM
  3. I2C IR Problems?
    By lnxfergy in forum Sensors
    Replies: 0
    Last Post: 02-14-2009, 04:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •