Announcement

Collapse
No announcement yet.

Problem uploading to board

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem uploading to board

    Hello!

    I am a beginner trying to use an Arduino Uno Wifi connected to a uLCD-70DT to display information about a mixing machine that I have. My code is still a work in progress, but I just wanted to be able to test it or at least make it show up on the screen. My code compiles but does not show up on the screen and I'm not sure why. I've looked through Arduino's troubleshooting page and nothing worked.
    Here is the error:

    Arduino: 1.8.9 (Windows 10), Board: "Arduino Uno WiFi"

    Sketch uses 4906 bytes (15%) of program storage space. Maximum is 32256 bytes.
    Global variables use 378 bytes (18%) of dynamic memory, leaving 1670 bytes for local variables. Maximum is 2048 bytes.
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM7 -b115200 -D -Uflash:w:C:\Users\nicole.reber\AppData\Local\Temp\arduino_build_971813/Touchscreen.ino.hex:i

    avrdude: Version 6.3-20171130
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2014 Joerg Wunsch

    System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

    Using Port : COM7
    Using Programmer : arduino
    Overriding Baud Rate : 115200
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x35
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x35

    avrdude done. Thank you.

    Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
    Invalid library found in C:\Users\nicole\OneDrive - whc\Documents\Arduino\libraries\Serial: no headers files (.h) found in C:\Users\nicole\OneDrive - whc\Documents\Arduino\libraries\Serial
    Invalid library found in C:\Users\nicole\OneDrive - whc\Documents\Arduino\libraries\Serial: no headers files (.h) found in C:\Users\nicole\OneDrive - whc\Documents\Arduino\libraries\Serial

    This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
    Here's my code and a picture of my setup:

    Code:
    #include <genieArduino.h>
    //#include <stdio.h>
    //#include <stdint.h>
    //#include <ctype.h>
    
    #ifndef TRUE
    #define TRUE (1==1)
    #define FALSE (!TRUE)
    #endif
    
    Genie genie;
    #define RESETLINE 7
    const int upswitch = 3;
    const int opswitch1 = 5;
    const int opswitch2 = 4;
    const int lowswitch = 2;
    const int speakerPin = 1;
    
    int buzz;
    int totalmixes;
    int timesincelastmix = millis();
    
    void setup() {
      Serial.begin(200000);
      genie.Begin(Serial);
    
      genie.AttachEventHandler(myGenieEventHandler);
    
      pinMode(RESETLINE, OUTPUT);
      digitalWrite(RESETLINE, 1);
      delay(100);
      digitalWrite(RESETLINE, 0);
      delay(3500);
    
      genie.WriteObject (GENIE_OBJ_FORM, 0, 0);
      pinMode(upswitch, INPUT);
      pinMode(opswitch1, INPUT);
      pinMode(opswitch2, INPUT);
      pinMode(lowswitch, INPUT);
      pinMode(speakerPin, OUTPUT);
    
      genie.WriteContrast(1);
      genie.WriteStr(0, GENIE_VERSION);
    
    }
    
    void loop() {
    
     genie.DoEvents();
      totalmixes++;
      //genie.Print(totalmixes);
      //genie.Print? Figure out how to put changing text on screen
      checkSwitches();
      checkMixes();
      delay(50);
    }
    
    void myGenieEventHandler(void)
    {
      genieFrame Event;
      genie.DequeueEvent(&Event);
    
      if(Event.reportObject.cmd == GENIE_REPORT_EVENT)
      {
        if(Event.reportObject.object == GENIE_OBJ_WINBUTTON)
        {
          if(Event.reportObject.index == 0)
          {
            bool winbutton = genie.GetEventData(&Event);
            winbutton = !winbutton;
            genie.WriteObject(GENIE_OBJ_FORM, 0, 1);
          }
          else if(Event.reportObject.index == 1)
          {
            bool winbutton = genie.GetEventData(&Event);
            winbutton = !winbutton;
            genie.WriteObject(GENIE_OBJ_FORM, 1, 1);   //or should this be genie.WriteObject(GENIE_OBJ_FORM, 1, winbutton)?
          }
          else if(Event.reportObject.index == 2)
          {
            bool winbutton = genie.GetEventData(&Event);
            winbutton = !winbutton;
            genie.WriteObject(GENIE_OBJ_FORM, 2, 1);
          }
          else if(Event.reportObject.index == 3)
          {
            bool winbutton = genie.GetEventData(&Event);
            winbutton = !winbutton;
            genie.WriteObject(GENIE_OBJ_FORM, 3, 1);
          }
        }
      }
    
    }
    
    void checkSwitches()
    {
      while(digitalRead(upswitch) == 1)
      {
        tone(speakerPin, 300);
        genie.WriteObject(GENIE_OBJ_USER_LED, 0x00, 1);
      }
      while(digitalRead(lowswitch) == 0)
      {
        tone(speakerPin, 300);
        genie.WriteObject(GENIE_OBJ_USER_LED, 0x03, 1);
      }
      //method for sending notifications?
    }
    
    void checkMixes()
    {}


    Click image for larger version  Name:	Arduino and Display setup.jpg Views:	0 Size:	2.52 MB ID:	69248

    Any advice is appreciated!
    Attached Files
    Last edited by notnichole; 1 week ago.

  • #2
    Hi,

    It may be that communication between the Arduino IDE and the UNO is affected by the display being connected to the serial port of the UNO.

    As the UNO has only one hardware serial port, it may be better if you used software serial for communication to the display. The serial port on the UNO is connected to a serial to USB converter and will affect the running genie communication.

    When using software serial, you will be able to program the UNO with the display connected on different pins.

    I hope this helps.

    Best regards

    Paul

    Comment


    • #3
      Hi Paul, thanks for your response!

      I've altered my code so it looks like this:

      Code:
      #include <genieArduino.h>
      #include <SoftwareSerial.h>
      //#include <stdio.h>
      //#include <stdint.h>
      //#include <ctype.h>
      
      #ifndef TRUE
      #define TRUE (1==1)
      #define FALSE (!TRUE)
      #endif
      
      Genie genie;
      #define RESETLINE 7
      const int upswitch = 3;
      const int opswitch1 = 5;
      const int opswitch2 = 4;
      const int lowswitch = 2;
      const int speakerPin = 1;
      
      int buzz;
      int totalmixes;
      int timesincelastmix = millis();
      
      SoftwareSerial mySerial(10, 11); //RX, TX
      
      void setup() {
        Serial.begin(200000);
        while (!Serial) {
          ;
        }
        mySerial.begin(200000);
      
        genie.Begin(Serial);
      
        genie.AttachEventHandler(myGenieEventHandler);
      
        pinMode(RESETLINE, OUTPUT);
        digitalWrite(RESETLINE, 1);
        delay(100);
        digitalWrite(RESETLINE, 0);
        delay(3500);
      
        genie.WriteObject (GENIE_OBJ_FORM, 0, 0);
        pinMode(upswitch, INPUT);
        pinMode(opswitch1, INPUT);
        pinMode(opswitch2, INPUT);
        pinMode(lowswitch, INPUT);
        pinMode(speakerPin, OUTPUT);
      
        genie.WriteContrast(1);
        genie.WriteStr(0, GENIE_VERSION);
      
      }
      
      void loop() {
      
       genie.DoEvents();
        totalmixes++;
        //genie.Print(totalmixes);
        //genie.Print? Figure out how to put changing text on screen
        checkSwitches();
        checkMixes();
        delay(50);
      
        if (mySerial.available()) {
          Serial.write(mySerial.read());
        }
        if (Serial.available()) {
          mySerial.write(Serial.read());
        }
      }
      I'm not sure if that's right (I was looking off of Arduino's website), but it still didn't upload and has the same error message. I also moved the red wire to pin 10 and the white one to pin 11.

      Comment


      • #4
        Hi

        How odd. I would have thought that the reason for the failure to upload to the UNO would have been that the display was connected to the UNO's hardware serial port.

        The other reason could be power as the display and the UNO could be exceeding the current being supplied by your USB port on your PC, especially as there is a WiFi module on the UNO. Even with the power adapter you have plugged into the power input, the regulated current from the UNO's regulator is still quite low and sometimes too low to power both

        Could you possibly try powering the display from another 5v source but make sure that there is a GND connection between the Arduino and the display or disconnect power from the UNO to the display and then try to program the UNO.

        You also need to change this line in your code

        genie.Begin(Serial);

        to

        genie.Begin(mySerial);

        But this wouldn't cause any problems with uploading your code.

        Comment


        • #5
          I connected power directly to the display from my laptop and had a GND connection to my Arduino, still got the same error. Maybe it's worth mentioning but even with nothing connected to the Arduino (except for where it's connected to my PC) it won't upload.
          Last edited by notnichole; 1 week ago.

          Comment


          • #6
            Hi,

            Ok, thanks for the update. At the moment we seem to have a problem that the UNO via the Arduino IDE can't be programmed for some reason. If you have tried just the UNO connected via USB to the PC then it is safe to say that the problem lies with the comms to UNO.

            I found this about problems with uploading to UNO Wifi, if you have a rev 2 you will need to follow these instructions

            https://forum.arduino.cc/index.php?topic=600558.0

            Best regards

            Paul

            Comment

            Working...
            X