Home Forums MOCHAbin Forum Hardware discussions Tricolor LEDs – how to?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50395
    doron
    Participant

    Hi all,

    A-la documentation, our Mochabin has three three-color LEDs, all at the front to the right of the power LED. They are said to be I2C controlled.
    How do I operate it? I very much like to make use of these LEDs (my previous box – Espressobin of course – had a plethora of GPIO pins, and I connected my own LEDs and operated them happily; Mochabin does not seem to expose GPIO pins, so I’d be really happy to be able to control the installed LEDs.
    I tried some i2c stuff against it but with no success.
    Thanks for any insight!

    #50398
    doron
    Participant

    Anyone? Please?

    #50407
    doron
    Participant

    Pretty please?…

    #50437
    technosf
    Participant

    The LEDs are hooked up using i2c to a driver chip – a is31fl319x which has a corresponding userspace driver leds_is31fl319x
    The is31fl319x is located on i2c bus 1 at 0x64, and on ArchLinux, the driver module leds_is31fl319x loads at boot. If you run i2cdetect -y 1 you see that 0x64 has the value UU, indicating that the driver is controlling that address. lsmod confirms this.

    If you want to control the LEDs you can write code to talk to the driver.

    Alternately you can remove the driver (rmmod leds_is31fl319x), which will allow access to 0x64, and you can use i2c (i2ctransfer) to send instructions to the is31fl319x directly.

    For example:

    i2ctransfer -y 1 w76@0x64 0x00 0x01 0x01 0x77 0x21 0x07 0x03 0x00 0x04 0x00 0x07 0xff 0x08 0xff 0x09 0xff 0x0a 0xff 0x0b 0xff 0x0c 0xff 0x0d 0xff 0x0e 0xff 0x0f 0xff 0x10 0x00 0x11 0x00 0x12 0x01 0x13 0x02 0x14 0x05 0x15 0x04 0x16 0x03 0x17 0x06 0x18 0x07 0x19 0x09 0x1a 0xa0 0x1b 0xa0 0x1c 0xa0 0x1d 0x07 0x1e 0x07 0x1f 0x07 0x20 0x07 0x21 0x07 0x22 0x07 0x23 0x07 0x24 0x07 0x25 0x07 0x26 0x00 0x03 0x70

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Signup to our newsletter

Technical specification tables can not be displayed on mobile. Please view on desktop