- Isn’t it time for Fair Trade Electronics?Posted 21 hours ago
- Get in touch with your Things – SoulissPosted 7 days ago
- Facebook counter – How many Likes to your facebook fanpage?Posted 9 days ago
- How to build an Omni Wheels RobotPosted 14 days ago
- A new board for the 3Drag: there’s more than SanguinololuPosted 23 days ago
- Meet the founders! An interview with Circuits.ioPosted 26 days ago
- An ultra customizable LCD Shield for ArduinoPosted 29 days ago
- Join the FabJam! on the 4th of May!Posted 30 days ago
- Kinect for 3D scansPosted 34 days ago
- A Bluetooth RN-42 Demoboard for experimentationPosted 36 days ago
Relay Shield for Arduino

Shield to control 6 relay, 6 digital input and 6 analog input with Arduino Duemilanove, Arduino UNO or Seeeduino. The digital inputs and relay outputs are equipped with an LED that indicates the status. The lines of I/O are connected to the Arduino through corresponding pin-strip pitch 2.54 mm. It gets its power directly from the Arduino module, which provides the 5 volt regulator derived from their contacts between the 5V and GND. The mini-relay Shield of work at 12 volts, so that the relays are working properly will have to connect the Arduino module with an external power supply can provide this voltage. The card can be used in many applications and in many ways. Find in this page a little sketch as to manage I/O via serial commands.
|
//Relay Shield
//by Boris Landoni
//www.open-electronics.org
//www.futurashop.it
// Variables will change:
int in=0;
int out=0;
int an=0;
int inByte=0;
// the follow variables is a long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long interval = 1000; // interval at which to blink (milliseconds)
void setup() {
// start serial port at 9600 bps:
Serial.begin(9600);
// set the digital pin as output:
for (int out=8; out<=13; out++){
pinMode(out, OUTPUT);
}
}
void loop()
{
// here is where you'd put code that needs to be running all the time.
// check to see if it's time to blink the LED; that is, if the
// difference between the current time and last time you blinked
// the LED is bigger than the interval at which you want to
// blink the LED.
if (Serial.available() > 0) {
protocollo();
}
}
void protocollo()
{
inByte = Serial.read();
switch (inByte)
{
case 79: //O out
Serial.println("Out number? (1 to 6)"); // send an initial string
while (Serial.available() <= 0)
{
delay(300);
}
out = Serial.read()-48;
Serial.println("ricevuto ");
Serial.print(out);
if (out>=1&&out<=6)
{
out=out+7;
if (!digitalRead(out))
digitalWrite(out, HIGH);
else
digitalWrite(out, LOW);
Serial.print("Out ");
Serial.print(out-7);
Serial.print(" = ");
Serial.println(digitalRead(out));
}
break;
case 73: //I
//input
Serial.println("In number? (1 to 6)"); // send an initial string
while (Serial.available() <= 0)
{
delay(300);
}
in = Serial.read()-48;
if (in>=1&&in<=6){
in=in+1;
Serial.print("In ");
Serial.print(in-1);
Serial.print(" = ");
Serial.println(digitalRead(in));
}
break;
case 65: //A
//analog
Serial.println("Analog number? (1 to 6)"); // send an initial string
while (Serial.available() <= 0)
{
delay(300);
}
an = Serial.read()-48;
if (an>=1&&an<=6){
an=an-1;
Serial.print("Analog ");
Serial.print(an+1);
Serial.print(" = ");
Serial.println(analogRead(an));
}
break;
//default:
// if nothing else matches, do the default
// default is optional
}
}
About administrator
Related Posts
Opinions
-
Isn’t it time for Fair Trade Electronics?
Perhaps because of resources crisis that we live, finally, a...
- Posted 21 hours ago
- 0
-
DEFCAD. A CrackDown on 3D printable Guns: Security or Censorship?
I was very impressed in the last days of the...
- Posted 12 days ago
- 1
-
Re-“Making” Education
This is the age of the maker. There is no...
- Posted 54 days ago
- 2
-
Crowdfunding your Open Source Eectronics Projects
Many of you may have wondered several times about...
- Posted 64 days ago
- 2
-
The Ultimate Comparison of IOT Development Boards
With this post we wanted to compare the latest arrived...
- Posted 69 days ago
- 21
Tutorials
-
AT Command Tester: the free online software tool to test GSM AT commands
AT command tester is a free online software tool that...
- Posted 91 days ago
- 2
-
How to make an Arduino shield with Eagle CAD – Tutorial
There are many CAD developed to assist the electronic designers...
- Posted 306 days ago
- 4
-
Arduino Full Memory: how to upgrade to the last ATMEL Toolchain version
This short report is aimed to the most “advanced” users...
- Posted 414 days ago
- 5
Mods and Hacks
-
Using GSM module to remotely control a green wall
We’re a Finnish start-up company which specializes in active green...
- Posted 44 days ago
- 0
-
Star Clock: Ikea Design, Arduino technology
IKEA’s Figgjo, is designed to be a mirror, but...
- Posted 56 days ago
- 0
-
IKEA SMS lamp with GSM shield
We create a lamp controlled by SMS...
- Posted 236 days ago
- 3
-
Arduino GSM shield
Download GSM_Shield_Library New GSM/GPRS library This is a...
- Posted 793 days ago
- 184
-
Localizer with SIM908 module
The device is based on a GSM/GPRS module with...
- Posted 350 days ago
- 102
-
GSM GPS shield for Arduino
Shield for Arduino designed and based on the module...
- Posted 261 days ago
- 75
-
Arduino ISP (In System Programming) and stand-alone circuits
We use an Arduino to program other ATmega without...
- Posted 434 days ago
- 67
-
Small Breakout for SIM900 GSM Module
Some post ago we presented a PCB to mount...
- Posted 726 days ago
- 58
-
Isn’t it time for Fair Trade Electronics?
Perhaps because of resources crisis that we live, finally,...
- Posted 21 hours ago
- 0
-
Autodesk acquires Tinkercad
In case you lost it, Autodesk announced they’ve signed...
- Posted 2 days ago
- 0
-
MakerCase – Easy Laser Cut Case Design
MakerCase is a website where you can generate files...
- Posted 5 days ago
- 0
-
Get in touch with your Things – Souliss
Some months ago we came across the RGB Shield...
- Posted 7 days ago
- 0
-
Othermill: a desktop 3D computer-controlled mill (on Kickstarter)
With our mill, you can produce custom...
- Posted 7 days ago
- 0
















Pingback: Electronics-Lab.com Blog » Blog Archive » Input/Output Shield for Arduino
Pingback: Ilinte