Multi purpose Arduino Uno shield with breadboard connection
The board has these sections
· An audio switch
· An analog trimmer connected to an Arduino analog pin
· Two push-buttons
· A 5mm RGB LED
· A 10 A SPDT relay
· A connector in order to install a Wi-Fi ESP8266 module
· A 3.3V 1 A LDO
· There are two headers in order to connect the shield to a a breadboard
I have created this project as a reference project for a Italian PCB Design Course called PCBSemplice that I have recorded
onst byte ledPin = 12;
const byte rele = 4;
const byte interruptPin = 2;
volatile byte state = LOW;
unsigned char count =0;
unsigned char ON =0;
unsigned char OFF =0;
unsigned long timeComparison = 0;
unsigned char alreadyON =0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin), checkComparator, RISING);
Serial.begin(9600);
}
void loop() {
Serial.println(count);
if (ON==1 && alreadyON==0)
{
digitalWrite(ledPin, HIGH);
digitalWrite(rele, HIGH);
alreadyON=1;
count=0;
Serial.println("ON");
}
if (OFF==1){
digitalWrite(ledPin, LOW);
digitalWrite(rele, LOW);
Serial.println("OFF");
alreadyON =0;
count=0;
OFF=0;
}
}
void checkComparator() {
count++;
switch (count){
case 1:
timeComparison=millis();
break;
case 2:
timeComparison=(millis())-timeComparison;
if (timeComparison <2000)
{
ON=1;
OFF=0;
timeComparison=millis();
}
else{
count=0;
}
break;
case 3:
timeComparison=(millis())-timeComparison;
if (timeComparison <2000)
{
ON=0;
OFF=1;
count =0;
}
else{
count=0;
}
break;
default:
count=0;
break;
}
}
Multi purpose Arduino Uno shield with breadboard connection
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
Attribution-ShareAlike (CC BY-SA) License
Read More⇒
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by gmarocco
-
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
1335 0 4 -
-
A Compact Charging Breakout Board For Waveshare ESP32-C3
1864 3 7 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
1851 2 0 -
-
-
-
ESP32-C3 BLE Keyboard - Battery Powered with USB-C Charging
2029 0 1 -







