Hardware Reference
In-Depth Information
A typical relay is a mechanical switch that can handle larger amounts of
electricity. That switch can be turned on or off with a small amount of elec-
tricity.
It's possible to buy a relay and then do the wiring so that it's switching the
power source that you want to control. However there's a fantastic product
called the PowerSwitch Tail which makes it easy to use a development board
like the Galileo to control appliances that plug into the wall. You don't need
to do much wiring at all because your appliance will plug right into the Pow-
erSwitch Tail and the PowerSwitch Tail will plug into your wall outlet (see
Figure 3-16 ).
Figure 3-16. The PowerSwitch Tail helps you move from controlling LEDs to
controlling high voltage A/C devices that plug into your wall outlet.
You only need to wire up ground and one of Galileo's digital out pins to the
Power-Switch Tail, then it's only a matter of using digitalWrite to turn it on
and off:
// Turn the blender on for one second:
digitalWrite(powerSwitchTailPin, HIGH);
delay(1000);
digitalWrite(powerSwitchTailPin, LOW);
Controlling Servos
A typical hobby servo motor is a small motor that can set and hold the posi-
tion of its axle depending on the pulses of electricity being sent to it, usually
with a 180 degrees of rotation ( Figure 3-17 ). It's powered by a connection to
Search WWH ::




Custom Search