- Wireless Power TransferPosted 16 hours ago
- Robot Punchers with ArduinoPosted 2 days ago
- A minimal 3D-printed scalePosted 4 days ago
- Expanding the pins of a microcontrollerPosted 7 days ago
- Let’s create a small level with a matrix displayPosted 1 week ago
- ChatGPT: Writing Code with Artificial IntelligencePosted 1 week ago
- Free Webinar: Arduino IoT Cloud and ESP32 DemoboardPosted 1 week ago
- Maker Faire Rome – The European edition and FAE Technology launch the contest “MY Maker PCBA: your electronics for a better planet”Posted 3 months ago
- Efficient and Compact Stereo Power Amplifier: Unleash High-Quality Audio with the PAM8610Posted 3 months ago
- Terminus FE1.1 USB hub board: the solution to connect four USB devicesPosted 6 months 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.
[slideshow id=8] |
//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
11 Comments
Leave a Reply
Cancel reply
OpenSource Products
-
Wireless Power Transfer
The concept of transferring energy without wires has always been...
- Posted 16 hours ago
- 0
-
3296W 10K Multi-Turn Trimmer Set – 50 pcs
Set of 3296W multi-turn trimmers with top adjustment 10K. The...
- Posted 2 months ago
- 0
-
Efficient and Compact Stereo Power Amplifier: Unleash High-Quality Audio with the PAM8610
Stereo power amplifier 10+10W into 8 ohms based on...
- Posted 3 months ago
- 0
-
AMPLIFIER CLASS D 2x15W
Based on the PAM8610 chip, this small Class D stereo...
- Posted 5 months ago
- 1
-
Demoboard for ESP32
Demoboard for the famous ESP32 Bluetooth and WiFi module (available...
- Posted 9 months ago
- 1
-
TOTEM: learning by experimenting
Let’s learn about an interesting educational platform that allows...
- Posted 1 year ago
- 0
-
Air Quality Sensor – PM2.5, PM10
This module uses the principle of optical LASER light scattering...
- Posted 1 year ago
- 1
-
Small solar cell (0,5 V / 800 mA)
Photovoltaic cell with very small dimensions, suitable for carrying out...
- Posted 1 year ago
- 1
Tutorials
-
PCB CAD, A SELECTION GUIDE
Getting to know and evaluate the software offer for PCB,...
- Posted 2 years ago
- 0
-
DIY Sensor – Innovation & Implementation
A sensor converts data such as heat, light, sound,...
- Posted 3 years ago
- 0
-
Getting Started with the ESP32
This article is a getting started guide for the ESP32...
- Posted 4 years ago
- 0
Mods and Hacks
-
The flame that doesn’t burn
Based on Neopixel and a special ultra-thin Arduino, it simulates...
- Posted 2 years ago
- 1
-
Here are the Winners from the 3Drag 3d printing contest
Here we are, eventually the contest has come to an...
- Posted 9 years ago
- 0
-
Updates from the 3Drag 3dprinting contest: Roland Hoffert’s Hacks
Roland Hoffert, from www.eytec.de, submitted us this 3Drag (Velleman K8200...
- Posted 9 years ago
- 0
-
Updates from the 3Drag 3dprinting contest: Karl Seiss’s Hack
Karl Seiss from Austria made a very clever hack to...
- Posted 9 years ago
- 0
Opinions
-
PCB Recycling: The Core of Your Electronics Is More Valuable Than You Think
The screen you are looking at this very moment will...
- Posted 2 years ago
- 4
-
PCB CAD, A SELECTION GUIDE
Getting to know and evaluate the software offer for PCB,...
- Posted 2 years ago
- 0
-
The Open Source community united against Covid-19
On March 11, WHO (World Health Organization) officially declared the...
- Posted 4 years ago
- 0
-
Coronavirus: Now Is The Time For Solidarity
The moment we are living, in China before and all...
- Posted 4 years ago
- 0
Newsletter
-
Arduino ISP (In System Programming) and stand-alone circuits
We use an Arduino to program other ATmega without...
- Posted 12 years ago
- 226
-
Localizer with SIM908 module
The device is based on a GSM/GPRS module with...
- Posted 11 years ago
- 187
-
GSM GPS shield for Arduino
Shield for Arduino designed and based on the module...
- Posted 11 years ago
- 181
-
Small Breakout for SIM900 GSM Module
Some post ago we presented a PCB to mount...
- Posted 12 years ago
- 115
-
Wireless Power Transfer
The concept of transferring energy without wires has always...
- Posted 16 hours ago
- 0
-
Robot Punchers with Arduino
James Bruton is well-known for his (often eccentric) inventions,...
- Posted 2 days ago
- 0
-
Expanding the pins of a microcontroller
What to do when the chosen microcontroller doesn’t have...
- Posted 7 days ago
- 0
-
Let’s create a small level with a matrix display
The low cost of sensors and components allows...
- Posted 1 week ago
- 0
Pingback: Electronics-Lab.com Blog » Blog Archive » Input/Output Shield for Arduino
Pingback: Ilinte
Pingback: Relay Shield para Arduino | Automatismos Mar del Plata