I recently came across a https://www.sparkfun.com/products/11770 and wanted to adapt it for my arduino. How would I go about doing this?
It looks like the break out has a serial and a clock pin. I am not sure how to set up a clock.
Read the information on the Sparkfun link and follow it to the hookup guide and example code.
hint: Google it with the word "arduino" as the first keyword
I got it to work but only when hooked up to SDA SCL lines of my arduino. I want to move those lines to say a digital pin. How would I do this?
I want to move those lines to say a digital pin. How would I do this?
You can move them, but your sensor won't work if you do. It needs to be on SDA and SCL to read the data from the sensor, they are special pins.
research "arduino I2C connections interface"
I got it to work but only when hooked up to SDA SCL lines of my arduino. I want to move those lines to say a digital pin. How would I do this?
The reason that you got it to work only when hooked up to SDA SCL lines of your Arduino is because that particular device uses the I2C protocol to communicate. The ATMega microprocessors contain a subsystem especially designed to generate the signals needed to use this protocol and each device brings the connections out to specific pins. If you want to use the built in subsystem then you will have to use the pins specified by Atmel (and thus also by Arduino).
To answer your question - it is entirely possible to generate those signals in software and you can write the software to use any available I/O pins. The semi slang term for doing this is called 'bit banging' and this is what you should be searching for.
A quick search on Google for bit bang I2C got me this (I can't vouch for how good it is): --> Coding Laboratory: I2C on an AVR using bit banging
Since the term I2C is a registered trademark Atmel calls the interface TWI (three wire interface) and that is the term you will have to look for in Atmel documentation such as the ATMega328 datasheet. Everyone else uses I2C in spite of the trademark so that is why it was recommended that you look for I2C when using Google.
Don
like that's going to happen....
I want to move those lines to say a digital pin.
Why ?
raschemmel:
Why ?
I need to use the accelerometer with an arduino pro mini and that does not have a SDA or SCL pin.
I need to use the accelerometer with an arduino pro mini and that does not have a SDA or SCL pin.
It most certainly does have the pads. None of the Pro-Minis come with pins installed You have to solder the headers on as well as the two pin header for the I2C pins SDA & SCL. I have two Pro Minis and I use them with I2C all the time.
see attached photos
look at the backside
see the two pads labeled A4 and A5 ?
A4=SDA
A5=SCL
How do like them apples ?
I think you (rudely) meant "How do you like them apples?"
Don
If my post looks rude then check out this one: MEGA 2560 reset voltage - #20 by system - Microcontrollers - Arduino Forum
Your information was good, I think a more appropriate response would have been to stop before the SHOUTING and add the second photo.
Ouch!
It's much better without the offending phrase. It would be even better without the SHOUTING that precedes where the phrase was.
Don
It seems as thought the OP disappeared without saying goodbye when he found out that there was no reason for his post.
Well you gave him the answer that solved his problem - but he should have acknowledged that fact.
Don
Yes, thank you that did solve my problem. I just overlooked the pads on my pro mini.
floresta:
but he should have acknowledged that fact.
And sorry to not thank both of you for your help.
I guess I'm left with the apples.... XD

