diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3ebdbc0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "CodeGPT.apiKey": "CodeGPT Plus Beta" +} \ No newline at end of file diff --git a/Arduino/Radar_pde.pde b/Arduino/Radar_pde.pde deleted file mode 100644 index a608693..0000000 --- a/Arduino/Radar_pde.pde +++ /dev/null @@ -1,140 +0,0 @@ -import processing.serial.*; -import java.awt.event.KeyEvent; -import java.io.IOException; -Serial myPort;// defubes variables - -String distance=""; -String data=""; -String noObject; -String angle=""; -float pixsDistance; -int iAngle, iDistance; -int index1=0; -int index2=0; -PFont orcFont; -void setup() { - -size (1280 ,720); -smooth(); -myPort = new Serial(this,"/dev/ttyACM1", 9600); // change this accordingly -myPort.bufferUntil('.'); // reads the data from the serial port up to the character ‘.’. So actually it reads this: angle,distance. -} -void draw() { - -fill(98,245,31); -// simulating motion blur and slow fade of the moving line -noStroke(); -fill(0,4); -rect(0, 0, width, height-height*0.065); - -fill(98,245,31); // green color -// calls the functions for drawing the radar -drawRadar(); -drawLine(); -drawObject(); -drawText(); -} -void serialEvent (Serial myPort) { // starts reading data from the Serial Port -// reads the data from the Serial Port up to the character ‘.’ and puts it into the String variable “data”. -data = myPort.readStringUntil('.'); -data = data.substring(0,data.length()-1); - -index1 = data.indexOf(','); // find the character ‘,’ and puts it into the variable “index1” -angle= data.substring(0, index1); // read the data from position “0” to position of the variable index1 or thats the value of the angle the Arduino Board sent into the Serial Port -distance= data.substring(index1+1, data.length()); // read the data from position “index1” to the end of the data pr thats the value of the distance - -// converts the String variables into Integer -iAngle = int(angle); -iDistance = int(distance); -} -void drawRadar() { -pushMatrix(); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -noFill(); -strokeWeight(2); -stroke(98,245,31); -// draws the arc lines -arc(0,0,(width-width*0.0625),(width-width*0.0625),PI,TWO_PI); -arc(0,0,(width-width*0.27),(width-width*0.27),PI,TWO_PI); -arc(0,0,(width-width*0.479),(width-width*0.479),PI,TWO_PI); -arc(0,0,(width-width*0.687),(width-width*0.687),PI,TWO_PI); -// draws the angle lines -line(-width/2,0,width/2,0); -line(0,0,(-width/2)*cos(radians(30)),(-width/2)*sin(radians(30))); -line(0,0,(-width/2)*cos(radians(60)),(-width/2)*sin(radians(60))); -line(0,0,(-width/2)*cos(radians(90)),(-width/2)*sin(radians(90))); -line(0,0,(-width/2)*cos(radians(120)),(-width/2)*sin(radians(120))); -line(0,0,(-width/2)*cos(radians(150)),(-width/2)*sin(radians(150))); -line((-width/2)*cos(radians(30)),0,width/2,0); -popMatrix(); -} -void drawObject() { -pushMatrix(); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -strokeWeight(9); -stroke(255,10,10); // red color -pixsDistance = iDistance*((height-height*0.1666)*0.025); // covers the distance from the sensor from cm to pixels -// limiting the range to 40 cms -if(iDistance<40){ -// draws the object according to the angle and the distance -line(pixsDistance*cos(radians(iAngle)),-pixsDistance*sin(radians(iAngle)),(width-width*0.505)*cos(radians(iAngle)),-(width-width*0.505)*sin(radians(iAngle))); -} -popMatrix(); -} -void drawLine() { -pushMatrix(); -strokeWeight(9); -stroke(30,250,60); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -line(0,0,(height-height*0.12)*cos(radians(iAngle)),-(height-height*0.12)*sin(radians(iAngle))); // draws the line according to the angle -popMatrix(); -} -void drawText() { // draws the texts on the screen - -pushMatrix(); -if(iDistance>40) { -noObject = "Out of Range"; -} -else { -noObject = "In Range"; -} -fill(0,0,0); -noStroke(); -rect(0, height-height*0.0648, width, height); -fill(98,245,31); -textSize(25); - -text("10cm",width-width*0.3854,height-height*0.0833); -text("20cm",width-width*0.281,height-height*0.0833); -text("30cm",width-width*0.177,height-height*0.0833); -text("40cm",width-width*0.0729,height-height*0.0833); -textSize(40); -text("Muhammad Rameen", width-width*0.875, height-height*0.0277); -text("Angle: " + iAngle +" °", width-width*0.48, height-height*0.0277); -text("", width-width*0.26, height-height*0.0277); -if(iDistance<40) { -text(" " + iDistance +" cm", width-width*0.225, height-height*0.0277); -} -textSize(25); -fill(98,245,60); -translate((width-width*0.4994)+width/2*cos(radians(30)),(height-height*0.0907)-width/2*sin(radians(30))); -rotate(-radians(-60)); -text("30°",0,0); -resetMatrix(); -translate((width-width*0.503)+width/2*cos(radians(60)),(height-height*0.0888)-width/2*sin(radians(60))); -rotate(-radians(-30)); -text("60°",0,0); -resetMatrix(); -translate((width-width*0.507)+width/2*cos(radians(90)),(height-height*0.0833)-width/2*sin(radians(90))); -rotate(radians(0)); -text("90°",0,0); -resetMatrix(); -translate(width-width*0.513+width/2*cos(radians(120)),(height-height*0.07129)-width/2*sin(radians(120))); -rotate(radians(-30)); -text("120°",0,0); -resetMatrix(); -translate((width-width*0.5104)+width/2*cos(radians(150)),(height-height*0.0574)-width/2*sin(radians(150))); -rotate(radians(-60)); -text("150°",0,0); -popMatrix(); -} diff --git a/Arduino/Radar_pde/Radar_pde.pde b/Arduino/Radar_pde/Radar_pde.pde deleted file mode 100644 index a608693..0000000 --- a/Arduino/Radar_pde/Radar_pde.pde +++ /dev/null @@ -1,140 +0,0 @@ -import processing.serial.*; -import java.awt.event.KeyEvent; -import java.io.IOException; -Serial myPort;// defubes variables - -String distance=""; -String data=""; -String noObject; -String angle=""; -float pixsDistance; -int iAngle, iDistance; -int index1=0; -int index2=0; -PFont orcFont; -void setup() { - -size (1280 ,720); -smooth(); -myPort = new Serial(this,"/dev/ttyACM1", 9600); // change this accordingly -myPort.bufferUntil('.'); // reads the data from the serial port up to the character ‘.’. So actually it reads this: angle,distance. -} -void draw() { - -fill(98,245,31); -// simulating motion blur and slow fade of the moving line -noStroke(); -fill(0,4); -rect(0, 0, width, height-height*0.065); - -fill(98,245,31); // green color -// calls the functions for drawing the radar -drawRadar(); -drawLine(); -drawObject(); -drawText(); -} -void serialEvent (Serial myPort) { // starts reading data from the Serial Port -// reads the data from the Serial Port up to the character ‘.’ and puts it into the String variable “data”. -data = myPort.readStringUntil('.'); -data = data.substring(0,data.length()-1); - -index1 = data.indexOf(','); // find the character ‘,’ and puts it into the variable “index1” -angle= data.substring(0, index1); // read the data from position “0” to position of the variable index1 or thats the value of the angle the Arduino Board sent into the Serial Port -distance= data.substring(index1+1, data.length()); // read the data from position “index1” to the end of the data pr thats the value of the distance - -// converts the String variables into Integer -iAngle = int(angle); -iDistance = int(distance); -} -void drawRadar() { -pushMatrix(); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -noFill(); -strokeWeight(2); -stroke(98,245,31); -// draws the arc lines -arc(0,0,(width-width*0.0625),(width-width*0.0625),PI,TWO_PI); -arc(0,0,(width-width*0.27),(width-width*0.27),PI,TWO_PI); -arc(0,0,(width-width*0.479),(width-width*0.479),PI,TWO_PI); -arc(0,0,(width-width*0.687),(width-width*0.687),PI,TWO_PI); -// draws the angle lines -line(-width/2,0,width/2,0); -line(0,0,(-width/2)*cos(radians(30)),(-width/2)*sin(radians(30))); -line(0,0,(-width/2)*cos(radians(60)),(-width/2)*sin(radians(60))); -line(0,0,(-width/2)*cos(radians(90)),(-width/2)*sin(radians(90))); -line(0,0,(-width/2)*cos(radians(120)),(-width/2)*sin(radians(120))); -line(0,0,(-width/2)*cos(radians(150)),(-width/2)*sin(radians(150))); -line((-width/2)*cos(radians(30)),0,width/2,0); -popMatrix(); -} -void drawObject() { -pushMatrix(); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -strokeWeight(9); -stroke(255,10,10); // red color -pixsDistance = iDistance*((height-height*0.1666)*0.025); // covers the distance from the sensor from cm to pixels -// limiting the range to 40 cms -if(iDistance<40){ -// draws the object according to the angle and the distance -line(pixsDistance*cos(radians(iAngle)),-pixsDistance*sin(radians(iAngle)),(width-width*0.505)*cos(radians(iAngle)),-(width-width*0.505)*sin(radians(iAngle))); -} -popMatrix(); -} -void drawLine() { -pushMatrix(); -strokeWeight(9); -stroke(30,250,60); -translate(width/2,height-height*0.074); // moves the starting coordinats to new location -line(0,0,(height-height*0.12)*cos(radians(iAngle)),-(height-height*0.12)*sin(radians(iAngle))); // draws the line according to the angle -popMatrix(); -} -void drawText() { // draws the texts on the screen - -pushMatrix(); -if(iDistance>40) { -noObject = "Out of Range"; -} -else { -noObject = "In Range"; -} -fill(0,0,0); -noStroke(); -rect(0, height-height*0.0648, width, height); -fill(98,245,31); -textSize(25); - -text("10cm",width-width*0.3854,height-height*0.0833); -text("20cm",width-width*0.281,height-height*0.0833); -text("30cm",width-width*0.177,height-height*0.0833); -text("40cm",width-width*0.0729,height-height*0.0833); -textSize(40); -text("Muhammad Rameen", width-width*0.875, height-height*0.0277); -text("Angle: " + iAngle +" °", width-width*0.48, height-height*0.0277); -text("", width-width*0.26, height-height*0.0277); -if(iDistance<40) { -text(" " + iDistance +" cm", width-width*0.225, height-height*0.0277); -} -textSize(25); -fill(98,245,60); -translate((width-width*0.4994)+width/2*cos(radians(30)),(height-height*0.0907)-width/2*sin(radians(30))); -rotate(-radians(-60)); -text("30°",0,0); -resetMatrix(); -translate((width-width*0.503)+width/2*cos(radians(60)),(height-height*0.0888)-width/2*sin(radians(60))); -rotate(-radians(-30)); -text("60°",0,0); -resetMatrix(); -translate((width-width*0.507)+width/2*cos(radians(90)),(height-height*0.0833)-width/2*sin(radians(90))); -rotate(radians(0)); -text("90°",0,0); -resetMatrix(); -translate(width-width*0.513+width/2*cos(radians(120)),(height-height*0.07129)-width/2*sin(radians(120))); -rotate(radians(-30)); -text("120°",0,0); -resetMatrix(); -translate((width-width*0.5104)+width/2*cos(radians(150)),(height-height*0.0574)-width/2*sin(radians(150))); -rotate(radians(-60)); -text("150°",0,0); -popMatrix(); -} diff --git a/Arduino/blink/Blink.txt b/Arduino/blink/Blink.txt deleted file mode 100755 index 0626334..0000000 --- a/Arduino/blink/Blink.txt +++ /dev/null @@ -1 +0,0 @@ -Turn an LED on and off. \ No newline at end of file diff --git a/Arduino/blink/blink.ino b/Arduino/blink/blink.ino deleted file mode 100755 index 1f5b964..0000000 --- a/Arduino/blink/blink.ino +++ /dev/null @@ -1,41 +0,0 @@ -#include - -void setup() { - // initialize digital pin LED_BUILTIN as an output. - - pinMode(8, OUTPUT); - pinMode(12, OUTPUT); - pinMode(7, OUTPUT); - Serial.begin(9600); -} - -// the loop function runs over and over again forever -void loop() { - // turn the LED on (HIGH is the voltage level) - digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level) - delay(5000); // wait for a second - // turn the LED off by making the voltage LOW - digitalWrite(12, LOW); - delay(5000); // wait for a second - digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level) - delay(5000); // wait for a second - // turn the LED off by making the voltage LOW - digitalWrite(8, LOW); - delay(10000); // wait for a second - digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level) - delay(5000); // wait for a second - // turn the LED off by making the voltage LOW - digitalWrite(7, LOW); - delay(15000); // wai for a second - - // turns on all the LED in the circuit - digitalWrite(12, HIGH); - digitalWrite(8, HIGH); - digitalWrite(7, HIGH); - delay(5000); - digitalWrite(12, LOW); - digitalWrite(8, LOW); - digitalWrite(7, LOW); - delay(20000);tt - -} diff --git a/Arduino/fade/Fade.txt b/Arduino/fade/Fade.txt deleted file mode 100755 index d196b43..0000000 --- a/Arduino/fade/Fade.txt +++ /dev/null @@ -1 +0,0 @@ -Demonstrates the use of analogWrite() to fade an LED. \ No newline at end of file diff --git a/Arduino/fade/fade.ino b/Arduino/fade/fade.ino deleted file mode 100755 index 2ba00b8..0000000 --- a/Arduino/fade/fade.ino +++ /dev/null @@ -1,46 +0,0 @@ -/* - Fade - - This example shows how to fade an LED on pin 9 using the analogWrite() - function. - - The analogWrite() function uses PWM, so if you want to change the pin you're - using, be sure to use another PWM capable pin. On most Arduino, the PWM pins - are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. - - This example code is in the public domain. - - https://www.arduino.cc/en/Tutorial/BuiltInExamples/Fade -*/ - -int led1 = 11; // the PWM pin the LED is attached to -int led2 = 10; -int led3 = 9; -int brightness = 0; // how bright the LED is -int fadeAmount = 5; // how many points to fade the LED by - -// the setup routine runs once when you press reset: -void setup() { - // declare pin 9 to be an output: - pinMode(led1, OUTPUT); - pinMode(led2, OUTPUT); - pinMode(led3, OUTPUT); -} - -// the loop routine runs over and over again forever: -void loop() { - // set the brightness of pin 9: - analogWrite(led1, brightness); - analogWrite(led2, brightness); - analogWrite(led3, brightness); - - // change the brightness for next time through the loop: - brightness = brightness + fadeAmount; - - // reverse the direction of the fading at the ends of the fade: - if (brightness <= 0 || brightness >= 255) { - fadeAmount = -fadeAmount; - } - // wait for 30 milliseconds to see the dimming effect - delay(40); -} diff --git a/Arduino/fade/layout.png b/Arduino/fade/layout.png deleted file mode 100755 index 5a6db3e..0000000 Binary files a/Arduino/fade/layout.png and /dev/null differ diff --git a/Arduino/fade/schematic.png b/Arduino/fade/schematic.png deleted file mode 100755 index 6dd2294..0000000 Binary files a/Arduino/fade/schematic.png and /dev/null differ diff --git a/Arduino/sketch.properties b/Arduino/sketch.properties deleted file mode 100644 index c7ad882..0000000 --- a/Arduino/sketch.properties +++ /dev/null @@ -1 +0,0 @@ -main=Radar_pde.pde diff --git a/Movie Essays/Home Alone 2.txt b/Movie Essays/Home Alone 2.txt new file mode 100644 index 0000000..b2a14ce --- /dev/null +++ b/Movie Essays/Home Alone 2.txt @@ -0,0 +1,22 @@ +In Home Alone 2: Lost In New York. +Just as usual it is christmas and Uncle Frank has come and in the Christmas Pageant Kevin, Buzz and all their cousins are also in the pageant when it is Kevin's turn to sing he starts +singing beautifully but Buzz is jealous and takes the candles and pretends drumming Kevin's head and making funny things on top of his head and everyone starts laughing Kevin was +confused and startled he looked behind him where Buzz suddenly takes his candles back and pretends that nothing had happened but Kevin knew he punched Buzz real hard and he fell on his +back and everyone started to get toppled over each other at home Buzz makes a formal forgiveness speech at the end everyone applauds for him then it was Kevin's turn but he said he will +not ask forgiveness for what Buzz had done then Kate, his mother tells him that she was going to make him sleep on the third floor with fuller then Kevin shouts, "THAT IS WHAT I GET +EVERYTIME AND I DO NOT CARE ABOUT BUZZ!" and he stormed out of the room and ran up to the third floor and flopps down on Fuller's bed then a few minutes later his mom comes and she said +that he should come down and give a forgiveness speech but Kevin says that if he had his own money he would go on a vacation alone somewhere else without anyone else so his mom told him +that he should sit there and think abut giving a forgiveness speech but Kevin says that he'd rather kiss a toilet seat that make a forgiveness speech for Buzz. + +The next morning everyone wakes up late and the whole house emerged into chaos because they had to leave for Florida for christmas they all hurriedly dress themselves including Kevin he +also woke up on time and was already in the van when everyone else settled in Kevin's mom counts the tickets 7 for Uncle Frank's family and 7 for Kate's family then when Kate starts +counting she distributes all but Kevin's she cannot find him she shouts, "KEVIN!" then Kevin replies, "Yes I am in the van" and he took the ticket when they are at the airport Kevin had +a recorder whose battery needed to be replaced so he asked his dad he told him that he would give him the batteries on the plane but Kevin is restless he starts rummaging in his dad's +bag and his dad starts running towards the terminal so he also rummaging and running at the same time he followed his dad but in the way he stopped to search for the batteries but his +dad had worn a brown coat and red scarf but there was another man with the same coat but Kevin thought he was his dad and followed him on the flight to New York which he did not know and +gets seated on the plane when they reached New York, Kevin starts looking for his family then he saw the towers from the 9/11 attack then he asked the flight-person that where was he and +they told him that he was in New York. Suddenly he sees a newspaper with the headlines, "THE WET BANDITS ESCAPE FROM PRISON DURING WILD RIOT IN POLICE STATION" he started to worry. + +what I liked about this story was that Kevin is very intelligent and fools those two Wet Bandits and tricks them into handing them over to the cops. A very funny story. + +See the full movie to find out what happens next.