So how to fix the error?
Disconnect the WeMos and then plug it back in. espcomm is a common issue and certainly the Miniās will upload at 921600 speed 90% of the time.
Ok, Iāll try it.
I have try it again, and the error become more and more.
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
How to test the WeMos board? I still never test it yet.
Is it the full or mini D1?
Have you installed the drivers?
Which com port is it connected to?
Test with Standalone sketch.
Yes, I have installed driver CH341SER, library esp8266, and phyton 3.6.2. I use full WeMos and I use Arduino 1.6.11. The port is COM10.
But, where is that standalone sketch?
Is it esp8266_standalone?
yes thatās right.
Do you have REAL WeMos or āfakeā i.e. was it bought from WeMos (real) or elsewhere (fake)?
I have tried esp8266_standalone. There are still error like that.
I think itās fake. What is the difference between the original and the fake anyway?
Some fakes donāt work.
Most do but you now need to ask on WeMos forum, even though you didnāt purchase from them.
If you sort out the espcomm and still have problems with Blynk please post again.
Do you have recommendations for which shield should I use? I think, itāll better if I buy the new shield. I want to look for shield which there are many in market.
Take a look at this https://www.aliexpress.com/store/product/WEMOS-D1-mini-Pro-16M-bytes-external-antenna-connector-ESP8266-WIFI-Internet-of-Things-development-board/1331105_32724692514.html and their website for the mini at https://wiki.wemos.cc/products:d1:d1_mini_pro
-
update the arduino ide to current version. 1.6 is obsolete!
-
afaik, you have to install python 2 not 3.
-
make sure you have a good quality data cable, not longer than 0.5m (not some cheapo charging cable)
-
if the above 2 points are valid, and still no luck, try reducing the baud rate to lower speed (512000)
What do you think? Itās original or clone?
Dunno, hard to tell.
See espcomm error discussion on GitHub at Fatal exception (28) Ā· Issue #280 Ā· esp8266/Arduino Ā· GitHub
@Maria looks like your very first sketch was the most suitable. Look at the mods marked as āCostasā in this one and see if it works. You might need to increase the 200L for timer.setInterval as you are using one of those slow Arduino devices.
#define BLYNK_PRINT SwSerial #include <SoftwareSerial.h> SoftwareSerial SwSerial(10, 11); // RX, TX #include <BlynkSimpleStream.h> // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "*****************************************"; int buzzer = 13 ;// define buzzer Interface int pin = 2; // define the flame sensor interface int analoog = A0; // define the flame sensor interface int val ;// define numeric variables val float sensor; //read analoog value BlynkTimer timer; void readSensor() // Costas { sensor = analogRead(analoog); Serial.println(sensor); // display temperature // long uptime = millis() / 60000L; Costas val = digitalRead (pin) ;// digital interface will be assigned a value of 3 to read val if (val == HIGH) // When the flame sensor detects a signal, buzzer beep { digitalWrite (buzzer, HIGH); } else { digitalWrite (buzzer, LOW); } //delay(1000); // Costas } void setup() { pinMode (buzzer, OUTPUT) ;// define buzzer as output interface pinMode (pin, INPUT) ;// output interface defines the flame sensor pinMode (analoog, INPUT) ;// output interface defines the flame sensor // Debug console SwSerial.begin(9600); // Blynk will work through Serial // Do not read or write this serial manually in your sketch Serial.begin(9600); Blynk.begin(Serial, auth); // Notify immediately on startup if(val==HIGH){ Blynk.notify("Flame!!!"); } // Setup a function to be called every 200ms Costas timer.setInterval(200L, readSensor); // Costas } void loop() { Blynk.run(); timer.run(); }
@Costas, I think Iāll just use USB serial because my deadline has been very close. After I upload the sketch, still nothing notif appear but the buzzer rang. I also have reduced the interval up to 10, but still nothing notif.
my deadline has been very close
Another college project?
After I upload the sketch, still nothing notif appear but the buzzer rang.
Just to be clear on Notify:
Android is OK, iOS doesnāt have it yet.
You need the Notification widget in your project and best set to PRIORITY of HIGH.
Notify isnāt a good widget for testing purposes. Serial Monitor access, using a USB2TTL adaptor if necessary, is essential until you know what you are doing.
I think Iāll just use USB serial
Got lotās of limitations and if I was your College lecturer I would dock you 50% just for thinking about it
Paste your sketch and someone might take a look at it.
Another college project?
Maria:
Yes, this project deadline has been very close. I have to submit this project draft to my campus as my final project tomorrow. This is just for temporary. I still will attempt to use WeMos for the connection. But, if the WeMos still being error, then I have no other choice beside USB serial.[quote=āCostas, post:40, topic:15891ā]
Got lotās of limitations and if I was your College lecturer I would dock you 50% just for thinking about it
[/quote]
Please donāt like that. I just have no choice, Iām so hopeless because I have try many way but still no luck. By the way, Iām so thank full for you @Costas and @wanek to help me to finish my final project. I wish, this project can be success.[quote=āCostas, post:40, topic:15891ā]
Serial Monitor access, using a USB2TTL adaptor if necessary, is essential until you know what you are doing.
[/quote]
I think, I need a USBTTL adaptor. I have set the PRIORITY to HIGH. But, still nothing notif.
Anyway, what should I do with USBTTL? Because, I have never used it