Granjow / launchpad-mini

Node.js library for the Novation Launchpad Mini
145 stars 25 forks source link

Add binary example #4

Closed Quezler closed 6 years ago

Quezler commented 6 years ago

I just got my launchpad mini in the mail today, and thus started to play around a little.

This example converts your binary input (bottom row) to a number in the 0-255 range.

red = binary 0 green = binary 1

Right side shows the 1x digit. Left side shows the 10x digit. Top bar shows the 100x digit.

Once again thank you for making this library, and i hope my example will inspire others :)

Granjow commented 6 years ago

Nice, thanks for the pull request! I will test it asap. In the meantime, could you add a link to the examples at the end of the Examples section in the README? So people also find it.

Quezler commented 6 years ago

I think it would be wise to write a short explanation to what each example does, most are quite straight forward but in test.js there is so much going on i don't even know what it does 😟

Granjow commented 6 years ago

Indeed, a short explanation would be perfect. Please ignore test.js, it is a messy playground and not intended to be read by anyone, it could could be harmful for the mind ;)

Granjow commented 6 years ago

Okay, I just tested it. I must say, it is very cool and intuitive to read the numbers.

I have added two comments in the file. Please fix at least the import, then I will merge it. If you want, also add a short description in the Readme, otherwise I will do it.

Thank you!

Quezler commented 6 years ago
Granjow commented 6 years ago

Ah sorry. Here it is. The comments were pending.

Quezler commented 6 years ago

I'll add an example section to the readme, then we can merge :)

Quezler commented 6 years ago

@Granjow examples have been added to the readme 👍

Granjow commented 6 years ago

Please also require('../launchpad-mini')!

Quezler commented 6 years ago

Done :)

(my bad, i thought the green in the comment here meant that you edited something)

Granjow commented 6 years ago

Add -mini and then it should work :D

Quezler commented 6 years ago

You threw me off guard 🙈

screen shot 2017-11-18 at 19 15 28

Granjow commented 6 years ago

Sorry :D Thanks for the contribution!

Quezler commented 6 years ago

No problem, it likely wont be the last :D

Some of my projects i am slowly making progress on:

(like with the binary example the pad gets reset on every change and you can noticably see buttons that should remain on blink for a fraction of a second)

(also keeps track of button states, so you can see which buttons you told which color to be, since the pad itself is write only afaik)