- How to Adjust X and Y Axis Scale in Arduino Serial Plotter (No Extra Software Needed)Posted 3 months ago
- Elettronici Entusiasti: Inspiring Makers at Maker Faire Rome 2024Posted 3 months ago
- makeITcircular 2024 content launched – Part of Maker Faire Rome 2024Posted 5 months ago
- Application For Maker Faire Rome 2024: Deadline June 20thPosted 7 months ago
- Building a 3D Digital Clock with ArduinoPosted 12 months ago
- Creating a controller for Minecraft with realistic body movements using ArduinoPosted 12 months ago
- Snowflake with ArduinoPosted 1 year ago
- Holographic Christmas TreePosted 1 year ago
- Segstick: Build Your Own Self-Balancing Vehicle in Just 2 Days with ArduinoPosted 1 year ago
- ZSWatch: An Open-Source Smartwatch Project Based on the Zephyr Operating SystemPosted 1 year 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
-
SONY color camera module, 700 TV Lines
Color camera module equipped with a 1/3″ CCD sensor and...
- Posted 6 months ago
- 0
-
ESP32 Low Power Module
ESP32 Low Power Module, based on Espressif’s SoC capable of...
- Posted 6 months ago
- 0
-
Power supply latch
This power supply latch provides power to the external circuit...
- Posted 6 months ago
- 0
-
GSM/4G Remote Control with DTMF Commands
Two-way remote control system, based on the GSM/4G A7682E module...
- Posted 7 months ago
- 0
-
Acoustic amplifier – in DIY Kit
This kit creates a microphone amplifier with an output suitable...
- Posted 12 months ago
- 0
-
Clap sensor switch – in DIY Kit
It is capable of recognizing the sound of clapping hands...
- Posted 1 year ago
- 2
-
Liquid level indicator for tanks – in DIY kit
This monitoring device is useful for keeping track of the...
- Posted 1 year ago
- 0
-
LED candle with Breath-Activated ON/OFF – in DIY Kit
This LED candle with breath-activated ON/OFF function draws inspiration from...
- Posted 1 year ago
- 0
Tutorials
-
How to Adjust X and Y Axis Scale in Arduino Serial Plotter (No Extra Software Needed)
The Serial Plotter in Arduino is an excellent tool for...
- Posted 3 months ago
- 0
-
PCB CAD, A SELECTION GUIDE
Getting to know and evaluate the software offer for PCB,...
- Posted 3 years ago
- 0
-
DIY Sensor – Innovation & Implementation
A sensor converts data such as heat, light, sound,...
- 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 3 years ago
- 1
-
Here are the Winners from the 3Drag 3d printing contest
Here we are, eventually the contest has come to an...
- Posted 10 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 10 years ago
- 0
-
Updates from the 3Drag 3dprinting contest: Karl Seiss’s Hack
Karl Seiss from Austria made a very clever hack to...
- Posted 10 years ago
- 0
-
Arduino ISP (In System Programming) and stand-alone circuits
We use an Arduino to program other ATmega without...
- Posted 13 years ago
- 226
-
Localizer with SIM908 module
The device is based on a GSM/GPRS module with...
- Posted 13 years ago
- 187
-
GSM GPS shield for Arduino
Shield for Arduino designed and based on the module...
- Posted 12 years ago
- 181
-
Small Breakout for SIM900 GSM Module
Some post ago we presented a PCB to mount...
- Posted 14 years ago
- 115
-
How to Control NeoPixel Installations via Wi-Fi Using Fishino and NodeMCU with Python
We create NeoPixel light installations with Fishino and NodeMCU...
- Posted 1 month ago
- 0
-
How to Adjust X and Y Axis Scale in Arduino Serial Plotter (No Extra Software Needed)
The Serial Plotter in Arduino is an excellent tool...
- Posted 3 months ago
- 0
-
Elettronici Entusiasti: Inspiring Makers at Maker Faire Rome 2024
Maker Faire Rome 2024 is ready to amaze the...
- Posted 3 months ago
- 0
-
makeITcircular 2024 content launched – Part of Maker Faire Rome 2024
Applications to MakeITcircular must be in by October 3,...
- Posted 5 months ago
- 0
-
SONY color camera module, 700 TV Lines
Color camera module equipped with a 1/3″ CCD sensor...
- Posted 6 months 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