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

RGB LED Wiring Diagram and Code

Discussion in 'Mods and Upgrades' started by Marquis Johnson, Sep 21, 2015.

  1. TomerO

    TomerO Member

    Joined:
    May 2, 2016
    Messages:
    96
    Likes Received:
    45
    Yeah, but I don't have real need for it except making it flash at startup here.
    I will either hack something in the code or I will just do without it
     
    mark tomlinson likes this.
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    :)
    A rare case of ... "I don't really need to hack that"
     
    Geof likes this.
  3. Marquis Johnson

    Marquis Johnson Active Member

    Joined:
    Feb 18, 2015
    Messages:
    204
    Likes Received:
    203
    Oh yea, that's more debugging code. It's to make sure that the lights are in the correct orientation for fades and color assignments, you can either delete or uncomment the for loop that starts up the lights.

    And thanks for the links to the firmware
     
  4. andrew

    andrew New Member

    Joined:
    Feb 6, 2014
    Messages:
    6
    Likes Received:
    0
    Hello, I was putting together this RBG LED I saw on your video and for some reason I'm not get enjoy volts for not signal to my transistor. I measured about 2-3 volts from each pin. I plug it into some pins that were reading abour 4+ volts and I was able to get the white but i'm not geting it from pins 4 5 6 or the color changing.
     
  5. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,814
    Likes Received:
    3,538
    @Marquis Johnson hasn't been around since early December 2016 so I am not sure he will respond (School and all I reckon). Did you edit the firmware, recompile & upload it to your Robo?

    I am no expert on his particular mod, my RGB LEDs are all still sitting in a drawer while other projects take precedent.
     
  6. crombiecrunch

    crombiecrunch New Member

    Joined:
    Oct 30, 2016
    Messages:
    13
    Likes Received:
    2
  7. Dave1975

    Dave1975 New Member

    Joined:
    Oct 5, 2017
    Messages:
    4
    Likes Received:
    0
    Wondering the same thing as crombiecrunch, has anyone gotten this or the marlin lights to work on newer versions of Marlin?
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    Shouldn't matter much to the newer versions, the changes he made would still need to be done.
    I haven't tried, but a cursory glance at what he changed didn't look like it would matter much
     
  9. Dave1975

    Dave1975 New Member

    Joined:
    Oct 5, 2017
    Messages:
    4
    Likes Received:
    0
    I'm trying to get it going in Marlin 1.1.4 and get error "degHotend was not declared in this scope".
    When trying to use just the Marlin lights, by declaring the pins 4-6 as RGB in pins_Ramps.h,
    #define LARGE_FLASH true

    //
    // Servos
    //
    #ifdef IS_RAMPS_13
    #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
    #else
    #define SERVO0_PIN 11
    #endif

    //
    //LED
    //
    #define STAT_LED_RED_PIN 4

    #define STAT_LED_GREEN_PIN 5

    #define STAT_LED_BLUE_PIN 6

    //
    //
    // Limit Switches
    I can manually control pin 4 and 6 with power levels (0-255) but pin 5 only works as 0 or 255.
     
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    Upload your edited file. That error means something else got changed (perhaps accidentally).
    Just upload the ones you edited.
     
  11. Dave1975

    Dave1975 New Member

    Joined:
    Oct 5, 2017
    Messages:
    4
    Likes Received:
    0
    For the LEDs as set up in the instuctable these are the files minus the Marlin_main.ccp, I tried uploading it but it said it wasn't allowed. For that file however I just copied over the text file in the instructions. The Config file was previously edited by another on a FB group to help dial in the printer quicker... kind of a 1 size fits all, but I didn't see anything obvious changed except for some of the values, and to that, I changed some for my specific build.
     

    Attached Files:

  12. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,814
    Likes Received:
    3,538
    Don't know where that Configuration.h came from but there are too many things wrong with it to work properly on a R1 or R1+
     
  13. Dave1975

    Dave1975 New Member

    Joined:
    Oct 5, 2017
    Messages:
    4
    Likes Received:
    0
    But is there anything that you see preventing the LED's from working, and causing it to throw that error in the IDE?
     
  14. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,814
    Likes Received:
    3,538
    Nope, because that variable is not defined in pins files. But since it doesn't belong to the R1 and the origin of those files are questionable, it really is not a good use of time trying to make it work.
     
    mark tomlinson likes this.
  15. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    Better off taking a CONFIGURATION.H from a version that is for the R1 or R1+ and then applying your customization.
     
  16. XxGingerSharkxX

    Joined:
    Jun 9, 2019
    Messages:
    73
    Likes Received:
    13
    is there a version of this code for Marilin MESH plus 12-01? I would like to use marlin if I can have this RGB mod work with it and also so I can use my filament runout sensor too. I have tried going through the steps by uncommenting the
    #define TEMP STAT LEDS in the configurations.h
    Adding/replacing the code in Marlin_main
    And I tried adding in the code for pins.h but I get an error when I try to verify it.
     
    #36 XxGingerSharkxX, Aug 19, 2019
    Last edited: Aug 20, 2019
  17. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    I doubt you will have much luck getting a response.

    Marquis Johnson was last seen:
    Nov 26, 2018
     
  18. XxGingerSharkxX

    Joined:
    Jun 9, 2019
    Messages:
    73
    Likes Received:
    13
    Crud


    Sent from my iPhone using Tapatalk
     
  19. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,321
    Likes Received:
    7,032
    Get the version of Marlin you want this done to and we can probably help you do the code change part. It is not hard.
    Looks like the changes are not huge.

    Not sure it this will work on an R1+ RAMPS (but it would certainly work on a standard one).
     
  20. XxGingerSharkxX

    Joined:
    Jun 9, 2019
    Messages:
    73
    Likes Received:
    13
    My original ramp fried. But I got a new one. It’s working


    Sent from my iPhone using Tapatalk
     

Share This Page