1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Solved Viki 2 LCD and Marlin 1.1.0 won't compile

Discussion in 'Troubleshooting' started by cjryker06, Sep 23, 2016.

  1. cjryker06

    cjryker06 New Member

    Joined:
    Mar 22, 2016
    Messages:
    22
    Likes Received:
    0
    I just got my Viki 2, wires and Titan today so I was looking forward to making a case and setting it all up, but I seem to be stuck on the last portion of the firmware changes. I have followed the setup guide for adding the libraries and changing the firmware. I don't know much about writing the code, but it is the last part before I can use my LCD so any help would be appreciated. I have included the portion of code at the bottom. Once I hit verify I get this:


    sketch\Marlin_main.cpp: In function 'void handle_status_leds()':

    Marlin_main.cpp:8421: error: 'STAT_LED_RED' was not declared in this scope

    digitalWrite(STAT_LED_RED, new_led ? HIGH : LOW);

    ^
    Marlin_main.cpp:8422: error: 'STAT_LED_BLUE' was not declared in this scope

    digitalWrite(STAT_LED_BLUE, new_led ? LOW : HIGH);

    ^
    exit status 1
    'STAT_LED_RED' was not declared in this scope
    ____________________________________________________________________________________
    Below is for reference for the section it describes as not declared.


    void handle_status_leds(void) {
    float max_temp = 0.0;
    if (ELAPSED(millis(), next_status_led_update_ms)) {
    next_status_led_update_ms += 500; // Update every 0.5s
    HOTEND_LOOP() {
    max_temp = max(max(max_temp, thermalManager.degHotend(e)), thermalManager.degTargetHotend(e));
    }
    #if HAS_TEMP_BED
    max_temp = max(max(max_temp, thermalManager.degTargetBed()), thermalManager.degBed());
    #endif
    bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
    if (new_led != red_led) {
    red_led = new_led;
    digitalWrite(STAT_LED_RED, new_led ? HIGH : LOW);
    digitalWrite(STAT_LED_BLUE, new_led ? LOW : HIGH);

    }
    }
    }

    #endif
     
  2. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    I'm not at my pc or else I would do this myself. Do a search across ALL tabs for STAT_LED_RED and see if it isn't commented out somewhere else. I've never heard of a VIKI LCD. When this gets fixed I'd like to see a picture of it.
     
  3. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    This should really be posted on the Marlin GITHUB. I am 100% certain that they will tell you to try it with 1.1.0 RCBugFix before creating any issue with the Viki board.

    @danzca6 The Viki 2 is basically a souped up version of the Full Graphics LCD
    [​IMG]
     
    #3 WheresWaldo, Sep 24, 2016
    Last edited: Sep 24, 2016
    Geof likes this.
  4. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    Oh yeah I have seen that on ultibots.com I think. very nice!
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    It has come up before on here (do a google site search and it will turn up) but that was several minor Marlin versions ago.
    I have not heard of anyone using it in recent builds. It is not easy to configure like many of the others, but you can . get it to work.
     
  6. cjryker06

    cjryker06 New Member

    Joined:
    Mar 22, 2016
    Messages:
    22
    Likes Received:
    0
    Thanks for the information, I apologize if this was the wrong forum to approach. I am using an R1+ so I was under the assumption that this would be the most direct solution being that I can ensure the same board setup and such. I double checked the setup guide and searched Google before coming here and found no answer.
     
  7. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    This forum helps if it is a Robo specific issue. :)

    This isn't really. It is more about that LCD with Marlin (the firmware Robo uses).

    Here is one earlier thread:
    http://community.robo3d.com/index.php?threads/viki-lcd-2-0.5997/

    This guy got it done (I think):
    http://community.robo3d.com/index.php?threads/almost-done-installing-my-viki-lcd.1263/

    and this one:
    http://community.robo3d.com/index.php?threads/viki-setup-with-latest-marlin-firmware.827/

    That last one has some instructions that might help
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Even that last post is with an older version of Marlin so things on the Marlin code might have changed (again).
    Good luck
     
  9. cjryker06

    cjryker06 New Member

    Joined:
    Mar 22, 2016
    Messages:
    22
    Likes Received:
    0
    Thanks so much! I have finally gotten onto Github and set a post there about it and I'm sure one of those three links will help me on my way.
     

Share This Page