How to upload code for Blynk app to nodemcu using Arduino? - nodemcu

i am trying to make an anti theft door notification IOT app. I am using nodemcu,arduino for coding and a blynk app to operate it. I have already installed a drivers from the link for nodemcu. Now I don't why I am not able to upload a code.
I am getting this as an error:
Sketch uses 281080 bytes (26%) of program storage space. Maximum is 1044464 bytes.
Global variables use 30152 bytes (36%) of dynamic memory, leaving 51768 bytes for local variables. Maximum is 81920 bytes.
error: Failed to open COM1
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

You are getting
error: Failed to open COM1 error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed
Because the arduino IDE was not able to upload code to the nodeMCU through COM1.
There are multiple reasons for this to happen,
If you are on linux or mac, make sure you have write permission to the port. (as the port you mention looks like a windows port this is probably not your issue.)
Make sure that you have selected proper board in the Arduino IDE board list.
Press and hold the flash on nodeMCU and plug the USB cable into the PC, once you connect the cable release the flash button. now try to upload the code.

Related

iceprog - Can't find iCE FTDI USB device with Alchitry CU

I'm trying to upload my build code to my alchitry-CU FPGA board threw apio using iceprog on windows.
apio upload
which then executes
iceprog -d i:0x0403:0x6010:0 hardware.bin
And the output is
init..
Can't find iCE FTDI USB device (device string i:0x0403:0x6010:0).
ABORT.
scons: *** [upload] Error 2
I have installed the libusbk driver and also tested uploading with the same cable on another pc with the standard drivers and the provided IDE Alchitry Labs in combination with iceCube2 but I really wanted to use the open source alternative instead.
Never mind I found the fix. The problem was that the Alchistry CU shows up as two different devices in Zodic when installing the drivers, one as Interface 0 and one as Interface 1 and I didn't see the other one and only installed the libUsbK driver on one of them.

Cannot open COM port on ESP32 device. Using Windows10 and MPFShell

I can open my ESP32 Vroom32 device made by Espressif with a cp2101 chip on Ubuntu. I used Ubuntu to flash Micropython onto it, however when I try to connect with Putty, MPFshell or anything else on Windows 10 it will not work. I downloaded and installed the recommended drivers for it and also updated Windows which was supposed to load the driver as well. I can see the device and COM port in device manager but when I attempt to connect I get blocked. For example on MPFshell I get the message "Cannot connect to COM17"
It is a common reason for boards to show the "Cannot Connect to COM" error because of a bad USB cable.
Always check with another cable first, before getting deeper to the problem.

UHD error with REDHAWK

I made a node which contains a USRP_UHD and a GPP (and make sure the ip_address is correct for USRP_UHD). I launched the domain based on this node. However, I got the following error:
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
...
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
UHD Warning:
Unable to set the thread priority. Performance may be negatively affected.
Please see the general application notes in the manual for instructions.
EnvironmentError: OSError: error in pthread_setschedparam
I did get two unallocated (TX/RX for each) tuners, but it is not easy to allocate these two tuners for use for any parameters.
Besides, if I just launch the domain and launch the single device USRP_UHD, or simply run the discover USRP_UHD command via the command line window, I got the same error:
UHD Error:
Device discovery error: AssertionError: libusb_init(&_context) == 0
in libusb_session_impl::libusb_session_impl()
at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
2016-02-01 16:59:20 WARN USRP_UHD_i:943 - WARNING: NO UHD (USRP) DEVICES FOUND!
Could anybody figure out where this problem is? Thanks in advance!
So, first of all, the good news is that this is happening during autodetection of USB devices, so your N2xx is not inherently affected, but:
UHD 3.5.3 is not only old, it's ancient. You should really uninstall it (If you've got Debian or a derived one [Ubuntu], it'd be sudo apt-get remove uhd-host libuhd003 libuhd-dev), install a new version directly from Ettus (can help you with that, if necessary) and rebuild Redhawk against that version.
Really, really do that. There's been so much improvement in behaviour like failure handling that fixing this without updating isn't really worth it.
Now, if you explicitly specify a device address that allows you to cancel USB-based USRP detection completely, you should be fine. As device address, use type=usrp2 for USRP2, N200 and N210.
I ran into this issue trying to install UHD v3.9.3 in a CentOS 7 Docker container - the error message points to a usb issue, not related to Redhawk. The Redhawk Device, USRP_UHD, is just an abstraction layer on top of the Ettus UHD drivers, so the easiest way to tell whether the problem is Redhawk or something else is to try one of the UHD commands directly from a terminal to generate the same error, like uhd_usrp_probe.
To check if the problem is directly related to the usb drivers try the command lsusb. This should list all usb devices connected to your OS. These are good debug tips to isolate where the problem is.
If you happen to be doing this using Linux containers or Docker you have to give the proper privileges, see docker-any-way-to-give-access-to-host-usb-or-serial-device. Otherwise, assuming you built UHD from source, check the output of make test step - if all the tests passed there shouldn't be anything wrong with the UHD library.
Edit: Also if you're running this inside a VM you have to make sure your host has given network/USB/etc privileges to the hypervisor (ex. VirtualBox) during installation, or that you've attached the correct virtual hardware in the VM configuration.

Download program into AVR chip with FTDI4232

Background info
WinAVR:
I installed WinAVR, and use avrdude.exe comes with WinAVR to download program into our board.
Adapter card:
We have an adapter card with FTDI4232 and AVR m328p on it. PC connects to FTDI4232 with a micro USB cable.
Schematic:
Sorry, I cannot post pics. So just describe the major part of schematic here. Two wires from(DATA_P & DATA_N pins) out from macro USB connector to DP[pin8] and DM[pin7] on 4232. And four wires(SCK, MOSI, MISO, SS_N) out from 4232 to m328p.
How to download program into the card before: Via pocket programmer. But we cannot give one pocket programmer to every engineer, so try to find out a way to download the program into m328p. Coz we have already had FTDI4232 on board, so this seems to be the best choice.
Can I download program via FTDI4232 on adapter card?
I know there is dedicated programmer based on 4232 chip, but this is our own design, I am not sure we can do it or not according to the above schematic.
what I did
Run this command:
C:\WinAVR-20100110\bin\avrdude.exe -c 4232h -p m328p -U flash:w:\Desktop\work\a_card\WinAVR\blink\blink.hex:i
But got the following error:
avrdude.exe: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again.
Then, download the compiled libftdi package from this link:
https://code.google.com/p/picusb/downloads/detail?name=libftdi1-1.0_devkit_mingw32_17Feb2013.zip
, and extract it as “compiled_libftdi”.
There is not too much info about how to use this compiled package, so I just found info online.
(1) I installed WinUSB driver for the first two ports of 4232 by Zadig. I can choose one port in the drop down menu, then choose “WinUSB(v6.1,7600…)”, “Install WCID Driver”.
(2) Then, enter into the “compiled_libftdi” folder, run “find_all”, I saw:
Number of FTDI devices found:1
Checking device: 0
Manufactureer: FTDI, Description: USB <-> Serial Converter
I think it means the USB driver for libftdi package installed successfully.
Run the above download command again, still failed.
I thought maybe because the avrdude.exe is out of date. So download a .exe from here:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1-mingw32.zip
And replace the old one in the WinAVR folder.
Still got the error, but got one extra line info:
avrdude.exe: programmer operation not supported

AVR Studio 5 can't connect to any programmer

I am trying to use AVR Studio 5 to program an Atxmega64a1 with basic hello world code. I am using 64 bit win7. I have the chip plugged in to an STK600 to try and program it. When I go to tools>AVR Programming and select the tool, I see two options: Simulator and STK600 (with a long serial number after it). I set the tool to STK600 and select the proper Device, switch the interface to JTAG, and hit "Apply"
AVR Studio freezes for a moment and says:
"Unable to connect to tool STK600 (6&33ECC3F5&0&4)", with the following details:
Timestamp: 2012-01-19 20:04:38.771
Severity: ERROR
ComponentId: 20000
StatusCode: 0
Unable to connect to tool context: 'Atmel.VsIde.AvrStudio.Services.TargetService.TCF.Internal.Services.Remote.ToolProxy+ToolContext'.
I hit close and after another few seconds get a second error:
"Failed to get JTAG daisy chain settings." with the following details:
Timestamp: 2012-01-19 20:07:59.057
Severity: ERROR
ComponentId: 20000
StatusCode: 0
Unable to connect to tool context: 'Atmel.VsIde.AvrStudio.Services.TargetService.TCF.Internal.Services.Remote.ToolProxy+ToolContext'.
It's not this board because it works on a friend's computer, and I get the same error when using a JTAGICE MKII and even with a Dragon. Any idea what it might be? I have tried uninstall and re-installing absolutely everything.
After much trial and error, it seems that USB 3.0 is incompatible with avr programmers. I switched USB ports to a 2.0 port and now it works beautifully!

Resources