Tag Archives: RBPi

LIDAR and the Raspberry Pi

For hackers and DIY enthusiasts, it is always a challenge to make correct measurements between their robots and nearby objects such as an autonomous vehicle. Estimating the distance is important for the robot to make a decision about avoiding bumping into obstacles. Although this may be considered trivial for a small robot running into a wall, it could turn out deadly for the same robot encountering an autonomous vehicle.

In 2013, NASA held a competition called SRR or Sample Return Robot, where several entrants used various techniques for making measurements using visual aids such as cameras. Two entrants used LIDAR, which can also be used with the single board computer, the Raspberry Pi, or RBPi.

Although using similar methods, LIDAR uses light for measurements, rather than its forerunner RADAR or Radio Detection and Ranging. According to the Merriam-Webster dictionary, LIDAR was first used 1963 for measurement of clouds and Apollo 13 used it to measure the surface of the moon. Since then, the reductions in the size of lasers have led to additional uses, including the military using LIDAR for range finding.

A scanning LIDAR uses the laser beam to sweep a wide area both vertically and horizontally. The feedback provides a cloud of distantness measurement points. This is similar to aircraft control radar swinging a beam through the sky. There are two principal methods for measuring distances using a laser. One is to measure the time of flight of a laser pulse and the other is to measure the angle by which the laser beam deflects.

For the time of flight measurement, you send out a pulse of laser and measure the time for the signal to return. That time divided by the speed of light gives the distance the laser traveled out and back. The distance to the object is then half the calculated distance. Given the high speed at which light travels, it is difficult to measure distances below a meter using lasers, because light would be returning in about seven nanoseconds. LIDAR uses continuous modulation of the laser by amplitude or frequency and measures the phase difference between the transmitted and received signals. This process using modulation allows measurements down to centimeters.

The LIDAR is actually a sealed unit with a motor at one end that spins a turret at about 300 RPM. Inside the turret are the laser and the receiving sensor. Spinning allows a 360-degree scan of the surrounding area. There are two optical ports out of the turret, corresponding to the laser and the sensor. A two-pin connector provides power to the motor. Another four pin connector is for supplying the inner control and serial interface circuits with 5V and 3V3 DC.

WiringPi is a library of programming the GPIO on the RBPi that offers an absurdly simple and minimal user interface for handling the LIDAR. Additionally, WiringPi is suitable for several RBPi models. Another advantage in using WiringPi is its ability to do hardware PWM on one GPIO pin of the RBPi. Another possibility is to use PID or Proportional Integral Differential control system in a loop to maintain constant speed of the turret motor.

Raspberry Pi and Mathematica Control Telescopes

The single board computer, the Raspberry Pi or RBPi is a versatile device helping youngsters learn computer programming. Its advantages do not stop there, because many hobbyists and DIY enthusiasts also use the RBPi for their numerous innovative projects. For example, Tom Sherlock, an amateur astronomer, has put the RBPi to good use for controlling his telescope. Along with the RBPi, Tom uses Mathematica and the Wolfram language for his telescope control.

Amateur astronomers such as Tom use Mathematica in their hobby to process and improve the images they take of planets and nebulas. They use the Wolfram language to control their astronomical hardware. This consists mainly of controlling the drive on the telescope mount, as this is necessary when automating an observing session.

The process is an important one for the amateur astronomers who use their computerized telescopes for hunting down transient phenomenon such as supernovas. Existing software can take care of the several tasks required by astronomers such as locating objects, managing data and performing image processing, However, automating all the various tasks that an observation session needs, is a great help.

Mathematica is a very useful tool for astronomers. It helps in automating and unifying many of the above operations. Within Mathematica, you have a huge amount of useful astronomical data, which includes the coordinates of several thousand planets, asteroids, galaxies, nebula, and stars. The image handling and processing capability of Mathematica is extremely useful when processing astronomical data.

Tom had earlier interfaced with telescope mounts using an existing library of functions known as ASCOM, a powerful tool for driving domes and filter wheels, mainly associated with astronomy. However, ASCOM has to be pre-installed on a PC and therefore, is rather limited in its use. Using Mathematica allows one to drive the telescope mount directly from any platform and does not need any special setup.

According to Tom, most telescope mounts follow one of two serial protocols for their control. These are the Celestron NexStar protocol or the Meade LX200 protocol. Many non-Meade telescope mounts, such as those from Astro-Physics and Losmandy, also follow the LX200 protocol. Those produced by the Orion Atlas/Sirius family of computerized mounts follow the NexStar protocol just as the Celestron telescopes and mounts do.

The LX200 protocol requires the right ascension (RA) function specified by a string such as HH:MM:SS and the declination (Dec) by a string in the form of DD:MM:SS. These are the basics for slewing the telescope to a target at coordinates specified by the RA and the Dec strings.

You will need an inexpensive USB-to-Serial adapter for creating the RS232 port that the RBPi does not normally have. You also need a small wireless network adapter that fits in the RBPi USB socket. As RBPi uses the Linux operating system, it is easy to use the Wolfram language code for controlling the telescope through the serial port. Additionally, the RBPi can be networked wirelessly. That makes it possible to control it from inside the house, necessary when the weather outside is cold.

Does the Raspberry Pi 3 Run Hotter than the Raspberry Pi 2?

Several people are now eagerly using and testing the new SBC or single board computer from the Raspberry Pi Foundation, the Raspberry Pi Model 3, or RBPi3. Although the overall response has been of enthusiastic welcome, there are some notes of concern as to the new board running rather warm under load. Michael Larabel has run some tests to compare and show just how warm the RBPi3 can get when compared to what the RBPi2 does. Finally, we suggest some remedies for cooling down the RBPi3.

Michael has used the Phoronix Test Suite while monitoring the SoC temperature on both, the RBPi3 and RBPi2, when running the same benchmarks in the same manner for both. One important point to note is the RBPi2 was running inside its case, while the RBPi3 ran completely exposed.

The average temperature of the SoC on the RBPi3 under load was 61∞C, peaking at 82∞C. Under the same conditions, the RBPi2 (within its case), recorded an average temperature of 48.9∞C, peaking at 59∞C. That means the RBPi3 under load, operating in open air, was peaking at more than 20∞C, over its predecessor. That also means if you are planning to put the RBPi3 inside a case when operating, it might make matters worse.

Therefore, if you are planning to stress your RBPi3 routinely, you might consider the following options to keep the RBPi3 temperature down.

Wait for the Linux 4.6 kernel

According to Eric Anholt from Broadcom, the VC4 DRM driver is undergoing an update to get into the Linux 4.6 kernel merge window. This will include a significant 3D improvement in performance and a fix to the HDMI hotplug detection for the RBPi2 and RBPi3. The improvement in performance comes from the RBPi kernel DRM driver pairing with the user-space driver of the VC4 Gallium3D.

Better performance is mainly due to the pipelining, binning and rendering jobs from using xllperf or GLAMOR over OpenGL, which boosts the performance by over 20-30%. The hardware is capable of running separate threads simultaneously for binning and rendering, while OpenGl waits for them to complete before it submits the next job.

Wait for the 64-bit Raspbian

Michael has done some tests to show that there is a conclusive evidence of performance difference between using 64-bit software on supported hardware over a 32-bit operating system. Since the new RBPi3 is a 64-bit system at hardware level, the results should apply to this SBC as well.

For the test, Michael has used an Intel UX301LAA ultrabook with 8GB of RAM and 128GB SanDisk SSD. The operating system was Ubuntu 16.04 daily ISO build, in 64-bit and 32-bits version.

The average power used by the 64-bit system was 30.1W compared to 31.9W by the 32-bit system. Lowest power consumption with 64-bit build was 8.5W compared to 9.4W. The peak power consumed by the 32-bit system was higher at 54.3W compared to 49.7W by the 64-bit system.

Use a Heat Sink to Cool the RBPi3 immediately

For immediate relief, you can use the passive heatsink available that fits the RBPi2 as well as the RBPi3. At $5 from Amazon, this solution is cost-effective in addition to being immediately available. Moreover, the heatsink will drop the temperature of the SoC by almost half.

Latest Touch Display for the Raspberry Pi

Those who were on the lookout for a proper touch display for their single board computer, the Raspberry Pi or RBPi can now rest easy. The official RBPi touch display is on sale at several stores and others will be receiving stock very soon. Users of RBPi models such as Rev 2.1, B+, A+ and Pi 2 can now use the simple embeddable display, instead of having to hook it up to a TV or a monitor. Watch the You-Tube video demonstration for a better understanding.

The new official touch display for the RBPi is a 7” touchscreen LCD. A conversion board interlinks the display module with the LCD and plugs into the RBPi through the display connector. Although the ribbon cable is the same as that used by the camera, the two do not work interchangeably. Therefore, identify the display connector first, before plugging in the ribbon cable from the display.

You can power up the display in one of three ways: using a separate power supply, using a USB link or by using GPIO jumpers. When using a separate power supply, you need a separate USB power supply with a micro-USB connector cable. The power supply must have a rating of at least 500mA and requires plugging in to the display board at PWR IN.

It is also possible to power the RBPi through the display board. For this, use an official RBPi power supply of rating 2A and plug it into the display board at PWR IN. Use another standard micro-USB connector cable from the PWR OUT connector and plug it into the RBPi power in point.

Powering the display from the RBPi GPIO requires using two jumpers – one from the 5V and the other from the GND pins of the GPIO.

After plugging in the ribbon cable and making one of the above power connections between the RBPi and the display, using the display requires updating and upgrading the OS on the RBPi. On rebooting, the OS automatically identifies the new display and starts to use it as its default display rather than the HDMI. To allow the HDMI display to stay on as default, the config.txt file must contain the line:

display_default_lcd=0

For further setup steps, follow these instructions.

The RBPi display comes with an integrated 10-point touchscreen. The driver for the touchscreen is capable of outputting both full multi-touch events and standard mouse events. Therefore, it is capable of working with ‘X’ – the display system of Linux, although X was never designed to work with a touchscreen.

For finger touch operations in cross-platform applications, the Python GUI development system Kivy is a great help. Although designed to work with touchscreen devices on tablets and phones, Kivy works fine with RBPi.

The 7” touchscreen display for the RBPi is of industrial quality from Inelco Hunter and boasts of an RGB display with a resolution of 800×480 at 60fps. It displays images with 24-bit color and a 70-degree viewing angle. The metal backed display has mounting holes for the RBPi and comes with an FT5406 10-point capacitive touchscreen.

The GoPiGo Robot Kit for the Raspberry Pi

Making a robot work with the tiny computer Raspberry Pi or RBPi has never been so easy. If you use the RBPi robot kit GoPiGo, all you will need is a small screwdriver with a Phillips head. The GoPiGo kit comes in a box that contains a battery box for eight or 6 AA batteries, two bags of hardware, two bags of acrylic parts, two motors, the GoPiGo board and a pair of wheels. For assembling all this into a working robot, follow these step-by-step instructions.

You start with the biggest acrylic part in the kit, the body plate or the chassis of the GoPiGo. Lay the plate on the GoPiGo circuit board and align the two holes with those on the circuit board. Place two short hex spacers in the holes below the body plate to make sure of which way is the upper side.

Next, you must attach the motors to the chassis. Use the four acrylic Ts in the kit for attaching two motors. Do not over tighten the bolts while attaching the motors, as this may crack the acrylic.

With the motors in place, it is time to attach the two encoders, one for each motor. These encoders fit on the inside of the motors and poke through the acrylic chassis of the GoPiGo. Encoders are an important part, providing feedback on speed and direction of rotation of the motor. If the encoders will not stay on, use blue ticky tacky to make them stay.

Now it is time to attach the GoPiGo board to the chassis. Place the GoPiGo board on the spacers and line its holes with the holes in the board before holding them together with screws. Two hex supports on the back of the GoPiGo board allow you to attach the castor wheel.

That brings us to attaching the wheels to the GoPiGo. You must do this gently, backing the wheels so they do not touch or rub against the screws. The battery box comes next, to be placed as far back on the chassis as possible. This gives it extra space and prevents the box from hitting the SD card on the RBPi.

This completes the mechanical assembly of the GoPiGo robot and only the RBPi remains to be attached. Locate the black plastic female connector on the GoPiGo and slide the GPIO pins of the RBPi into this connector. The RBPi remains protected by a protected plate or a canopy that has to be attached by screwing it on to the chassis.

Make the electrical connections according to the instructions. Be careful while flashing the GoPiGo hardware and leave the motors unconnected during the flashing. After connecting the GoPiGo for the first time, if you find any motor running backwards, simply reverse its connector.

GoPiGo comes with an ATMega 328 micro-controller, operating on 7-12VDC. SN7544 ICs handle the motor control part, which has two optical encoders using 18 pulse counts per rotation and a wheel diameter of 65 mm. External interfaces include single ports of I2C, Serial, analog and digital/PWM. The idling current consumed is about 3-500 mA, and full load current is 800 mA – 2A with both the motors, the servo and the camera running with the RBPi model B+.

A Raspberry Pi HAT with 16-Channel PWM Servo

DC servo motors are a few of the things that the single board computer, Raspberry Pi or RBPi, finds uncomfortable. The reason being the specific and repetitive timing pulses these motors require for setting their position, which the RBPi is unable to provide in the absence of a real time clock. Although the Linux kernel can do the job, it leaves the RBPi rather over taxed.

A HAT or Hardware Attached on Top board eases the situation. It takes care of all the timing requirements, runs and controls 16 Servos, and is capable of delivering pulse width modulated or PWM signals up to 1.6 KHz using 12-bit precision. Additionally, all this is completely free running that leaves the RBPi to handle everything else.

The 16-Channel 12-bit PWM/Servo HAT from Adafruit can drive 16 servos simultaneously or output PWM signals. It communicates with the RBPi through only two pins using the I2C protocol. Additional RBPi processing overhead is not required for the on-board PWM controller on the HAT board to drive all the 16 channels at a time. Moreover, you can stack more HAT boards – up to 62 of them and control 992 servos – all with only the same two pins.

Adafruit offers a Python library that you can use to immediately set up and run the servos to make your robotic system come to life. When you need to run several servos, this HAT and the Python library to go with it are the simplest and perfect solution.

The HAT board requires two levels of DC voltages. The 3V3 DC comes from the RBPi to power the PWM chip and to decide the logic levels for the PWM signals and the I2C signals. The voltage is available as soon as you plug in the RBPi – shown by the PWR or the red LED on the RBPi.

The other voltage is required for the servos, for which you need to supply 5-6V DC. Usually, most servos will be happy with only 5V, and will work a little more strongly if you give them 6V. You can connect this supply via the DC jack or the blue terminals on the HAT board. A reverse-polarity diode protects the board in case you have the wires connected in reverse. However, do not use both the DC jack and the terminal block at the same time.

Keep in mind that servos need a lot of current from the 6V DC supply. Even if you are using micro servos, they will draw several hundred mA when moving. Larger servos will need more power and you should have provision of about 2A for up to four servos. That means it is not recommended drawing this power from the 5V supply of the RBPi, as it could cause your RBPi to behave erratically. Keeping the servo power supply and the RBPi power supply totally separate gives good results.

On the RBPi, there is a place for soldering a through-hole capacitor. It is a good idea to use one if you are driving many servos. Switching motors generate dips and spikes on the power lines and these can upset the RBPi. A capacitor takes care of the sudden variations – use n*100µF, where n is the number of servos.

Make Your Raspberry Pi Follow Walls

The versatile single board computer, the Raspberry Pi or RBPi, makes an excellent base for an autonomous bot using a rover 5 platform. The bot uses custom laser range finders for basic wall following. It features speed control of each track, regulated by PID using feedback from its quadrature encoders, giving it the ability of directional control. The basic features are explained below.

Batteries power the bot, feeding two separate switching mode regulators. One supplies power to the motors via the H-bridge, while the other powers the RBPi and other electronic devices. The H-bridge and the SMPS reside on the lower layer of the bot, while the sensors and the RBPi are on the upper layer. Mechanical standoffs separate the two layers, and the physical separation between the two layers creates a barrier for the electromagnetic fields from the power system that would otherwise affect the compass.

A Pixy CMUCam and a line laser form the laser range finding system of the bot. A simple piece of PVC pipe with slots cut into it breaks up the beam from the line laser. That allows the cam to recognize the color of the laser blobs as it reports this data via I2C to the RBPi, which then uses simple trigonometry for converting the data into vectors representing range and angles.

A sonar device mounted on the front of the bot implements a fairly simple crash prevention mechanism. The laser range finding system may also be used for a more sophisticated crash prevention system. Even though the bot is meant for autonomous operation, it also has a basic user interface built-in to allow control for testing purposes. The interface allows simple operations such as setting the heading and limiting the forward and backward speeds. It uses some feedback from the current heading of the robot.

For testing the laser range finding, the bot has a built-in GMR or graphical mapping representation, but in a minimal configuration. Using the GMR reveals a basic difference between the mapping from the sonar device and that from the laser range finder. For example, the sonar data interprets long flat surfaces as convex, but the data from the laser shows them to be perfectly straight – implying the laser range finding is linear.

A custom mount holds both webcams and the laser line. As the cases of the webcams made it difficult to mount them, they had to be removed from their casings. One of the cams faces 25-degrees to the left, while the other faces 25-degrees to the right. That gives a 100-degree field of view to the bot. Both the cams are tilted upwards such that the bottom-line of their images is just below the horizontal.

The software processes the images and locates the laser line to calculate ranges. It makes 30 vertical scans from the top of the image looking for the laser line. Looking specifically for a laser line makes it simpler as the line is never vertical. Therefore, every point located on the line has a neighboring point.

PIXY: Versatile CAM for Your Raspberry Pi

If you are looking for a small, fast, low-cost, easy-to-use, and readily available vision system for your Raspberry Pi or RBPi, then the Pixy can be a great choice. Pixy or CMUCam5 is somewhat more than a normal camera that you may have used so far for your single board computer. It comes with several features not available on most camera systems.

First, Pixy is versatile – use it for all kinds of projects. Along with the hardware, you will receive all kinds of information – PCB layout, bill of materials, schematics, and other hardware documentation. All software/firmware is GNU-licensed and open-source. The configuration utility provided with Pixy runs on all platforms – Windows, MacOS, and Linux. RBPi can communicate with Pixy over one of several interfaces – analog/digital output, USB, UART, I2C, or SPI. The Pixy comes with all libraries for RBPi, BeagleBone, and Arduino and supports programs written in Python and C/C++. The cable provided with Pixy can connect directly to Arduino, and it also works with BeagleBone and RBPi.

On the performance side, Pixy can learn to detect and recognize objects that you have taught it and outputs what it detects 50 times per second. With a Pixy, an RBPi and a servo control board, you can reconstruct Wall-E, the waste-collecting robot.

Pixy resulted from a partnership of the Carnegie Mellon Robotics Institute with Charmed Labs. First started as a Kickstarter campaign, Pixy is now the most popular vision system since it first started selling in March 2014. You can gage the versatility of Pixy from the activities it can do in association with an RBPi – pick up objects, chase a ball, locate a charging station, and more – doing all this with a single vision sensor.

Although there are other vision systems that can sense or detect practically anything, almost all of them have two drawbacks. One, they output huge amounts of data, a few megabytes per second. Two, enormous computing power is necessary to process this data, leaving the attached SBC with little else to cater to other tasks.

Pixy gets around these barriers as it pairs a powerful and dedicated processor along with its image sensor. The processor does all the processing of the data captured by the image sensor, and sends only the relevant information to the attached SBC. For example, yellow ball detected at x=50, y=110. Therefore, the RBPi can easily talk to Pixy and still have enough computing power left over for other activities. That also means you can have multiple Pixy cams hooked up to your RBPi. For instance, you can make a robot with a 360-degree sensing capability with four Pixys.

Although Pixy began with interfacing capabilities with the Arduino controller, it has matured sufficiently to be able to communicate with other controllers as well. The Pixy comes with all sorts of software libraries and a Python API for connecting to Linux-based controllers, such as an RBPi.

On-board Pixy is a color-based filtering algorithm that helps in detecting colored objects. The popular color-based filtering method makes Pixy singularly fast, efficient, and relatively robust. Pixy examines each RGB pixel from the image sensor and computes the saturation and hue to use as its primary filtering parameters.

An Energenie Pi-Mote controller Board for Your Raspberry Pi

Those looking for a low-cost automation and home control solution can use the Pi-Mote controller board from Energenie. The Pi-Mote controller board is an add-on for your single board computer, the Raspberry Pi or more simply, RBPi. With this combination, you can control electrical appliances connected to special radio controlled electrical sockets.

Working at 433.92 MHz, the Pi-Mote controller board for radio-controlled sockets is easy to install and command. The product offers a safe and simple way to let your RBPi control mains powered devices and appliances. The Pi-Mote controller board from Energenie is compatible with all RBPi models such as the A, A+, B, B+ and B2.

The Pi-Mote controller has a range of up to 30 meters and puts out an output power of 3V, 27mA at +12 dBm. The output is encoded at four data bits, offering a 20-bit address pre-set with OTP. The user can select the output modulation with software from OOK or FSK.

The product actually comes in two parts, the RF board and the electrical socket. The RF board attaches to the RBPi for controlling several 13A, 3-pin electrical sockets. Although the original Energenie sockets are meant for use in the UK, plug adapter sockets are available, which make these almost universal. You can also get kits with a 4-way extension lead and other compatible sockets from Energenie. All can be controlled from the Pi-Mote controller board.

A small Python program allows the add-on RF transmitter board to control up to 4 radio controlled sockets simultaneously by toggling the socket on and off individually. The add-on board attaches to the GPIO pins of the RBPi. In its basic form, each board transmits a frame of information to the sockets. The frame is made up of a 20-bit address and a 4-bit control data. Additionally, the frame uses the On-Off Keying or OOK technique, a basic form of Amplitude Shift Keying or ASK. The source addresses are pre-programmed and the user cannot change them.

When using the Pi-Mote controller, you are required to insert the radio-controlled socket into the mains wall socket and switch it on. The socket then enters a learning mode, which is indicated by the slowly flashing LED in front of the socket housing. You can force a socket to enter the learning mode at any time by pressing the green button on its housing form, holding it for five seconds and releasing it.

Once it is in the learning mode, send the socket a signal from the program running on the RBPi. The LED on the socket housing gives a brief flash and stops glowing. This indicates the socket has accepted and memorized its address. You can then program the rest of the three sockets in turn; otherwise, they will react to the same address. When using more than one socket, insert each into separate mains wall outlets, maintaining a physical separation of at least 2 meters so they do not interfere with each other. The sockets must not be put into a single extension lead.

Expand the Ports of your Raspberry Pi

The ubiquitous single board computer, the Raspberry Pi, or the RBPi, as it is fondly called by its users, is rich in General Purpose Input Output or GPIO pins. These are lined up on the board in two rows of 13 easily accessible pins, totaling 26 of which 17 are GPIO pins, the others being either power or ground pins.

GPIO pins provide a physical interface between the RBPi and the external world. Speaking plainly, these act as switches that the user can turn on or off as inputs or the RBPi can turn on or off as outputs. GPIO pins are physically arranged along the edge of the RBPi board, next to the yellow output socket for video.

To allow the RBPi to interact with the real world, you can program the pins in amazing ways. For example, there need not be a physical switch to connect inputs. Inputs can come from a signal from a device such as another computer or a sensor. Similarly, outputs can be made to do almost anything, such as sending data or signal to another device such as an LED.

One of the advantages of having an RBPi on a network is you can control devices attached to it from remote places, while collecting data from those devices. Connecting to and controlling physical devices over the Internet is exciting and a powerful feature best done by the RBPi.

However, some applications demand more input and output pins apart from the 17 that are available on the RBPi. That requires the user to expand the GPIO pins and this they can easily do by using the Quick2Wire Port Expander board. The board adds 16 more GPIO pins to the RBPi’s 17, so you can now have 33 GPIO pins with one expander board.

Additionally, you can stack more boards to have more GPIO pins. Each expander board can be preset with a configurable address via DIP switches on-board. Since eight addresses are possible, you can add eight more boards. Each board communicates to the RBPi via the I2C bus.

The Inter Integrated Circuit Communication protocol, called I2C in short, links the micro-controller or microcomputer to other micros or circuits. Another similar protocol is the Serial-Parallel Interface or the SPI. Both protocols are widely used for robotics and hobby electronics projects.

NXP (originally Philips) developed the I2C protocol. This is a very popular protocol used in several equipment including computer motherboards, monitors and TVs. Although a very flexible protocol, I2C is rather limited in its bandwidth.

Freescale (originally Motorola) developed the SPI protocol, which is much faster as compared to I2C. However, it is somewhat more complicated to use and has its own limitations.

Modern micro-controllers now support both protocols. These include the RBPi, Arduino, BeagleBone and BeagleBoard. Therefore, with I2C, you can control a host of devices, treating them as slaves and using two lines SDA and SCL. With SPI, data rates of over 10 MHz are common. Data transfer happens over three lines, one of which carries the clock and the other two communicate between the master and the slave.