New answers tagged

2

A while ago while figuring out I2C difficulties of my own I did some research and listed out all the failure modes and test techniques I could think of regarding I2C. See I2C protocol doesn't work properly. I routinely go through the list now to tick off the things I need to check to get a new I2C connection working, usually it's something simple (...


1

From the MPU-6000/MPU-6050 Register Map and Descriptions: Section 4.28, Register 107 – Power Management 1 PWR_MGMT_1, pages 40 to 41: Note: When using SPI interface, user should use DEVICE_RESET (register 107) as well as SIGNAL_PATH_RESET (register 104) to ensure the reset is performed properly. The sequence used should be: Set DEVICE_RESET = 1 (register ...


1

That is a lot of pins, so this really boils down to your application and what you want to optimize for. You could do a bit-banged software I2C slave on these pins. "Bit-bang" means you just write a program to flip the bits on the pins rather than handing the bytes off to the hardware which would do the same thing (although sometimes faster or ...


0

Answer: Make sure you install the right library :P


3

I2C is a multi-drop bus. That means that one set of I2C pins are designed to have multiple devices on it as long as each device has a unique address. On an Uno the discrete I2C pins and the A4/A5 I2C pins are the same pins. The discrete pins are an attempt to provide a cross-platform standard location for the I2C signals for shields.


1

Your key values are: int keyVals [16] = {976, 450, 333, 244, 166, 138, 124, 109, 90, 81, 76, 70, 61, 57, 54, 51}; The formula for the key values given in the OnewireKeypad library is: float V = (voltage * float( R3 )) / (float(R3) + (float(R1) * float(R)) + (float(R2) * float(C))); float Vfinal = V * ANALOG_FACTOR; where: voltage = 5 V R1 = 1,000 Ω (the ...


2

When additional resistors are added in parallel, which is what is going on when you add new I2C devices to the I2C bus, the overall resistor is lowered. This could cause a problem with devices that cannot provide enough current with a low pull-up resistance. Hence, the device will not function well when the pull-up resistance is lower than a specific value. ...


0

The answer is yes, you can run two programs one in each Arduino. There are no restrictions on doing this. There are probably millions of Arduinos currently operating without any interaction with each other. In your robot they would need some sort of communications between them. This is if there is to be any type of interaction between them. I do not know ...


1

Your SPI is not setup for the Arduino UNO. Check another example for SPI and you will be using pins 11 and 13, this is mandatory and 8,9,10 or any three and there is a definition statement for these 3 pins - look at the example for your display. For I2C do you have pullup resistors on both I2C lines 4.7k up to 10k? These are required. Good luck


3

You need at least one pull-up on the SDA pin and at least one pull-up on the SCL pin. You cannot use the same pull-up for both pins as you will be shorting the two pins together. The pull-ups are required on the I2C signals, not the pins of a chip. If you have multiple chips on the I2C bus you only need one pull-up on each signal. It really doesn't matter (...


0

What i2c clock speed are you using? Even at the faster "fairly standard" speed of 400kHz, that's 2.5us per bit. For a two byte transfer, that's 4us for the data alone, which is 25000 transfers per second. Add on the start and stop bits, plus processing time and you can see that your target data rate isn't possible. i2c just isn't that fast as ...


Top 50 recent answers are included