Show minor edits - Show changes to markup
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde lang=arduino tabwidth=4:)
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino lang=arduino tabwidth=4:)
Attach the SDA pin of your SRFxx to analog pin 4 of your Arduino, and the SCL pin to analog pin 5. Power your SRFxx from 5V, with the addition of a 100uf capacitor in parallel with the range finder to smooth it's power supply.
Wire.begin()]]
Wire.beginTransmission()
Wire.endTransmission()
Wire.send()
Wire.RequestFrom()
Wire.receive()
Describe what's going on here
If using two SRFxxs on the same line, you must ensure that they do not share the same address. Instructions for re-addressing the range finders can be found at the bottom of the code below.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates via the I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates via the I2C synchronous serial protocol, using Arduino's Wire Library.
Description
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via the I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates via the I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via the I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx, an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
This example shows how to read a Devantech SRFxx , an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
Because this protocol allows for each 12C enabled device to have it's own address, and both master and slave devices to take turns communicating over a single line, it is possible for your Arduino to communicate with many devices (in turn) while using just two wires.
Because the 12C protocol allows for each enabled device to have it's own unique address, and as both master and slave devices to take turns communicating over a single line, it is possible for your Arduino to communicate with many devices (in turn) while using just two pins of your microcontroller.
Because this protocol allows for each 12C enabled device to have it's own address, and both master and slave devices to take turns communicating over a single line, it is possible to communicate with many devices in turn while using just two pins on your Arduino.
Because this protocol allows for each 12C enabled device to have it's own address, and both master and slave devices to take turns communicating over a single line, it is possible for your Arduino to communicate with many devices (in turn) while using just two wires.
This example shows how to read a Devantech SRFxx, an ultra-sonic range finder which communicates it's data via an I2C synchronous serial protocol, using Arduino's Wire Library.
The I2C protocol involves using two wires to send and receive data: a serial clock pin (SCL) that the Arduino pulses at a regular interval, and a serial data pin (SDA) over which data is sent between the two devices. As the clock pulse changes from low to high (known as the rising edge of the clock), a bit of information containing the address of a specific device and a request for data, is transferred from the Arduino to the I2C devices over the SDA line. When the clock pin changes from high to low (the falling edge of the clock), the called upon device transmits it's data back to the Arduino over the same line.
Because this protocol allows for each 12C enabled device to have it's own address, and both master and slave devices to take turns communicating over a single line, it is possible to communicate with many devices in turn while using just two pins on your Arduino.
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRanger_Reader/SFRRanger_Reader.pde lang=arduino tabwidth=4:)
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde lang=arduino tabwidth=4:)
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRangerReader/SFRRangerReader.pde lang=arduino tabwidth=4:)
(:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRanger_Reader/SFRRanger_Reader.pde lang=arduino tabwidth=4:)
Examples > Wire Library
Description
(:div class=BOM :)
(:divend:)
(:div class=circuit :)
image developed using Fritzing. For more circuit examples, see the Fritzing project page
(:divend:)
(:div class=circuit :)
(:divend:)
Describe what's going on here
(:div class=code :) (:source http://github.com/arduino/Arduino/raw/master/libraries/Wire/examples/SFRRangerReader/SFRRangerReader.pde lang=arduino tabwidth=4:) (:divend:)