Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

CircleCI

androidthings-MAX72XX-driver

Android Things driver for the MAX7219 and MAX7221 Led drivers

This is a Kotlin port of the LedControlAndroid Things library which is also a port of the original Arduino version.

Download

dependencies {
    compile 'rocks.androidthings:max72xx-driver:0.2'
}

Usage

Initialising

try {
    ledControl = MAX72XX("SPI0.0", NB_DEVICES)
    for (i in 0..ledControl.getDeviceCount() - 1) {
        ledControl.setIntensity(i, 15)
        ledControl.shutdown(i, false)
        ledControl.clearDisplay(i)
    }

} catch (e: IOException) {
    Log.e(TAG, "Error initializing LED matrix", e)
}

Turn on one pixel

// set row 0, column 1
ledControl.setLed(0, 0, 1, true)
// set row 0, column 2
ledControl.setLed(0, 0, 2, true)

Sample Schematics (with dot matrix)

max72xx

About

Android Things driver for the MAX7219 and MAX7221 Led drivers (includes demo app)

Resources

License

Packages

No packages published

Languages