pimoroni / unicorn-hat

Python library for Unicorn pHAT and HAT. 32 or 64 blinding ws2812 pixels for your Raspberry Pi
https://shop.pimoroni.com/products/unicorn-hat
MIT License
370 stars 131 forks source link

Create Toggle.py #87

Closed Pyroseza closed 7 years ago

Pyroseza commented 8 years ago

This is the first commit to Toggle.py

Gadgetoid commented 7 years ago

Any reason why it's pHAT only? You should be able to get the width/height of the detected device and set either 4x8 or 8x8 pixels.

width, height = unicorn.get_shape()
Pyroseza commented 7 years ago

Hi,

I don't have an 8x8 Hat to test it on, so I thought it would be safer to just release for 4x8 pHat and someone else could test and confirm for me.

I'll make the change you've suggested and test on the 4x8 phat

Thank you!

Kind Regards, Jarrod Price

On Tue, Oct 11, 2016 at 3:34 PM, Philip Howard notifications@github.com wrote:

Any reason why it's pHAT only? You should be able to get the width/height of the detected device and set either 4x8 or 8x8 pixels.

width, height = unicorn.get_shape()

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pimoroni/unicorn-hat/pull/87#issuecomment-252935090, or mute the thread https://github.com/notifications/unsubscribe-auth/AIElCrPDR52NI_PtZrUGfO7_4kexdXqrks5qy555gaJpZM4J-YNn .

Gadgetoid commented 7 years ago

Thank you! Oh, one more thing- can you rename to toggle.py

We're ever the pedants :D

Pyroseza commented 7 years ago

Sure thing, what would you like me to call it?

On_off_with_input.py ?

Kind Regards, Jarrod Price


Sent from my iPhone

On 11 Oct 2016, at 17:24, Philip Howard notifications@github.com wrote:

Thank you! Oh, one more thing- can you rename to toggle.py

We're ever the pedants :D

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

RogueM commented 7 years ago

I think @Gadgetoid just meant to use the uncapitalised toggle.py

Pyroseza commented 7 years ago

Oh whoops I misread, sure will do that

Kind Regards, Jarrod Price


Sent from my iPhone

On 12 Oct 2016, at 14:40, RM notifications@github.com wrote:

I think @Gadgetoid just meant to use the uncapitalised toggle.py

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Pyroseza commented 7 years ago

Closing this request, moving file to parent directory and will create a new pull request