Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add very very basic support for launchpad1 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timglabisch
Copy link

i have a launchpad1 and wanted to create a simple program for my 1 year old daughter. Just a few buttons that are clickable.
using trial and error i managed to do basic stuff like clear, button_set, ....

the code is not mergeable and contains a lot of stuff from the mk2 (didn't try the canvas api, the color palette is wrong and so on ....) but may it's interesting for someone who also want to add support for launchpad1.

i also doesn't found any good docs about the launchpad1 - if someone knows where to find them, pls let me know. :)

example code that works:

let input = launchy::launchpad_orig::Input::guess_polling()?;
let mut output = launchy::launchpad_orig::Output::guess()?;

output.clear()?;
for msg in input.iter() {
    match msg {
        Message::Press {button} => {
            output.set_button(button, PaletteColor::new(3), LightMode::Flash)?;
        },
        Message::Release {button} => {
            output.set_button(button, PaletteColor::new(48), LightMode::Flash)?;
        },
        _ => {}
    }
    println!("data {:?}", msg);
}

@kangalio
Copy link
Owner

kangalio commented Oct 7, 2021

Thanks for the PR! I will not merge the PR, but probably keep it open for others to see...

By the way, a better base to build upon would probably be the Launchpad S (instead of MK2). The S is both chronologically and API-wise very near to the original Launchpad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants