summaryrefslogtreecommitdiff
path: root/Other_Arduino_Codes/Laser_PWM
diff options
context:
space:
mode:
authorSudhakarKuma2017-10-25 15:59:35 +0530
committerSudhakarKuma2017-10-25 15:59:35 +0530
commita33c7a4da90a609064feb368a7e9097c7a9d8202 (patch)
tree52953c565d6d6cfcbac42f1dce1cdd8c0e043341 /Other_Arduino_Codes/Laser_PWM
parent09c89f6242ecf2495f86140a3f53ef4678f8563b (diff)
downloadOpen-Sky-Planetarium-a33c7a4da90a609064feb368a7e9097c7a9d8202.tar.gz
Open-Sky-Planetarium-a33c7a4da90a609064feb368a7e9097c7a9d8202.tar.bz2
Open-Sky-Planetarium-a33c7a4da90a609064feb368a7e9097c7a9d8202.zip
Updated OSP-plugin
Diffstat (limited to 'Other_Arduino_Codes/Laser_PWM')
-rw-r--r--Other_Arduino_Codes/Laser_PWM/Laser_PWM.ino19
1 files changed, 19 insertions, 0 deletions
diff --git a/Other_Arduino_Codes/Laser_PWM/Laser_PWM.ino b/Other_Arduino_Codes/Laser_PWM/Laser_PWM.ino
new file mode 100644
index 0000000..08ba1dd
--- /dev/null
+++ b/Other_Arduino_Codes/Laser_PWM/Laser_PWM.ino
@@ -0,0 +1,19 @@
+int pin=6; // Pin to which you connect the gate (G) of the MOSFET.
+
+void setup() {
+ // put your setup code here, to run once:
+pinMode(pin,OUTPUT);
+Serial.begin(9600);
+}
+
+void loop() {
+ // put your main code here, to run repeatedly:
+analogWrite(pin, 250); // High Intensity
+delay(5000);
+analogWrite(pin, 100); // Medium intensity
+delay(5000);
+analogWrite(pin, 50); // Low intensity
+delay(5000);
+
+}
+