Error uploading code to Arduino Nano



  • Please refer to my code and error log and tell the error!!
    I have a new version of Arduino Nano and I'm trying to upload code to it. But it's showing the following error. Can u help me rectify it!!

    Code:

    String str = "";
    void setup() {
      Serial.begin(9600); // Starts the serial communication
    }
    
    void loop() {
      if(Serial.available() > 0){
        str = Serial.readString();
        Serial.println(str);
        }
    }
    

    Error Log:

    Build options changed, rebuilding all
    Sketch uses 3276 bytes (10%) of program storage space. Maximum is 30720 bytes.
    Global variables use 204 bytes (9%) of dynamic memory, leaving 1844 bytes for local variables. Maximum is 2048 bytes.
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_cmd(): programmer is out of sync
    avr_read(): error reading address 0x0000
        read operation not supported for memory "flash"
    avrdude: failed to read all of flash memory, rc=-2
    avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00
    avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00
    

    Image of Error:
    e93e34ab-e0dc-4992-b6d1-c463fdb65c0f-image.png



  • Hi @Anudeep ,

    There is no compilation error, only problem while uploading to Arduino nano and this error might due to several reasons like a bad USB cable. etc we need to dig more.

    to get more details about this error, can you please enable the verbose. file -> preference -> show verbose output during upload

    and also keep in mind Arduino IDE automatically set NANO board with a fresh bootloader. but boards sold from January 2018 have this new bootloader, while boards manufactured before that date have the old bootloader. so we need to set them manually before uploading

    select the option from Tools -> Processor -> ATmega328p(old bootloader) to flash the old bootloader

    Untitled.png



  • @salmanfaris Yeah, I have checked the cable because I was able to upload to another Arduino Nano. But, I was not able to upload this new Arduino Nano.
    I have tried with both bootloader's new and Old... It's not working with both!!
    So, any help regarding this?



  • @salmanfaris said in Error uploading code to Arduino Nano:

    There is no compilation error, only problem while uploading to Arduino nano and this error might due to several reasons like a bad USB cable. etc we need to dig more.
    to get more details about this error, can you please enable the verbose. file -> preference -> show verbose output during upload

    please share the verbose, to get more details



  • @Anudeep Is that solved? if yes please share how you solved then next time we can save some time ๐Ÿ˜Š


Log in to reply
 

Recent Posts

  • WhatsApp Image 2020-09-26 at 9.28.51 PM.jpeg

    Hey guys, we are thrilled to announce the speaker Mr. Brian Douglas for our upcoming event organised by HackClub TIST as part of Hacktoberfest 2020. He will guide you through GitHub and the importance of Open Source contributions.

    Mr. Brian Douglas has been working as a Staff Developer Advocate at GitHub for the past three years and was fully on-board with us when we contacted him about the event.

    We at Hackclub TIST strongly believe in the power of collaboration and how even the smallest guidance can have a huge impact in the long run.

    So register now at http://hackclubtist.tech/hacktoberfest and lets git learning (pun intended).

    Friday October 2, 2020
    7:00 pm -9:30 pm IST

    read more
  • P

    @Anudeep Thanks a lot m8, I actually made a very silly mistake of including the https:// while entering FIREBASE_HOST, where I must have entered the Domain name alone and removed the https:// extension.

    Thanks again for replying that quick. Cheers.

    read more
  • A

    Hello @Palani, In the Firebase, there are two types of storage,

    Cloud Firestore (Very recent one & NoSQL database) Realtime Database (To which we upload the data using NodeMCU)

    In the Arduino Code, you can see that there is a variable named FIREBASE_AUTH.

    This variable should be assigned to the Database secret. This you can find in Project Settings -> Service accounts -> Database Secrets.

    My mistake is, i have mistakenly assigned thay to Web API key. This is found at Project Settings -> General.

    The error can also occur when u don't initialise a proper realtime database in Firebase. (This is not my case).

    read more
  • P

    @Anudeep Hello Anudeep could you please help me out by elaborating the fix to get rid of that error?
    Thanks in advance.

    read more
  • At Adobe, weโ€™re focused on bringing together the most intelligent, driven, diverse set of individuals and give them the freedom to nurture their intellectual curiosity. We provide them with the necessary resources and support to shape their ideas into tangible results.
    Through the Adobe India Women-in-Technology Scholarship, we are striving towards creating gender equality in science, technology and engineering domains by encouraging women to showcase their excellence in computing and technology and become future leaders and role models in the field.

    ๐—›๐—ผ๐˜„ ๐˜๐—ผ ๐—ฎ๐—ฝ๐—ฝ๐—น๐˜†?

    Applications must be submitted through their dedicated application portal which opens on August 20th, 2020 and will close on September 20th, 2020, 5 pm India time.

    ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฑ๐—ฒ๐—ฎ๐—ฑ๐—น๐—ถ๐—ป๐—ฒ:

    Application deadline: September 20th, 2020, 5 pm India time.

    Visit:- https://research.adobe.com/adobe-india-women-in-technology-scholarship/

    read more