0% found this document useful (0 votes)
24 views16 pages

Define LEFT - A1-WPS Office

Define left turn code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views16 pages

Define LEFT - A1-WPS Office

Define left turn code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

3

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26
27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51
52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76
77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101
102

103

104

105

106

String readvoice;

int k=0;

void setup() {

Serial.begin(9600);

pinMode(2,OUTPUT);

pinMode(3,OUTPUT);

pinMode(4,OUTPUT);

pinMode(5,OUTPUT);

void loop() {

while (Serial.available())

delay(3);

char c = Serial.read();

readvoice += c;

if(readvoice.length() > 0)

{
Serial.println(readvoice);

if(readvoice == "forward")

digitalWrite(2, HIGH);

digitalWrite(3, LOW);

digitalWrite(4, HIGH);

digitalWrite(5, LOW);

k=1;

if(readvoice == "backward")

digitalWrite(2, LOW);

digitalWrite(3, HIGH);

digitalWrite(4, LOW);

digitalWrite(5, HIGH);

k=2;

if(readvoice == "right")

if (k==2)

digitalWrite(2, HIGH);
digitalWrite(3, LOW);

digitalWrite(4, LOW);

digitalWrite(5, LOW);

delay(1000);

digitalWrite(2, LOW);

digitalWrite(3, HIGH);

digitalWrite(4, LOW);

digitalWrite(5, HIGH);

else

digitalWrite(2, HIGH);

digitalWrite(3, LOW);

digitalWrite(4, LOW);

digitalWrite(5, LOW);

delay(1000);

digitalWrite(2, HIGH);

digitalWrite(3, LOW);

digitalWrite(4, HIGH);

digitalWrite(5, LOW);

if(readvoice == "left")

{
if (k==2)

digitalWrite(2, LOW);

digitalWrite(3, LOW);

digitalWrite(4, HIGH);

digitalWrite(5, LOW);

delay(1000);

digitalWrite(2, LOW);

digitalWrite(3, HIGH);

digitalWrite(4, LOW);

digitalWrite(5, HIGH);

else

digitalWrite(2, LOW);

digitalWrite(3, LOW);

digitalWrite(4, HIGH);

digitalWrite(5, LOW);

delay(1000);

digitalWrite(2, HIGH);

digitalWrite(3, LOW);

digitalWrite(4, HIGH);

digitalWrite(5, LOW);

}
if(readvoice == "stop")

digitalWrite(2, LOW);

digitalWrite(3, LOW);

digitalWrite(4, LOW);

digitalWrite(5, LOW);

readvoice="";

Related Articles

OTAA LoRaWAN Node SX1276 Arduino

OTAA-based LoRaWAN Node with Arduino & LoRa SX1276

April 30, 2022

Interface BMP180 Sensor with Arduino

Interface BMP180 Pressure & Temperature Sensor with Arduino

July 14, 2019

Call SMS GSM Arduino

Simple Phone: Call & SMS using GSM Module & Arduino

June 1, 2019

SD Card Module Arduino

Using SD Card Module with Arduino | Read/Write/Data Logger

July 22, 2021


One Comment

smithsays:

March 20, 2020 at 12:32 PM

a well-explained article, You guys try MIT app inventor to run this with your own custom mobile
application. BTW have you guys ever bought PCB from china? Have you ever tried NextPCB, if no i highly
recommend it, a Few days ago i ordered a PCB from this website. my idea was to use a PCB as a chassis
of the robot. and all the components will be on this. It was my first time with any kind of PCB so I was
worried about the quality. But when I get the PCB i was totally amazed by the product they deliver. I
highly recommend try http://www.nextpcb.com link is here

Loading...

Reply

Comments

Popular

Recent

Getting Started with Realtek AMB82-Mini IoT AI Camera Arduino Dev. Board

Getting Started with Realtek AMB82-Mini IoT AI Camera Arduino Dev. Board

May 31, 2023

What is OLED Display & How it Works OLED vs. LCD

What is OLED Display & How it Works? OLED vs. LCD

May 27, 2023

DIY LiPo Battery Charger with IoT Voltage & SoC Monitoring System

IoT Battery Monitoring System with DIY LiPo Charger

May 25, 2023


Lucid ONE - AI Planning 7 DOF Robotic Arm from AmberRobotics

Lucid ONE: AI Planning 7-DOF Robotic Arm Review

May 20, 2023

Control Stepper Motor with DRV8825 Driver & Raspberry Pi Pico

Control Stepper Motor with DRV8825 Driver & Raspberry Pi Pico

May 17, 2023

IoT Starter Kits Based on Arduino, ESP8266, ESP32 & Raspberry Pi

10 Essential IoT Starter Kits to Kickstart Your Journey

May 16, 2023

Interfacing Waterproof Ultrasonic Sensor JSN-SR04T AJ-SR04M with Arduino

Interfacing Waterproof Ultrasonic Sensor JSN-SR04T/AJ-SR04M with Arduino

May 15, 2023

Control Stepper Motor with A4988 Driver & Raspberry Pi Pico

Control Stepper Motor with A4988 Driver & Raspberry Pi Pico

May 13, 2023

Control Stepper Motor with DRV8825 Driver & ESP8266

How to Control Stepper Motor with DRV8825 Driver & ESP8266

May 12, 2023

Laser Security System using 555 Timer IC & LDR

Laser Security System using 555 Timer IC & LDR

May 10, 2023

Recent Posts

What is OLED Display & How it Works OLED vs. LCD

What is OLED Display & How it Works? OLED vs. LCD


May 27, 2023

DIY LiPo Battery Charger with IoT Voltage & SoC Monitoring System

IoT Battery Monitoring System with DIY LiPo Charger

May 25, 2023

Lucid ONE - AI Planning 7 DOF Robotic Arm from AmberRobotics

Lucid ONE: AI Planning 7-DOF Robotic Arm Review

May 20, 2023

Control Stepper Motor with DRV8825 Driver & Raspberry Pi Pico

Control Stepper Motor with DRV8825 Driver & Raspberry Pi Pico

May 17, 2023

IoT Starter Kits Based on Arduino, ESP8266, ESP32 & Raspberry Pi

10 Essential IoT Starter Kits to Kickstart Your Journey

May 16, 2023

Interfacing Waterproof Ultrasonic Sensor JSN-SR04T AJ-SR04M with Arduino

Interfacing Waterproof Ultrasonic Sensor JSN-SR04T/AJ-SR04M with Arduino

May 15, 2023

Control Stepper Motor with A4988 Driver & Raspberry Pi Pico

Control Stepper Motor with A4988 Driver & Raspberry Pi Pico

May 13, 2023

Control Stepper Motor with DRV8825 Driver & ESP8266

How to Control Stepper Motor with DRV8825 Driver & ESP8266

May 12, 2023

Categories

555 Timer Projects(15)


AMB82-Mini IoT AI Camera(1)

Arduino Projects(162)

Articles(40)

BLE Projects(17)

Electronics Circuits(28)

ESP32 MicroPython(7)

ESP32 Projects(50)

ESP32-CAM Projects(12)

ESP8266 Projects(68)

IoT Projects(123)

Learn Electronics(18)

LoRa/LoRaWAN Projects(20)

Microcontrollers(2)

Nuvoton Microcontroller(1)

Op-Amp Circuits(5)

Power Electronics(12)

Product Review(6)

Raspberry Pi(69)

Raspberry Pi Pico Projects(46)

Raspberry Pi Pico W Projects(11)

Raspberry Pi Projects(13)

STM32 Projects(19)

Tech Articles(18)

Categories
555 Timer Projects(15)

AMB82-Mini IoT AI Camera(1)

Arduino Projects(162)

Articles(40)

BLE Projects(17)

Electronics Circuits(28)

ESP32 MicroPython(7)

ESP32 Projects(50)

ESP32-CAM Projects(12)

ESP8266 Projects(68)

IoT Projects(123)

Learn Electronics(18)

LoRa/LoRaWAN Projects(20)

Microcontrollers(2)

Nuvoton Microcontroller(1)

Op-Amp Circuits(5)

Power Electronics(12)

Product Review(6)

Raspberry Pi(69)

Raspberry Pi Pico Projects(46)

Raspberry Pi Pico W Projects(11)

Raspberry Pi Projects(13)

STM32 Projects(19)

Tech Articles(18)

About Us
“How to Electronics” is an electronics engineering community built and run by passionate electronics
engineers. We share news, articles, projects in various electronics domains such as Embedded, Power,
Analog, Digital, Audio, Internet of Thing, Artificial Intelligence, Wireless Communication, Robotics etc
thus helping our readers with their projects and work.

We also offer ideas and solutions for students, organizations and Industries and also provide them with
the required training in different fields. Share the Joy of learning with us.

Follow Us

YouTube

Facebook

Twitter

Instagram

Pinterest

Subscribe to our channel

© Copyright 2023, All Rights Reserved | How To Electronics

About Us Disclaimer Privacy Policy Contact Us Advertise With Us

Facebook

Twitter

Pinterest

YouTube

Instagram
Facebook

Twitter

LinkedIn

Messenger

WhatsApp

Telegram

You might also like