Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IOT Code
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lui.bingham
IOT Code
Commits
a7b1f97c
Commit
a7b1f97c
authored
Jan 15, 2024
by
lui.bingham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete WiFi_Connect.ino
parent
0cdf2766
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
47 deletions
+0
-47
WiFi_Connect.ino
WiFi_Connect.ino
+0
-47
No files found.
WiFi_Connect.ino
deleted
100644 → 0
View file @
0cdf2766
#include <SoftwareSerial.h>
#include <stdlib.h>
SoftwareSerial
ESP8266
(
4
,
5
);
// RX, TX
unsigned
char
check_connection
=
0
;
unsigned
char
times_check
=
0
;
void
setup
()
{
Serial
.
begin
(
115200
);
ESP8266
.
begin
(
115200
);
ESP8266
.
print
(
"***VER:"
);
delay
(
2000
);
ESP8266
.
println
(
"AT+RST"
);
delay
(
1000
);
ESP8266
.
println
(
"AT+GMR"
);
delay
(
1000
);
ESP8266
.
println
(
"AT+CWMODE=3"
);
delay
(
1000
);
ESP8266
.
println
(
"AT+CWLAP"
);
delay
(
1000
);
}
void
loop
()
{
Serial
.
println
(
"Connecting to Wifi"
);
while
(
check_connection
==
0
)
{
Serial
.
print
(
"."
);
ESP8266
.
print
(
"AT+CWJAP=
\"
Home
\"
,
\"
Endeavour21
\"\r\n
"
);
ESP8266
.
setTimeout
(
5000
);
if
(
ESP8266
.
find
(
"WIFI CONNECTED
\r\n
"
)
==
1
)
{
Serial
.
println
(
"WIFI CONNECTED"
);
break
;
}
times_check
++
;
if
(
times_check
>
3
)
{
times_check
=
0
;
Serial
.
println
(
"Trying to Reconnect.."
);
}
}
while
(
1
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment