Devices & Components
1 relay module 5 Vdc 10A (assembled)
Arduino Nano
Power MOSFET N-Channel
Fast / Ultrafast Diode, 1 kV
Capacitor 1uf Non-Electrolytic
SparkFun Trim Potentiometer
10kOhm potentiometer
Zener Single Diode, 11 V
Hardware & Tools
Soldering kit
Software & Tools
Arduino IDE
Project description
Code
Code Interrupter
cpp
...
1#define LED1 13 2 3void setup() 4{ 5 Serial.begin(9600); 6 pinMode(LED1, OUTPUT); 7 digitalWrite(LED1, LOW); 8} 9 10void loop() 11{ 12 digitalWrite(LED1, HIGH); //LED1 is ON 13 int onPeriodF1 = map(analogRead(A0), 0, 1023, 0, 500); 14 delay(onPeriodF1); 15 //--------------- 16 digitalWrite(LED1, LOW); //LED1 is ON 17 int offPeriodF1 = map(analogRead(A1), 0, 1023, 0, 1000); 18 delay(offPeriodF1); 19 20 digitalWrite(LED1, LOW); //LED1 OFF 21 22}
Downloadable files
Schematic TC
...
SchematicJPG.jpg

Schematic Arduino
...
Schematic Arduino.jpg

Comments
Only logged in users can leave comments