Go Down

Topic: WeMos d1 mini (Read 133 times) previous topic - next topic


     Was using my WeMos on another project and decided to dismanlle it to use on a different project.it is breadboarded so no big deal here, I created a project and downloaded it to the WeMos ,  the program loaded, and then I made a change, just added my WiFi credentials and re loaded the program. I heard the familiar tone and then I noticed that the serial monitor did not show anything , I did not see the blue led by the WiFi chip blink anymore. Now for some reason I get the serial,serialutilSerialException: could not open port 'COM6':FileNotFoundError (2 the system could not find the file specified.',None,2).
     I check the port under tools and it does not find a port.I tried a different board and its fine so my WeMos died for some reason.I don't believe it is in deep sleep because my code didn't call for it.
I understand the error saying could not find file because it never loaded. 
     Not sure if there is anyrhing I could do short of tossing the board in the round circular file .I have had this board for about a month and used it maybe 3Xs .Like I said above , it was working then just stopped. Thanks
Code: [Select]
// Load libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include <OneWire.h>
#include <DallasTemperature.h>

// Replace with your network credentials
const char* ssid     = "*******";
const char* password = "******";

// Auxiliary variables for temperature
//static char celsiusTemp[7];
static char fahrenheitTemp[7];
String temperatureString = "";      // Variable to hold the temperature reading

// EEPROM size
// Address 0: Last output state (0 = off or 1 = on)
// Address 1: Selected mode (0 = Manual, 1 = Auto PIR,
// 2 = Auto LDR, or 3 = Auto PIR and LDR)
// Address 2: Timer (time 0 to 255 seconds)
// Address 3: LDR threshold value (luminosity in percentage 0 to 100%)
#define EEPROM_SIZE 4

// Set GPIOs for: output variable, status LED, PIR Motion Sensor, and LDR
const int output = 15;
const int statusLed = 12;
const int motionSensor = 5;
const int ldr = A0;
// Store the current output state
String outputState = "off";

// GPIO where the DS18B20 is connected to
const int oneWireBus = 4;         
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(oneWireBus);
// Pass our oneWire reference to Dallas Temperature sensor
DallasTemperature sensors(&oneWire);

// Timers - Auxiliary variables
unsigned long now = millis();
unsigned long lastMeasure = 0;
boolean startTimer = false;
unsigned long currentTime = millis();
unsigned long previousTime = 0;
const long timeoutTime = 2000;



A schematic may also be useful about now and you may want to try the board without any external connections in case it was a simple wiring issue.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


     Not sure what's wrong with my post, please elaborate .Its a hardware question, not programming so I thought what I posted was ok, I tried to load the sketch but it was too large and it violated the 9000 character limitation. 
     As far as the installation , I tried it with a example from the Ide program(1.8.13) and it didn't see the board, showed no port ,it was grayed out. Prior to that it did load the program once but that didn't happen again. I immediately unplugged it and removed the two connections I had which were nothing more than the PIR circuit and the Led. I couldn't figure out how to add the print ,I have used the same circuit before and it still works on a different board.
     I know that this is not enough information for you to tell me what's is wrong, all I was hoping to get out of this post is if there was a way to either trouble shoot the board or suggest something I could try to see if the board is indeed toast and why??I hope you can understand this.


If you read the links provided you will notice there is other information that may also help people wanting to give advice to you.

A PIR usually has at least 3 connections so only having two would mean something may be amiss.
Hence the schematic request even if it is hand drawn.

Intermittent connections to a board can in a lot of cases be resolved by removing all the external connections to rule those out first.

Additional issues are mentioned in the links provided.


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


     I did post an image, evidently it never showed, I know I said I only used 2 items, they were correctly wired as per print below.  Also I did refer to the links provided and was not helping me with what the issue may have been. I used Windows10 Pro with Arduino IDE 1.8.13 . I checked the tools to make certain that the board and properties were correct. The program did load the first time, I forgot to put in my WiFi credentials so I had to correct that and reload the file to the board and that's when it stopped working. I removed all power and then used bare board only and still didn't work.
      I know my work space is safe because it is a laminated top with a an anti static pad . I know that this is an inexpensive board and it probably is toast, not an issue. I can replace the board, I just would like to know why this happened and if it is really a bad board. It doesn't heat up , it isn't recognized by the tone when plugged in, the port is grayed out, someone suggested that it could be in deep sleep, can't figure out how that could have happened to prove it one way or the other. I also installed this same circuit on a Node MCU 1.0 ESP 12E development board and it is running just fine. 
     I appreciate your help and time with this and would like to thank you for reading this and any suggestions you may have to help me resolve this issue. Just want to make you aware that I answered this post earlier and lost it somehow ,so if it reappears I am sorry.


If a bare board does not have any reaction to being plugged in to your computer you are probably safe to assume it is pooched providing you also tried other USB cables too as some USB cables are power only and not power and DATA.

As to WHY ?
This would normally be an issue with power rails and how they are applied and is often the biggest single thing we see that kills boards.

Other common issues are underpowered devices but unlikely in your case.

Where items attached to boards draw excessive current such as a relay which often needs its own PSU and a common ground we also see issues.

Different PIR modules can also have different current draw so they too may need thier own PSU and you need the specs to be sure about what it needs.

The DSB would not concern me with the exception of the math used as it needs to account for 3.3 volt and not 5 volts as would be the normal approach and that would just be bad readings if the math was wrong that's all.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


Thank you ,I am baffled then, same circuit to the other board active for 3 days now and still chugging along. I couldn't see why the PIR and the led with ballast resistor would have caused this . 
PIR was a HC-SR501 pretty common for Arduino projects, Thanks though.

Go Up