> > The Pi and Arduino can both do I2C & SPI. SPI is faster (ISTR I2C is > 10kHz) I believe, but needs something like n+2 wires, where n is the > number of connected devices. I2C just needs 3. Choose what fits your > need better.
Thanks Will, confirms what I thought I'd understood from reading, apparently i2c is a trademark and most people refer to it as TWI (Two Wire Interface). When speaking about faster, I don't know that it really matters, does it? I'll be controlling a shift register for colour coding some RGB LEDs, and reading from an accelerometer... I don't expect that to need much bandwidth, really! > There are almost certainly c libs available though. > As ever with C, too many, and they are all incomprehensible :) > One thing to be aware of, if you're operating in a noisy environment > (sparks, electric motors etc.) then you might get interference on the > SPI/I2C bus, program and design your hardware accordingly. Thanks mate, good to know , does that more or less boil down to "don't put noisy components next to data busses"? How do the problems manifest, mangled bits, protocol errors and nonsense values, or does it fail to work under some circumstances? > You might > > also have problems with the Pi and clock stretching, some I2C > implementations seem immune, YMMV: > > http://www.raspberrypi.org/forums/viewtopic.php?p=146272 Thanks, I'm sure to run into such gems with either i2c or SPI, but at least I've got another thing I can look up when things flat-out refuse to work, and I start to doubt my worth as a programmer! Thanks again Will! -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nwrug-members. For more options, visit https://groups.google.com/d/optout.
