ESP32,ESP8266, AND ESP8266 NODE MCU not working - arduino

1.I started with esp. 32 i used arduino IDE it only showed COM1 in PORTS. when i was uploading the code i pressed the boot button when connecting..... appears in the window but still an error (timeout....) occurs and code doesn't upload.
i installed the drivers but whenever i plugged in the usb cable a notification pops up that the computer doesn't recognize the device. i installed ch341 but it says the the drivers are preinstalled.
same problem appear with esp8266 node mcu.
Then using the same cable I started working with esp8266 no error popped up it had two options in PORT COM1 and COM4 I choose COM4 and I uploaded the blink code. it worked fine but after that i upload the WIFI SCAN code it started showing same problem as esp32... i disconnected it and connected again error popped up that it doesn't recognized by computer. and furthermore now it only shows com1 in ports option and when I press flash button the code doesn't get uploaded it shows timed out error. i disconnected and connected many times but it doesn't working.

are you setting like this??
this is my setting on the arduino

I mean you can try to install the esp32 USB port library CP210x_Universal_Windows_Driver.exe.

if your system does not detect esp8266 or NodeMCU boards while you installed all possible drivers, as mentioned in this GitHub issue change your USB wire cause the wire maybe is for just charging and not transferring data!
changing it worked for me!

Related

Arduino micro not recognized

Today I have an Arduino micro for some time and everything always worked well. Today, when I was uploading a code on this board using Arduino IDE, I accidentally started the Arduino Board update and the upload failed. After a while I retried again and again and again but upload always failed. Now my PC doesn't recognize my board and, looking in "device manager", when I connect my board, appears this screen. What should I do? Have I to reflash bootloader? Thank you!
I used to have same thing but i figured out my cable was not original so i used samsung micro then windows saw my arduino on SERIAL PORT, COM5.Everythin is working correct now, all errors about cable go change the cable.

Arduino nano not responding

Few months ago, I bought cheap arduino nano from china. Instaled all the required drivers, and tried out my frirst program.
Now I tried to upload something new, and I get this error message:
avrdude: ser_open(): can't open device "\.\COM4": System can't find given file.
I also noticed, that Tools->Ports can not be clicked. The device does not even show up in device manager.
Any Ideas?
In my first program I did also set pin 0 and 1 (RX/TX) as outputs and used them to flash LEDs. I am aware, that this probably prevents new code from beeing uploded, but it should not prevent from the device from shoving up at all. The computer talking to the USB driver, not the microcontroller.
Go to Device Manager and find the Arduino COM Port
Go to the Advanced properties of the port
Set the port # to COM1
Then un-plug your USB and plug it back in.

Not able to upload code to Arduino

My Arduino Uno was all set up and was working fine.
Project: Arduino controls a 9v motor depending on the command given. As the Arduino only provides 5v, I added a 9v battery to it through a transistor
I decided to add new code into the Arduino but when I tried it failed. I have uploaded code thousands of times before (successfully) all of a sudden the IDE keeps giving the following message
avrdude: ser_open(): can't open device ".\COM3": Access is denied.
I have looked up for a lot of solutions on this forum and elsewhere. Here are the things I have tried so far:
Changing the COM port
Disabling all the other devices CONNECTED to COM
Tightening the CONNECTIONS
Re installing all the drivers and the IDE
Rebooting the system
Using another laptop to upload code
All the above have given me the same output for some reason. The built in LED light and the power LED switch on when the board is connected to a power source (my laptop). Could the board have been damaged by any chance? How can I check if the board is spoilt? Should I buy a new board?
this may help;
remove the mcu from the board and connect the board to your PC.
try to open the com port.
if it opens, short TX pin to RX pin.
send some data and check if you are getting the data back. this way you can make sure your usb-ttl is not damaged.
With my verry limited experience with Arduino I've seen that the IDE sometimes resets the saved arduino on startup. Press extra -> Board -> yourboard and try again.
make sure you have the right ports COM1 and COM1
activate it too in arduino
Once it happened to me that a defective USB cable was the culprit. For one board it gave messages like
avrdude: stk500v2_ReceiveMessage(): timeout
But for another board I also got these messages "can't open device - access denied". It's always worth to try another cable.

avrdude: error: buffered memory access not supported

I am trying to upload this firmware sck_beta_v0_8_6 via Arduino 1.0.5-r2.
I have chosen LilyPad Arduino USB as the board. The device is a Smart Citizen Kit Urban Shield v.1.1.
The upload fails with the following error message:
Found programmer: Id = "BÛR"; type =
Software Version = . ; Hardware Version = .
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
What am I doing wrong?
Sometimes, a different USB cable will make all the difference. There is a wide range in the quality of cables on the market, and sometimes, you get one on the ragged edge of acceptable.
The Arduino lilypad seems to be particularly susceptible to this. Glad this helped.
Press the Reset Button before upload the code, until you hear the "unplug" sound (in windows). Open the IDE and try it again
I had the same error message trying to upload a sketch to an Arduino Leonardo board from a Levovo laptop using Arduino ver 1.0.6. Both Device Manager and Arduino showed the board connected on COM3. Arduino also gave an error message that COM3 was being used by another App. I tried changing USB cables but got the same message. What worked was changing the USB outlet from the top right rear on the Lenovo to the bottom right rear outlet. It connected on COM8 and I was able to upload the sketch. Understand there are speed differences between the two outlets. Now all I need to do is figure out why I cannot upload sketches to the same Leonardo board on my HP laptop with Windows 10 and the most recent Arduino version. Connects on COM6 but hangs up when uploading. (Note: Also had to edit some Arduino library files that worked on ver 1.0.6 but showed compile errors in the latest version.)
I had the same error, but I later found that I had the wrong Arduino type selected, instead of Nano I had Yun.
I had the same issue when trying to upload code into Arduino Micro ( Chinese clone ). Spending hours on Google, flashing new bootloader - still nothing. Physical reset and opening COM port with boundrate 1200 doesn't work. Why?
I HAVE ATMEGA168 INSTEAD OF ATMEGA32u4!
Google is telling, that Arduino Micro got Atmega32u4, but my clone got Atmega168! First of all, check what atmega type do you have by lookup on black soldered chip on Arduino.
So instead of choose "Arduino Micro" on "Board" menu, i choose Arduino Nano and everything works!
I get this same error, avrdude: error: buffered memory access not supported also with garbage-looking output with programmer id # with versions ., when I point avrdude at the serial port of the stock main firmware of my Leonardo-compatible breakout board instead of the serial port offered during the bootloader; it seems that the latter is what avrdude can program?
The normal initial output when actually connecting to the bootloader would be something like:
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
To get to the bootloader you can either
press the reset button (if you don't have a reset button, connecting reset to ground), or
briefly connect to the main firmware's serial port at 1200 bps and disconnect
The bootloader will present a different serial USB device than the main firmware's serial USB device, so it may get assigned a different serial port number in your OS, usually the next available one. For instance in Windows my Leonardo-compatible main firmware was assigned COM3 and the bootloader was assigned COM4.
A python script, courtesy of https://nicholaskell.wordpress.com/tag/leonardo/, for doing this serial 'knock':
reset.py:
#!/usr/bin/env python
import serial, sys
serialPort = sys.argv[1]
ser = serial.Serial(
port=serialPort,
baudrate=1200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
ser.isOpen()
ser.close() # always close port
In Windows land, I have a cmd script for using this in a virtualenv
reset.cmd:
"C:\Program Files (x86)\Python37-32\Scripts\virtualenv.exe" pyreset_virtualenv
pyreset_virtualenv\Scripts\pip.exe install pyserial
pyreset_virtualenv\Scripts\python reset.py COM3
pause
adjust to suit your serial port and python path.
Either way, after getting the bootloader connected, you have a brief window of a couple of seconds where avrdude can connect to the new serial port to start programming before the bootloader will go into the main firmware again, at which point you'll have to do the reset again. So, once you figure out the bootloader serial port, you'll want to prepare the avrdude command line to run in advance, so you can launch it without delay after the reset.
While this answer isn't specific to the lilypad, you need to reset the board to write or read from/to the memory. However, If you are using avrdude in the terminal you must send a specific baudrate(1200 for the Leonardo) then close, wait 2 seconds, and open the port. At that point you can read and write to and from your Arduino. I achieved this using python.
Along the lines of:
Import serial
Import time
Import os
Seri=serial.Serial(yourConnectedPort, specificBaudRate)
Seria.close()
time.sleep(2)
Seri.open()
os.system(your avrdude command)

Leonardo: Gets detected in Device Manager but then gets disconnected

An Arduino Leonardo gets detected in Device Manager, but then it gets disconnected.
So, this is what I am doing. Connecting Arduino Leonardo to my laptop. It gets detected in Device Manager (I have updated the driver as well). However, I soon hear a beep and the Leonardo gets uninstalled. If I push the 'Reset' button it gets detected again. However, after a few seconds it gets disconnected again. The Device Manager displays the message
Currently, this hardware device is not connected to the computer. (Code 45)
Note: It was working fine a couple of weeks ago. I am using Windows 7.
It looks like a problem with the soft-reset of the Arduino Leonardo, normally when you connect the Arduino Leonardo, it appears in Device Manager like Ard...bootloader (COMX), for a few seconds and then the Arduino Leonardo appears on a different COM port.
I know, in your case, after that it just disappears.
Try to select that port in the Arduino IDE, and then you have to try to load some sketch, like blink.ino. Press the reset button at the same time, and then when the sketch is beginning to be uploaded, release the reset button. That works for me.
I had exactly the same problem. After pushing Reset my Arduino Micro first got detected normally. Here's the corresponding excerpt from my /var/log/syslog (without the timestamps, etc.):
usb 6-1: new full-speed USB device number 56 using uhci_hcd
usb 6-1: New USB device found, idVendor=2341, idProduct=0037
usb 6-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 6-1: Product: Arduino Micro
usb 6-1: Manufacturer: Arduino LLC
cdc_acm 6-1:1.0: ttyACM3: USB ACM device
But only a few seconds later it got disconnected:
usb 6-1: USB disconnect, device number 56
After a long search I found how you can recover from this fatal situation:
Connect your Arduino via a USB cable.
Open the Arduino IDE and load the "Blink" example.
Open a shell and enter: tail -f /var/log/syslog. This is for observing which /dev/tty port the Arduino gets associated with.
Now you must be fast: Reset the Arduino, see what /dev/tty port it gets and choose that port in the IDE under menu Tools → Serial Port. You must do this before the Arduino disconnects again or else the correct menu point won't be accessible. You probably need one or two tries before you get it. That was the hard part.
Press "Reset" again on the Arduino, and immediately after, press the Upload button in the Arduino IDE.
Your Arduino should start the blink program shortly after the Upload and is "healed".
After some more investigation I found the reason for the whole misery: In some forgotten source code of some forgotten file there was a main() function (I had written that one for some tests under Linux/g++ some weeks before). The compiler now preferred to use that main() instead of the standard main() from the IDE environment.
The result is that the USB gets disconnected, probably because the original main() does some initialisation which now was missing.
Make sure that nothing, rather than the USB cable, is connected to the Arduino and try again. If the problem persist, try to replace the cable and test it on a different USB port.
Try also to read the post Windows Not recognizing Uno. If you can see the Arduino in the Device Manager for few seconds, try to reinstall the drivers. The drivers are in the Arduino IDE folder.
You may know about those ICSP "mystery" pins.
Take an Arduino Uno and add the needed "Arduino as Programmer" code to it, wire the Leonardo to the Arduino Uno and now you can program the Leonardo - but you'll nuke the Leonardo's bootloader.
In the IDE, go to "file" and move the mouse to "upload using Arduino as programmer" and have your fun. If you resort to this method, do not buy a LilyPad USB as it has the exact same 32U4 chip like a Leonardo and doesn't have the ICSP pins. That is, unless you can solder the pins into the six holes!

Resources