Define LEFT - A1-WPS Office
Define LEFT - A1-WPS Office
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
Simple Phone: Call & SMS using GSM Module & Arduino
June 1, 2019
smithsays:
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
DIY LiPo Battery Charger with IoT Voltage & SoC Monitoring System
Recent Posts
DIY LiPo Battery Charger with IoT Voltage & SoC Monitoring System
Categories
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 Projects(13)
STM32 Projects(19)
Tech Articles(18)
Categories
555 Timer Projects(15)
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 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
YouTube
Instagram
Facebook
Messenger
Telegram