I am trying to write my own control version but i am running into a problem when turning on the wifi. My code mostly looks like this:
[code]
void setupWIFI() {
#ifdef USE_WIFI
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wifi");
for(int attempt = 0; attempt < 5 && WiFi.status() != WL_CONNECTED; attempt ++) {
delay(1000);
Serial.print(".");
}
if(WiFi.status() == WL_CONNECTED) {
Serial.println("OK");
} else {
Serial.println("NOK");
reconnect();
}
#else
Serial.println("WIFI disabled");
#endif
}
[/code]
And then in the setup i am calling this function. I use these libraries:
#include <WiFi.h>
#include <HTTPClient.h>
However when i run the code on the unit i get the message:
Brownout detector was triggered
And it just restarts. Is there something i missed?
Brownout when turning on wifi
-
- Posts: 6
- Joined: Tue Oct 03, 2017 5:21 am
Re: Brownout when turning on wifi
Hmm switching usb cable helped.
I read somewhere that a high resistance usb cable can have this effect. So i switched to one of my fast charge usb cables, they tend to be a bit better, was using a random usb cable and that one must have been of the very cheap kind.
Sorry for the false alarm.
I read somewhere that a high resistance usb cable can have this effect. So i switched to one of my fast charge usb cables, they tend to be a bit better, was using a random usb cable and that one must have been of the very cheap kind.
Sorry for the false alarm.
Re: Brownout when turning on wifi
Good to know.
-
- Posts: 2
- Joined: Thu Apr 12, 2018 6:25 am
Re: Brownout when turning on wifi
Greetings, I have a Freematics + with the original cable that came in the package and I have exactly the same problem, and probe with a PC and a Mac, with different USB cables, even with a Thunderbolt to USB 3 adapter, and I can not do it function
Re: Brownout when turning on wifi
Either connect the unit to OBD port (so powered by DC 12V) or connect USB to a USB hub with power supply, to solve this issue.