[Microbit-Python] some questions (and where should I ask them normally?)

Damien George damien.p.george at gmail.com
Wed Sep 23 00:07:04 CEST 2015


You can do the following:

img = microbit.Image('255,1,1,0,0\n,1,1,0,0,0\n')
microbit.display.print(img)

On Tue, Sep 22, 2015 at 11:03 PM, Mariia Koroliuk
<maria.korolyuk at gmail.com> wrote:
> Thanks! already noticed second answer too :P
>
> Thanks you so much! and sorry for lots of letters!
>
>
> On 22 September 2015 at 23:00, Mariia Koroliuk <maria.korolyuk at gmail.com>
> wrote:
>>
>> Thanks :)
>>
>> I mean if I need a different brightness for different pixels? is it
>> possible?
>>
>> On 22 September 2015 at 22:50, Damien George <damien.p.george at gmail.com>
>> wrote:
>>>
>>> Yes, this is the right channel for questions and discussion.
>>>
>>> Larry is correct: you construct an image using
>>>
>>> img = microbit.Image('0,1,0,0,0\n...')
>>>
>>> then use it:
>>>
>>> microbit.display.print(img)
>>>
>>> To use the greyscale feature you need to first do:
>>>
>>> microbit.display.set_display_mode(1)
>>>
>>> (Yes that's obscure, it needs a nicer way to do it!)
>>>
>>>
>>> On Tue, Sep 22, 2015 at 10:33 PM, Matthew Else
>>> <matthewelse1997 at gmail.com> wrote:
>>> > You need to do image.set_pixel_value(x, y, (value from 0 to 255))
>>> >
>>> > On Tue, Sep 22, 2015 at 10:31 PM Matthew Else
>>> > <matthewelse1997 at gmail.com>
>>> > wrote:
>>> >>
>>> >> There is a way of doing set_brightness (greyscale), however I'm not
>>> >> entirely clear about how you would do it :p
>>> >>
>>> >> On Tue, Sep 22, 2015 at 10:29 PM Larry Hastings <larry at hastings.org>
>>> >> wrote:
>>> >>>
>>> >>>
>>> >>>
>>> >>> On 09/22/2015 10:17 PM, Mariia Koroliuk wrote:
>>> >>>
>>> >>> Hello,
>>> >>>
>>> >>> I hope this is a right way to ask :) Please tell me how to do it
>>> >>> properly! Is there come conversation somewhere with general queries?
>>> >>>
>>> >>> 1) How does the creating new Image work? For example, I want to
>>> >>> define
>>> >>>
>>> >>> CHESS='1,0,1,0,1 \n 0,1,0,1,0 \n 1,0,1,0,1 \n 0,1,0,1,0 \n 1,0,1,0,1
>>> >>> '
>>> >>> (I think this is the form was discussed?)
>>> >>>
>>> >>>
>>> >>> I believe that's the initializer for the constructor.  You need to
>>> >>> make
>>> >>> an Image object.
>>> >>> chess = microbit.Image(CHESS)
>>> >>> microbit.display.print(chess)
>>> >>>
>>> >>> Image might be inside microbit.display, I'm not sure.
>>> >>>
>>> >>>
>>> >>>
>>> >>> 2) How do I control the brightness of one pixel? Something like
>>> >>>
>>> >>> microbit.display.set_brightness (3,3,200)?
>>> >>>
>>> >>>
>>> >>> The LEDs are either on or off.  No brightness control.
>>> >>>
>>> >>>
>>> >>> /arry
>>> >>> _______________________________________________
>>> >>> Microbit mailing list
>>> >>> Microbit at python.org
>>> >>> https://mail.python.org/mailman/listinfo/microbit
>>> >
>>> >
>>> > _______________________________________________
>>> > Microbit mailing list
>>> > Microbit at python.org
>>> > https://mail.python.org/mailman/listinfo/microbit
>>> >
>>> _______________________________________________
>>> Microbit mailing list
>>> Microbit at python.org
>>> https://mail.python.org/mailman/listinfo/microbit
>>
>>
>
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>


More information about the Microbit mailing list