Jump to content

Using Arduino Devices


Recommended Posts

Arduinos are electrical swiss army knives - they allow your system to do all kinds of things.


As you know, Arduinos have lots of pins capable of digital IO, analog input, PWM and servo output.  The system can configure an Arduino pin for any of the modes it's capable of, and there are also additional modes for Schmitt triggers (for analog inputs), and optional debouncing for digital input pins (see http://www.catalinacomputing.com/docs/Devices/Arduino/ArduinoPinTypes for details).


Connect an Arduino to your system host's USB port, use any of the Arduino pin scripts to configure the Arduino pins, and they'll appear as terminals in your system's Device Explorer.  Inputs will display their analog or digital values, outputs will respond to whatever values you assign their terminals (digital outputs respond to on/off, servo and PWM outputs respond to 0-100 type values).  If you virtually wire the Arduino terminal to other parts of the system, your system can respond to Arduino input pins and control things using the output pins.


I've used Arduinos to connect the system to temperature sensors, relays (for turning higher currents and voltages on and off), LEDs (PWM pins make great dimmers), sound sensors, hall sensors (sense currents and magnets), AC current sensors, servos, potentiometers, light sensors, motion sensors, moisture sensors, buttons, switches ... long list, so I'll stop here.


You don't have to write any Arduino code to use these devices - uses Arduinos running Firmata (often comes preloaded when you buy Arduinos).  Don't have to write any code at all.  Just wire the devices the the Arduino, configure the Arduino pins with scripts,  and you can monitor and control the devices from the Device Explorer web page (and you can virtually wire them to each other or other parts of the system).

Link to comment
Share on other sites

I'd like to manipulate a servo.  Looks like I just hook the servo control input to an Arduino servo output pin, use the ServoOutputs script to configure the Arduino, and then I can manipulate the servo from the Device Explorer page.  Sound about right?

Link to comment
Share on other sites

Yup.  And you'll need to connect the servo's two power wires to 0 and 5V (or whatever voltage the servo spec says).


There's a really clean way to wire servos to Arduinos.  The Grove system (see seeedstudio.com) has an Arduino "Base Shield" which brings the Arduino I/O pins and 5V power out to small headers (see http://www.catalinacomputing.com/docs/Devices/Arduino/ArduinoDevice for some pictures).  They also make a wiring harness that plugs into the shield and plugs into a standard servo connector.  Using the Base shield, you can wire your Arduino and servo together without breadboarding, and the connectors are all keyed, which makes them pretty idiot proof.  Because the shield only brings the Arduino 5V power to the connectors, your servo needs to work using 5V (many do).


If you are using an Arduino Uno (and most of the other models, too), you can have servo pins on any of the 12 lowest available digital pins (D2-D13) .  You'll want to connect your servo to one of those pins.  If you hook your servo to pin D3 on the Arduino and want it called "servo", you'd click on the ServoOutputs script and fill in the dialog box with:


arduino_id: "arduino"
names: "servo"

pins: 3


I'm assuming you've already installed an Arduino into your system by running the Arduino script, with Arduino ID "arduino".


After running the servo script, go to the Device Explorer page, click on the "servo" terminal, enter any value from 0-180, and watch the servo respond.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...