I have programmend and uploaded the program to host a local server on my ESP.
But for some reason the server it should be hosting isn't showing up in my wifi connections.
I'm pretty sure I'm not wiring my ESP corerctly, as of now I only have the VCC and GRND pin connected to the correct power supply. Are there any other pins that need to be connected?
My wifi and password are generic names, no spaces, numbers or any weird characters.
The right LED is lighted up.
Something that might be the issue is that the ESP is in sleep mode perhaps? I'm not sure.
This is why I'm wondering if I need to wire anything else to 'wake it up'?
Is it a Dev board or just an ESP-07 ?
Either way, did you connect an antenna ? ESP-07 does not have an onboard antenna.
Have you pulled pin CH_PD (ENABLE) & RST up ? both need to be connected to VCC (through a 10K resistor as an option)
And i think GPIO15 needs to be pulled LOW, also through a 10K resistor.
From the picture, the ESP-07 does appear to have an internal LED, and chances are it is connected to GPIO1 (or GPIO2, but my bet is GPIO1, you can use the multimeter to confirm where the LED and the resistor are connected to, but the contact are rather small of course in SMT package) You can upload a program that blinks that LED.
I'm pretty sure that the ESP8266 07 has a build in antenna so that shouldn't be the problem.
But indeed I haven't connected the CH_PD and RST pins. Ill connect those to my power supply as well, can I just attach this to the same 3.3V power supply I'm using for the VCC in?
As well as the GPIO15. So with pull low you mean connect to ground?
Pretty sure it doesn't. The ESP-01 and ESP-12 do. A strand of solid copper will have to do for starters, but let's first get it powered up properly.
Yes.
Yes again.
First, either find which pin the internal LED is connected to or connect a LED + resistor between VCC and one of the GPIO pins and blink that. (make sure it's active LOW, or make sure that it's OK to pull the GPIO LOW on startup)
Oke, so I have managed to program my ESP8266-07 through a arduino uno, and I now have a internet access point showing up. However there are still two problems I'm facing.
I can't seem to connect to the AP, it just keeps saying connecting
The AP only shows when I'm connected to my arduino uno.
Is it possible to have a standalone esp8266-07 host a local server without an entire arduino?
I have also purchased a ESP 13 just in case, since this for sure has an antenna
I also have a couple of ATTINY's laying around incase you NEED some sort of arduino connected for it to be able to host a server.
I'm not buying a bigger pre made board with a ESP on it since this is just to big for my project.
2 possible causes. Either something in the code you've uploaded, or something power related.
To determine which i will need more information. Please provide a circuit schematic. How are you powering the ESP ? they are know to be quite power hungry particularly during their WiFi connecting stage, where they have demands up to 300mA
Please post your sketch within </> code tags so we can see if there is anything not quite right in there.
Yes of course it is, again i need to see the code that you are running now.
So does an ESP-01 or an ESP-12. You can see the antenna as a bit of Zig-Zag trace on the PCB. An ESP-07 has a connection for an external antenna, which can be practical if you want to place the antenna a little away from the unit, and with which you can achieve significant more range.
Personally - I'd switch to ESP32 if I were you. ESP8266 gives no end of problems for me, but the ESP32 stuff is a joy to work with, including some useful "works out of the box" stuff like OTA programming (so you can re-flash your project without having to move it or plug anything into it).
For power I'm using a AMS1117 5V power converter, and I have checked multiple times to make sure that I have 3.3V going to my ESP.
I can provide you with my code when I get home, but pretty sure that that shouldn't be the problem.
I have purchased a ESP with a zig-zag antenna on it now so will test my code on this tonight as well.
Thanks for all the feedback already!
Oke let me show my current setup, this way you can give me clear feedback on how I'm messing up
It looks a bit messy because of all the wires, but they were needed to program the ESP with my arduino.
Only the VCC and GND of the ESP are connected. I'm currently using my 5V power from my arduino through a converter to 3.3V to power my ESP.
Currently bothing is happening, I don't see my local hotspot popping up or anything.
The code I uploaded is:
</> #include <ESP8266WiFi.h> #include <WiFiClient.h> #include <ESP8266WebServer.h>
Eh you didn't quite manage the </> code-tags properly. You have to click the button at the top of the composer window and paste code in between that.
But that is a different matter.
void handleRoot() {
LDRReading = analogRead(A0);
server.send(200, "text/html", "
You are connected
");
}
This does not compile, you can not print a text over multiple lines, is that how it actually is ?
If you are using an UNO you may as well just use it's 3.3v, but it is suspicious that your connection attempt causes it to crash, but i think i found the cause.
#define APSSID "paultest"
#define APPSK "test" // this is not a valid password
#endif
const char *ssid = APSSID;
const char *password = APPSK;
A wifi password has to have a minimum length of 8 characters (and not all characters are allowed.
If that is the case the wifi credentials that were used last will be used, but those don't exist as yet.
Chage it to
Aaah that might indeed be a issue, when I get home Ill try to use the 3.3V of my Arduino as well as changing my password.
As for the string that is not like that in my code indeed.
Oke progress has been made! I now see the internet AP pop up and I now get the option to fill in the password. However it then just says, No internet, secured.
My setup now is 3.3V from my arduino, GND from my arduino and the EN pin of the ESP is connected to 3.3V as well.
And you were expecting., what ? Your ESP isn't connected to the internet ! How would it be able to do that ?
Once you now open your browser, and type the standard IP 192.168.4.1 you should get sent whatever the function handleRoot() sends you.
You can however connect your ESP to a WiFi network and let it work in station mode, or both as an AP as a STA. You could then theoretically connect to the AP, and connect through it to a WiFi network that is connected to the internet., but why ?
Owwhh, hahaa wasn't really sure what to expect then.
So I want a app that can receive data from a ligh sensor. And I want lets say 6 ESP's to send data to this app.
Whats the best way of doing this?
Sending data to one ESP that hosts a AP and read data from there or send data from each ESP straight to my app?
That would be my preferred choice. or connect them all to a router.
If going for several ESP as a STA, you have to keep in mind that an ESP as an AP has a maximum of 8 devices connected, but you would be within that limit.
It is easy enough to set up, and you could just send tcp packets, or get the STA to POST on the webpage that the AP-ESP is hosting, and your app can read it from there. Or get the main AP to request the data by doing a GET request to pages the STA's are hosting.
I would just a router and the 2nd method.
That would mean your device has to connect to all ESP's individually, that takes time. A lot more time than visiting different pages.
tcp packets are obviously the fastest. Pages are really easy to debug.