-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:basic code for ESP server added #48
Conversation
ESP_Server/server.ino
Outdated
void setup(void) { | ||
WiFi.mode(WIFI_STA); | ||
WiFi.begin(ssid, password); | ||
//Serial.println(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up the code
ESP_Server/server.ino
Outdated
#include <ESP8266mDNS.h> | ||
|
||
#ifndef STASSID | ||
#define STASSID "ssid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to define same thing multiple times. Set SSID in line 11 here and remove passwords.
ESP_Server/server.ino
Outdated
} | ||
|
||
void setup(void) { | ||
WiFi.mode(WIFI_STA); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mode should be an access point. WIFI_AP
@CloudyPadmal we cant remove password as far as i think. Because the Wifi.softAP() metho requires 2 arguments. Still I am getting the following error while uploading the sketch,
and I am making following connections (left side pins are esp pins and right side pins are arduino) |
Password is optional. Look at the documentation https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/soft-access-point-class.html#softap |
ESP_Server/server.ino
Outdated
#include <WiFiClient.h> | ||
#include <ESP8266WebServer.h> | ||
|
||
const char* ssid = "ssid"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSID should be "PSLab_ESP"/"PSLab" or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes yes. This is just temporary. Will change .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's the change?
Not before this project. |
@CloudyPadmal I haven't interacted with electronics too much before ... But I am willing to work on it. |
@neel1998 you've mentioned in your proposal that you'll have all the background studies covered prior to GSoC. Now it's almost end and I don't think this will have any outcome at all with this feature as you're studying about ESPs now. I dunno I'm not sure what to do. Can we finalize this PR right now? WiFi AP sample source codes are all over the internet and this shouldn't be a WIP for days. |
@CloudyPadmal I mentioned in my proposal that I will be providing android side support for esp communication. Still i am trying my best to work on firm ware as well. And for basic AP server code i think this should be fine. We can add other endpoints later. |
ESP_Server/server.ino
Outdated
#include <WiFiClient.h> | ||
#include <ESP8266WebServer.h> | ||
|
||
const char* ssid = "ssid"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's the change?
Yes I am not on my system right now. Will make the changes by night |
Fix #47