aboutsummaryrefslogtreecommitdiff
path: root/Lesson 1 Make The Car Move
diff options
context:
space:
mode:
Diffstat (limited to 'Lesson 1 Make The Car Move')
-rwxr-xr-xLesson 1 Make The Car Move/AUTO_GO_/AUTO_GO_.ino77
-rwxr-xr-xLesson 1 Make The Car Move/Make The Car Move.pdfbin1806123 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/9g steering gear.docbin85315 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/Arduino_Sensor_Shield_V5.docbin1608704 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/HC-06.pdfbin639451 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/Infrared remote controller.docbin609792 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/L298N.docbin1141760 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/UNO.docxbin630837 -> 0 bytes
-rwxr-xr-xLesson 1 Make The Car Move/Module specification document/ultrasonic ranging modules_HC-SR04.docbin1007616 -> 0 bytes
-rw-r--r--Lesson 1 Make The Car Move/forward_back/forward_back.ino59
-rwxr-xr-xLesson 1 Make The Car Move/left_wheel_rotation/left_wheel_rotation.ino31
-rwxr-xr-xLesson 1 Make The Car Move/right_wheel_rotation/right_wheel_rotation.ino31
12 files changed, 0 insertions, 198 deletions
diff --git a/Lesson 1 Make The Car Move/AUTO_GO_/AUTO_GO_.ino b/Lesson 1 Make The Car Move/AUTO_GO_/AUTO_GO_.ino
deleted file mode 100755
index bcf48f2..0000000
--- a/Lesson 1 Make The Car Move/AUTO_GO_/AUTO_GO_.ino
+++ /dev/null
@@ -1,77 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-/*define logic control output pin*/
-int in1=9;
-int in2=8;
-int in3=7;
-int in4=6;
-/*define channel enable output pins*/
-int ENA=10;
-int ENB=5;
-/*define forward function*/
-void _mForward()
-{
- digitalWrite(ENA,HIGH);
- digitalWrite(ENB,HIGH);
- digitalWrite(in1,LOW);//digital output
- digitalWrite(in2,HIGH);
- digitalWrite(in3,LOW);
- digitalWrite(in4,HIGH);
- Serial.println("Forward");
-}
-/*define back function*/
-void _mBack()
-{
- digitalWrite(ENA,HIGH);
- digitalWrite(ENB,HIGH);
- digitalWrite(in1,HIGH);
- digitalWrite(in2,LOW);
- digitalWrite(in3,HIGH);
- digitalWrite(in4,LOW);
- Serial.println("Back");
-}
-/*define left function*/
-void _mleft()
-{
- digitalWrite(ENA,HIGH);
- digitalWrite(ENB,HIGH);
- digitalWrite(in1,LOW);
- digitalWrite(in2,HIGH);
- digitalWrite(in3,HIGH);
- digitalWrite(in4,LOW);
- Serial.println("Left");
-}
-/*define right function*/
-void _mright()
-{
- digitalWrite(ENA,HIGH);
- digitalWrite(ENB,HIGH);
- digitalWrite(in1,HIGH);
- digitalWrite(in2,LOW);
- digitalWrite(in3,LOW);
- digitalWrite(in4,HIGH);
- Serial.println("Right");
-}
-/*put your setup code here, to run once*/
-void setup() {
- Serial.begin(9600); //Open the serial port and set the baud rate to 9600
-/*Set the defined pins to the output*/
- pinMode(in1,OUTPUT);
- pinMode(in2,OUTPUT);
- pinMode(in3,OUTPUT);
- pinMode(in4,OUTPUT);
- pinMode(ENA,OUTPUT);
- pinMode(ENB,OUTPUT);
-}
-/*put your main code here, to run repeatedly*/
-void loop() {
-_mForward();
-delay(1000);
-_mBack();
-delay(1000);
-_mleft();
-delay(1000);
-_mright();
-delay(1000);
-}
diff --git a/Lesson 1 Make The Car Move/Make The Car Move.pdf b/Lesson 1 Make The Car Move/Make The Car Move.pdf
deleted file mode 100755
index 78f6261..0000000
--- a/Lesson 1 Make The Car Move/Make The Car Move.pdf
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/9g steering gear.doc b/Lesson 1 Make The Car Move/Module specification document/9g steering gear.doc
deleted file mode 100755
index 61f0ed0..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/9g steering gear.doc
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/Arduino_Sensor_Shield_V5.doc b/Lesson 1 Make The Car Move/Module specification document/Arduino_Sensor_Shield_V5.doc
deleted file mode 100755
index c71064d..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/Arduino_Sensor_Shield_V5.doc
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/HC-06.pdf b/Lesson 1 Make The Car Move/Module specification document/HC-06.pdf
deleted file mode 100755
index d26b2bf..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/HC-06.pdf
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/Infrared remote controller.doc b/Lesson 1 Make The Car Move/Module specification document/Infrared remote controller.doc
deleted file mode 100755
index 7b15663..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/Infrared remote controller.doc
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/L298N.doc b/Lesson 1 Make The Car Move/Module specification document/L298N.doc
deleted file mode 100755
index 80e962e..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/L298N.doc
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/UNO.docx b/Lesson 1 Make The Car Move/Module specification document/UNO.docx
deleted file mode 100755
index f88e57e..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/UNO.docx
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/Module specification document/ultrasonic ranging modules_HC-SR04.doc b/Lesson 1 Make The Car Move/Module specification document/ultrasonic ranging modules_HC-SR04.doc
deleted file mode 100755
index 9b5de91..0000000
--- a/Lesson 1 Make The Car Move/Module specification document/ultrasonic ranging modules_HC-SR04.doc
+++ /dev/null
Binary files differ
diff --git a/Lesson 1 Make The Car Move/forward_back/forward_back.ino b/Lesson 1 Make The Car Move/forward_back/forward_back.ino
deleted file mode 100644
index e0047cb..0000000
--- a/Lesson 1 Make The Car Move/forward_back/forward_back.ino
+++ /dev/null
@@ -1,59 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-int ENA = 10;
-int IN1 = 9;
-int IN2 = 8;
-
-int IN3 = 7;
-int IN4 = 6;
-int ENB = 5;
-
-int SPEED = 100;
-
-void setup()
-{
- pinMode(IN1, OUTPUT);
- pinMode(IN2, OUTPUT);
- pinMode(IN3, OUTPUT);
- pinMode(IN4, OUTPUT);
- pinMode(ENA, OUTPUT);
- pinMode(ENB, OUTPUT);
-
-}
-void loop()
-{
- int i;
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, HIGH); // left wheel goes forward
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, HIGH); // right wheel goes forward
- for (i = 0; i < 256; i++) {
- analogWrite(ENA, i);
- analogWrite(ENB, i);
- delay(50);
- }
- for (i = 255; i >= 0; i--) {
- analogWrite(ENA, i);
- analogWrite(ENB, i);
- delay(50);
- }
- /*
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, LOW); //left wheel holds still
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, LOW); // right wheel holds still
- delay(500);
- digitalWrite(IN1, HIGH);
- digitalWrite(IN2, LOW); //left wheel is back up
- digitalWrite(IN3, HIGH);
- digitalWrite(IN4, LOW); // right wheel is back up
- delay(500);
- digitalWrite(IN1, LOW);
- digitalWrite(IN2, LOW); // left wheel holds still
- digitalWrite(IN3, LOW);
- digitalWrite(IN4, LOW); // right wheel holds still
- delay(500);
- */
-}
-
diff --git a/Lesson 1 Make The Car Move/left_wheel_rotation/left_wheel_rotation.ino b/Lesson 1 Make The Car Move/left_wheel_rotation/left_wheel_rotation.ino
deleted file mode 100755
index 3a751c6..0000000
--- a/Lesson 1 Make The Car Move/left_wheel_rotation/left_wheel_rotation.ino
+++ /dev/null
@@ -1,31 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-/*In3 connected to the 7 pin,
- In4 connected to the 6 pin, ENB pin 5,*/
-int ENB=5;
-int IN3=7;
-int IN4=6;
-void setup()
-{
- pinMode(IN3,OUTPUT);
- pinMode(IN4,OUTPUT);
- pinMode(ENB,OUTPUT);
- digitalWrite(ENB,HIGH);
-}
-void loop()
-{
- digitalWrite(IN3,LOW);
- digitalWrite(IN4,HIGH); //Left wheel forward
- delay(500);
- digitalWrite(IN3,LOW);
- digitalWrite(IN4,LOW); //Left wheel stop
- delay(500);
- digitalWrite(IN3,HIGH);
- digitalWrite(IN4,LOW); //Left wheel back
- delay(500);
- digitalWrite(IN3,LOW);
- digitalWrite(IN4,LOW); //Left wheel stop
- delay(500);
-}
-
diff --git a/Lesson 1 Make The Car Move/right_wheel_rotation/right_wheel_rotation.ino b/Lesson 1 Make The Car Move/right_wheel_rotation/right_wheel_rotation.ino
deleted file mode 100755
index 766573c..0000000
--- a/Lesson 1 Make The Car Move/right_wheel_rotation/right_wheel_rotation.ino
+++ /dev/null
@@ -1,31 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-/*In1 connected to the 9 pin,
- In2 connected to the 8 pin, ENA pin 10,*/
-int ENA=10;
-int IN1=9;
-int IN2=8;
-void setup()
-{
- pinMode(IN1,OUTPUT);
- pinMode(IN2,OUTPUT);
- pinMode(ENA,OUTPUT);
- digitalWrite(ENA,HIGH);
-}
-void loop()
-{
- digitalWrite(IN1,LOW);
- digitalWrite(IN2,HIGH); //Right wheel forward
- delay(500);
- digitalWrite(IN1,LOW);
- digitalWrite(IN2,LOW); //Right wheel stop
- delay(500);
- digitalWrite(IN1,HIGH);
- digitalWrite(IN2,LOW); //Right wheel back
- delay(500);
- digitalWrite(IN1,LOW);
- digitalWrite(IN2,LOW); //Right wheel stop
- delay(500);
-}
-