From simon.fitzjohn at btopenworld.com Mon May 2 12:34:15 2016 From: simon.fitzjohn at btopenworld.com (Simon Fitzjohn) Date: Mon, 2 May 2016 17:34:15 +0100 Subject: [Microbit-Python] microbit accelerometer Message-ID: <001001d1a490$77753170$665f9450$@fitzjohn@btopenworld.com> Hi All, Is there any way of changing the sensitivity on the accelerometer. Have checked MMA8652 specs and appreciate that it defaults to +/- 2g but would like to change range to +/- 8g so as to use it with Physics type impact investigations. Even a confirmation that it is not currently possible would be helpful . . . but note that an 8g gesture is part of microbit module! Many thanks, Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Tue May 3 06:57:05 2016 From: damien.p.george at gmail.com (Damien George) Date: Tue, 3 May 2016 11:57:05 +0100 Subject: [Microbit-Python] microbit accelerometer In-Reply-To: <57284a0a.0173c20a.9ff76.5662SMTPIN_ADDED_BROKEN@mx.google.com> References: <57284a0a.0173c20a.9ff76.5662SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Hi Simon, It is possible, just depends how easy it is to do! There is an underlying configuration option to set the range, but MicroPython does not expose that function. We should probably do that, then you could do something like: accelerometer.set_range(8). Alternatively you can use the I2C bus to send values to the accelerometer to change its range. It's actually pretty easy and you can do it right now with this code: i2c.write(0x1d, b'\x2a\x00') # disable device i2c.write(0x1d, b'\x0e\x02') # set range to 8g i2c.write(0x1d, b'\x2a\x21') # enable device, sample rate of 50Hz Note that the numbers coming from get_x() etc will now be 4 times smaller. 240 is around 1g, but you can now get to 2000 which is 8g. Cheers, Damien. On Mon, May 2, 2016 at 5:34 PM, Simon Fitzjohn wrote: > Hi All, > > > > Is there any way of changing the sensitivity on the accelerometer. Have > checked MMA8652 specs and appreciate that it defaults to +/- 2g but would > like to change range to +/- 8g so as to use it with Physics type impact > investigations. > > > > Even a confirmation that it is not currently possible would be helpful . . . > but note that an 8g gesture is part of microbit module! > > > > Many thanks, > > > > Simon > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From carlos.p.a.87 at gmail.com Tue May 3 07:16:01 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Tue, 3 May 2016 12:16:01 +0100 Subject: [Microbit-Python] microbit accelerometer In-Reply-To: References: <57284a0a.0173c20a.9ff76.5662SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: If that's basically exposing the MicroBitAccelerometer::setRange function in Micropython (I'm assuming the updateSample already takes in consideration the selected range) I'd be happy to have a look tonight and submit a PR. On 3 May 2016 at 11:57, Damien George wrote: > Hi Simon, > > It is possible, just depends how easy it is to do! > > There is an underlying configuration option to set the range, but > MicroPython does not expose that function. We should probably do > that, then you could do something like: accelerometer.set_range(8). > > Alternatively you can use the I2C bus to send values to the > accelerometer to change its range. It's actually pretty easy and you > can do it right now with this code: > > i2c.write(0x1d, b'\x2a\x00') # disable device > i2c.write(0x1d, b'\x0e\x02') # set range to 8g > i2c.write(0x1d, b'\x2a\x21') # enable device, sample rate of 50Hz > > Note that the numbers coming from get_x() etc will now be 4 times > smaller. 240 is around 1g, but you can now get to 2000 which is 8g. > > Cheers, > Damien. > > > > On Mon, May 2, 2016 at 5:34 PM, Simon Fitzjohn > wrote: > > Hi All, > > > > > > > > Is there any way of changing the sensitivity on the accelerometer. Have > > checked MMA8652 specs and appreciate that it defaults to +/- 2g but would > > like to change range to +/- 8g so as to use it with Physics type impact > > investigations. > > > > > > > > Even a confirmation that it is not currently possible would be helpful . > . . > > but note that an 8g gesture is part of microbit module! > > > > > > > > Many thanks, > > > > > > > > Simon > > > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Tue May 3 07:27:50 2016 From: damien.p.george at gmail.com (Damien George) Date: Tue, 3 May 2016 12:27:50 +0100 Subject: [Microbit-Python] microbit accelerometer In-Reply-To: References: <57284a0a.0173c20a.9ff76.5662SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Thanks Carlos! Please see https://github.com/bbcmicrobit/micropython/issues/264 On Tue, May 3, 2016 at 12:16 PM, Carlos P.A. wrote: > If that's basically exposing the MicroBitAccelerometer::setRange function in > Micropython (I'm assuming the updateSample already takes in consideration > the selected range) I'd be happy to have a look tonight and submit a PR. > > On 3 May 2016 at 11:57, Damien George wrote: >> >> Hi Simon, >> >> It is possible, just depends how easy it is to do! >> >> There is an underlying configuration option to set the range, but >> MicroPython does not expose that function. We should probably do >> that, then you could do something like: accelerometer.set_range(8). >> >> Alternatively you can use the I2C bus to send values to the >> accelerometer to change its range. It's actually pretty easy and you >> can do it right now with this code: >> >> i2c.write(0x1d, b'\x2a\x00') # disable device >> i2c.write(0x1d, b'\x0e\x02') # set range to 8g >> i2c.write(0x1d, b'\x2a\x21') # enable device, sample rate of 50Hz >> >> Note that the numbers coming from get_x() etc will now be 4 times >> smaller. 240 is around 1g, but you can now get to 2000 which is 8g. >> >> Cheers, >> Damien. >> >> >> >> On Mon, May 2, 2016 at 5:34 PM, Simon Fitzjohn >> wrote: >> > Hi All, >> > >> > >> > >> > Is there any way of changing the sensitivity on the accelerometer. Have >> > checked MMA8652 specs and appreciate that it defaults to +/- 2g but >> > would >> > like to change range to +/- 8g so as to use it with Physics type impact >> > investigations. >> > >> > >> > >> > Even a confirmation that it is not currently possible would be helpful . >> > . . >> > but note that an 8g gesture is part of microbit module! >> > >> > >> > >> > Many thanks, >> > >> > >> > >> > Simon >> > >> > >> > _______________________________________________ >> > 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 > From coryanws at gmail.com Tue May 3 08:16:12 2016 From: coryanws at gmail.com (Coryan W-S) Date: Tue, 3 May 2016 13:16:12 +0100 Subject: [Microbit-Python] JTAG headers Message-ID: Hello all, On the back of my Microbit (and very likely yours too) and located to the left of the MicroUSB connector are five small circular pads. A second group of five small circular pads are arranged in a line just below the NXP chip. I have a strong feeling that each of these are for JTAG, but before I start making a mess of my poor Microbit with a soldering iron, would anybody be able to confirm this? If such is the case: would anyone be kind enough to tell me what the pin mappings are? Thankyou very much for your help! Best, - Coryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Tue May 3 09:02:30 2016 From: damien.p.george at gmail.com (Damien George) Date: Tue, 3 May 2016 14:02:30 +0100 Subject: [Microbit-Python] JTAG headers In-Reply-To: References: Message-ID: I don't think this information is public yet... the BBC needs to first release the hardware design files. On Tue, May 3, 2016 at 1:16 PM, Coryan W-S wrote: > Hello all, > > On the back of my Microbit (and very likely yours too) and located to the > left of the MicroUSB connector are five small circular pads. A second group > of five small circular pads are arranged in a line just below the NXP chip. > > I have a strong feeling that each of these are for JTAG, but before I start > making a mess of my poor Microbit with a soldering iron, would anybody be > able to confirm this? If such is the case: would anyone be kind enough to > tell me what the pin mappings are? > > Thankyou very much for your help! > > Best, > - Coryan > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From ntoll at ntoll.org Tue May 3 09:11:11 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Tue, 3 May 2016 14:11:11 +0100 Subject: [Microbit-Python] JTAG headers In-Reply-To: References: Message-ID: <1e5dfc8f-4543-381a-ba67-513906c889bd@ntoll.org> FYI, hardware design files are likely to be released in June (based on a recent informal BBC sourced estimate). N. On 03/05/16 14:02, Damien George wrote: > I don't think this information is public yet... the BBC needs to first > release the hardware design files. > > On Tue, May 3, 2016 at 1:16 PM, Coryan W-S wrote: >> Hello all, >> >> On the back of my Microbit (and very likely yours too) and located to the >> left of the MicroUSB connector are five small circular pads. A second group >> of five small circular pads are arranged in a line just below the NXP chip. >> >> I have a strong feeling that each of these are for JTAG, but before I start >> making a mess of my poor Microbit with a soldering iron, would anybody be >> able to confirm this? If such is the case: would anyone be kind enough to >> tell me what the pin mappings are? >> >> Thankyou very much for your help! >> >> Best, >> - Coryan >> >> _______________________________________________ >> 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From carlos.p.a.87 at gmail.com Tue May 3 09:29:54 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Tue, 3 May 2016 14:29:54 +0100 Subject: [Microbit-Python] JTAG headers In-Reply-To: <1e5dfc8f-4543-381a-ba67-513906c889bd@ntoll.org> References: <1e5dfc8f-4543-381a-ba67-513906c889bd@ntoll.org> Message-ID: I honestly don't know really have any knowledge in that area, and as said already, until the schematics are out I would assume the people that do know probably won't be able to discuss it. Just keep in mind that those pins seem to be routed to the kinetis uC (reponsible to do the programming using the usb storage interface on the computer), not the nordic chip itself. Taking in consideration there are 5 pins, I wouldn't be surprised if it uses a SWD interface or similar (Vcc, Gnd, reset, clock and data). Thankfully it is not a bga package, so with a good set of eyes you could check which pins are connected and reference that with the datasheet to see what programming interface could be used on those. Have a look at other mbed boards that might use a similar configuration (maybe the NXP/Freescale freedom boards?), as there is a chance it could have been implemented the same way and be documented somewhere. On 3 May 2016 at 14:11, Nicholas H.Tollervey wrote: > FYI, hardware design files are likely to be released in June (based on a > recent informal BBC sourced estimate). > > N. > > On 03/05/16 14:02, Damien George wrote: > > I don't think this information is public yet... the BBC needs to first > > release the hardware design files. > > > > On Tue, May 3, 2016 at 1:16 PM, Coryan W-S wrote: > >> Hello all, > >> > >> On the back of my Microbit (and very likely yours too) and located to > the > >> left of the MicroUSB connector are five small circular pads. A second > group > >> of five small circular pads are arranged in a line just below the NXP > chip. > >> > >> I have a strong feeling that each of these are for JTAG, but before I > start > >> making a mess of my poor Microbit with a soldering iron, would anybody > be > >> able to confirm this? If such is the case: would anyone be kind enough > to > >> tell me what the pin mappings are? > >> > >> Thankyou very much for your help! > >> > >> Best, > >> - Coryan > >> > >> _______________________________________________ > >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From coryanws at gmail.com Tue May 3 10:41:12 2016 From: coryanws at gmail.com (Coryan W-S) Date: Tue, 3 May 2016 15:41:12 +0100 Subject: [Microbit-Python] JTAG headers Message-ID: Awesome, thanks for the info chaps. Also very helpful to read your description of the function of the NXP chip Carlos - I'd been wondering if that's what it was up to! Will definitely do as you suggest and have a look at the datasheets and some other mbed boards. Thanks again for your help, very much appreciated! Best, - Coryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Wed May 4 03:29:00 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 4 May 2016 08:29:00 +0100 Subject: [Microbit-Python] Updated the editors... Message-ID: Hi Folks, After poking the BBC for a bit they've agreed I can update the editor on the website and I've updated uflash and Mu too. N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From damien.p.george at gmail.com Wed May 4 04:51:31 2016 From: damien.p.george at gmail.com (Damien George) Date: Wed, 4 May 2016 09:51:31 +0100 Subject: [Microbit-Python] Updated the editors... In-Reply-To: References: Message-ID: Yay! What about moving forward, can we update on a semi-regular basis? On Wed, May 4, 2016 at 8:29 AM, Nicholas H.Tollervey wrote: > Hi Folks, > > After poking the BBC for a bit they've agreed I can update the editor on > the website and I've updated uflash and Mu too. > > N. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From ntoll at ntoll.org Wed May 4 04:52:38 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 4 May 2016 09:52:38 +0100 Subject: [Microbit-Python] Updated the editors... In-Reply-To: References: Message-ID: <9feb50f5-d7e8-9ec1-0e08-2c049b357ff1@ntoll.org> This is in hand... ;-) On 04/05/16 09:51, Damien George wrote: > Yay! What about moving forward, can we update on a semi-regular basis? > > On Wed, May 4, 2016 at 8:29 AM, Nicholas H.Tollervey wrote: >> Hi Folks, >> >> After poking the BBC for a bit they've agreed I can update the editor on >> the website and I've updated uflash and Mu too. >> >> N. >> >> >> _______________________________________________ >> 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From nevil.hunt at hotmail.co.uk Wed May 4 08:38:19 2016 From: nevil.hunt at hotmail.co.uk (Nevil) Date: Wed, 4 May 2016 13:38:19 +0100 Subject: [Microbit-Python] Updated the editors... In-Reply-To: <9feb50f5-d7e8-9ec1-0e08-2c049b357ff1@ntoll.org> References: <9feb50f5-d7e8-9ec1-0e08-2c049b357ff1@ntoll.org> Message-ID: Hi Nick, Is there somewhere where you can post what has changed in each update and the date on which the change(s) went live? And what about having somewhere where people can post requests for future changes? Keep up the good work! Thanks! Nevil On 4 May 2016, at 09:52, "Nicholas H.Tollervey" wrote: > This is in hand... ;-) > > On 04/05/16 09:51, Damien George wrote: >> Yay! What about moving forward, can we update on a semi-regular basis? >> >> On Wed, May 4, 2016 at 8:29 AM, Nicholas H.Tollervey wrote: >>> Hi Folks, >>> >>> After poking the BBC for a bit they've agreed I can update the editor on >>> the website and I've updated uflash and Mu too. >>> >>> N. >>> >>> >>> _______________________________________________ >>> 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 From ntoll at ntoll.org Wed May 4 09:06:35 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 4 May 2016 14:06:35 +0100 Subject: [Microbit-Python] Updated the editors... In-Reply-To: References: <9feb50f5-d7e8-9ec1-0e08-2c049b357ff1@ntoll.org> Message-ID: <82f0230e-a50c-1f8e-e68e-815f94663c92@ntoll.org> There's always a Changelog file in the root of the source code on GitHub which gives you precisely this information. Alternatively, looking at the commits in the repos will also tell you what's been added. Finally, if you want features then simply submit an issue to the correct repos. ;-) N. On 04/05/16 13:38, Nevil wrote: > Hi Nick, > > Is there somewhere where you can post what has changed in each update > and the date on which the change(s) went live? > > And what about having somewhere where people can post requests for > future changes? > > Keep up the good work! > > Thanks! > > Nevil > > > > On 4 May 2016, at 09:52, "Nicholas H.Tollervey" > wrote: > >> This is in hand... ;-) >> >> On 04/05/16 09:51, Damien George wrote: >>> Yay! What about moving forward, can we update on a semi-regular >>> basis? >>> >>> On Wed, May 4, 2016 at 8:29 AM, Nicholas H.Tollervey >>> wrote: >>>> Hi Folks, >>>> >>>> After poking the BBC for a bit they've agreed I can update the >>>> editor on the website and I've updated uflash and Mu too. >>>> >>>> N. >>>> >>>> >>>> _______________________________________________ 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From joe.t.glancy at gmail.com Fri May 6 13:14:57 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Fri, 06 May 2016 17:14:57 +0000 Subject: [Microbit-Python] Image class constructors question Message-ID: In the documentation, the image class defines the two following constructors (or their equivalent): *class*microbit.Image(*string*) *class*microbit.Image(*width=None*, *height=None*, *buffer=None*) Does that not mean that I could initialise a new class: img = microbit.Image(foo_variable) And it could be interpreted as either giving a string or giving a width? Or does MicroPython have something that stops this (like checking the type of `foo_variable`)? Quote the documentation: Optionally buffer can be an array of width``?``height integers in range 0-9 to initialize the image. So are width and height optional too, or not (so shouldn't have the `=None`)? Or can I choose one or the other? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwight.hubbard at gmail.com Tue May 10 14:47:23 2016 From: dwight.hubbard at gmail.com (Dwight Hubbard) Date: Tue, 10 May 2016 11:47:23 -0700 Subject: [Microbit-Python] Pycon Sprints Message-ID: I noticed there was a micropython/microbit sprint on the PyCon site and I was interested in possible doing sprinting on Micropython while I'm there, Last year I ran the redislite sprint... I'm currently messing with the wipy, esp8266 and implementing an emscripten port. I'm curious if you'd be open to expanding the scope of the sprint a bit. Also I would like to get a micropython bof organized during the main conference time and possibly use that time to deal with sprint details before the sprints start. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Wed May 11 03:45:20 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 11 May 2016 08:45:20 +0100 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: References: Message-ID: On 10/05/16 19:47, Dwight Hubbard wrote: > I noticed there was a micropython/microbit sprint on the PyCon site and > I was interested in possible doing sprinting on Micropython while I'm > there, Last year I ran the redislite sprint... > > I'm currently messing with the wipy, esp8266 and implementing an > emscripten port. I'm curious if you'd be open to expanding the scope of > the sprint a bit. Also I would like to get a micropython bof organized > during the main conference time and possibly use that time to deal with > sprint details before the sprints start. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > Hi Dwight, This sounds very interesting and I think it'd be really useful to gave all the MicroPython geeks sat together (cc'd is Mark Shannon who's also going to be sprinting on this). +1 on the BOF too. How can I help? :-) N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From ntoll at ntoll.org Wed May 11 03:53:04 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 11 May 2016 08:53:04 +0100 Subject: [Microbit-Python] Hackerman... Message-ID: <219dd86e-13bb-6c1d-0d68-1e4c4626efed@ntoll.org> Hi Folks, Watch the beginning of this (parody) video. He's describing a micro:bit's specifications..! (ish) https://www.youtube.com/watch?v=KEkrWRHCDQU Enjoy! :-) N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From naomi.ceder at gmail.com Wed May 11 09:05:52 2016 From: naomi.ceder at gmail.com (Naomi Ceder) Date: Wed, 11 May 2016 08:05:52 -0500 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: References: Message-ID: Wearing my PyCon Sprint Coordinator's hat - if everyone is agreeable, just edit the sprints page on the PyCon site so that everyone will know... and publicise to your heart's content, of course! :-) sprint-coordinatingly yours, Naomi On 11 May 2016 at 02:45, Nicholas H.Tollervey wrote: > On 10/05/16 19:47, Dwight Hubbard wrote: > > I noticed there was a micropython/microbit sprint on the PyCon site and > > I was interested in possible doing sprinting on Micropython while I'm > > there, Last year I ran the redislite sprint... > > > > I'm currently messing with the wipy, esp8266 and implementing an > > emscripten port. I'm curious if you'd be open to expanding the scope of > > the sprint a bit. Also I would like to get a micropython bof organized > > during the main conference time and possibly use that time to deal with > > sprint details before the sprints start. > > > > > > _______________________________________________ > > Microbit mailing list > > Microbit at python.org > > https://mail.python.org/mailman/listinfo/microbit > > > > Hi Dwight, > > This sounds very interesting and I think it'd be really useful to gave > all the MicroPython geeks sat together (cc'd is Mark Shannon who's also > going to be sprinting on this). +1 on the BOF too. > > How can I help? > > :-) > > N. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -- Naomi Ceder https://plus.google.com/u/0/111396744045017339164/about -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.p.a.87 at gmail.com Wed May 11 09:16:05 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Wed, 11 May 2016 14:16:05 +0100 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: References: Message-ID: So, are we talking about the US PyCon? What about the UK one in September? I haven't got my tickets yet, but would love to participate in a microbit micropython sprint in Cardiff :) On 11 May 2016 at 14:05, Naomi Ceder wrote: > Wearing my PyCon Sprint Coordinator's hat - if everyone is agreeable, just > edit the sprints page on the PyCon site so that everyone will know... and > publicise to your heart's content, of course! :-) > > sprint-coordinatingly yours, > > Naomi > > On 11 May 2016 at 02:45, Nicholas H.Tollervey wrote: > >> On 10/05/16 19:47, Dwight Hubbard wrote: >> > I noticed there was a micropython/microbit sprint on the PyCon site and >> > I was interested in possible doing sprinting on Micropython while I'm >> > there, Last year I ran the redislite sprint... >> > >> > I'm currently messing with the wipy, esp8266 and implementing an >> > emscripten port. I'm curious if you'd be open to expanding the scope of >> > the sprint a bit. Also I would like to get a micropython bof organized >> > during the main conference time and possibly use that time to deal with >> > sprint details before the sprints start. >> > >> > >> > _______________________________________________ >> > Microbit mailing list >> > Microbit at python.org >> > https://mail.python.org/mailman/listinfo/microbit >> > >> >> Hi Dwight, >> >> This sounds very interesting and I think it'd be really useful to gave >> all the MicroPython geeks sat together (cc'd is Mark Shannon who's also >> going to be sprinting on this). +1 on the BOF too. >> >> How can I help? >> >> :-) >> >> N. >> >> >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit >> >> > > > -- > Naomi Ceder > https://plus.google.com/u/0/111396744045017339164/about > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Wed May 11 17:59:08 2016 From: damien.p.george at gmail.com (Damien George) Date: Wed, 11 May 2016 22:59:08 +0100 Subject: [Microbit-Python] Image class constructors question In-Reply-To: References: Message-ID: The docs are wrong. There are 5 constructors: Image() - return the blank image Image(chr) - return an image with the character rendered to the image Image(string) - return an image described by the string (eg 01110:00000 etc) Image(width, height) - create a blank image of given size Image(width, height, buffer) - create an image of the given size, initialsed by the buffer On Fri, May 6, 2016 at 6:14 PM, Joe Glancy wrote: > In the documentation, the image class defines the two following constructors > (or their equivalent): > > classmicrobit.Image(string) classmicrobit.Image(width=None, height=None, > buffer=None) > > Does that not mean that I could initialise a new class: > > img = microbit.Image(foo_variable) > > And it could be interpreted as either giving a string or giving a width? Or > does MicroPython have something that stops this (like checking the type of > `foo_variable`)? Quote the documentation: > > Optionally buffer can be an array of width``?``height integers in range 0-9 > to initialize the image. > > So are width and height optional too, or not (so shouldn't have the > `=None`)? Or can I choose one or the other? > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From microbit at sheep.art.pl Wed May 11 18:20:14 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Thu, 12 May 2016 00:20:14 +0200 Subject: [Microbit-Python] Image class constructors question In-Reply-To: References: Message-ID: <20160512002014.464a41e2@ghostwheel> I didn't realize Python supports mutliple dispatch based on types like that! Looks almost like it was designed by a C++ programmer :) On Wed, 11 May 2016 22:59:08 +0100 Damien George wrote: > The docs are wrong. There are 5 constructors: > > Image() - return the blank image > Image(chr) - return an image with the character rendered to the image > Image(string) - return an image described by the string (eg > 01110:00000 etc) Image(width, height) - create a blank image of given > size Image(width, height, buffer) - create an image of the given size, > initialsed by the buffer > > > > On Fri, May 6, 2016 at 6:14 PM, Joe Glancy > wrote: > > In the documentation, the image class defines the two following > > constructors (or their equivalent): > > > > classmicrobit.Image(string) classmicrobit.Image(width=None, > > height=None, buffer=None) > > > > Does that not mean that I could initialise a new class: > > > > img = microbit.Image(foo_variable) > > > > And it could be interpreted as either giving a string or giving a > > width? Or does MicroPython have something that stops this (like > > checking the type of `foo_variable`)? Quote the documentation: > > > > Optionally buffer can be an array of width``?``height integers in > > range 0-9 to initialize the image. > > > > So are width and height optional too, or not (so shouldn't have the > > `=None`)? Or can I choose one or the other? > > > > _______________________________________________ > > 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 -- Radomir Dopieralski -- Radomir Dopieralski From microbit at sheep.art.pl Wed May 11 18:29:38 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Thu, 12 May 2016 00:29:38 +0200 Subject: [Microbit-Python] Image class constructors question In-Reply-To: <20160512002014.464a41e2@ghostwheel> References: <20160512002014.464a41e2@ghostwheel> Message-ID: <20160512002938.326d2eab@ghostwheel> But seriously, when I wrote that documentation, I was trying to translate to Python the strange logic the best I could. I'm not sure it's a good idea to show the users multiple constructors when they won't be able to re-create anything like that with pure Python code. On Thu, 12 May 2016 00:20:14 +0200 Radomir Dopieralski wrote: > I didn't realize Python supports mutliple dispatch based on types like > that! Looks almost like it was designed by a C++ programmer :) > > On Wed, 11 May 2016 22:59:08 +0100 > Damien George wrote: > > > The docs are wrong. There are 5 constructors: > > > > Image() - return the blank image > > Image(chr) - return an image with the character rendered to the > > image Image(string) - return an image described by the string (eg > > 01110:00000 etc) Image(width, height) - create a blank image of > > given size Image(width, height, buffer) - create an image of the > > given size, initialsed by the buffer > > > > > > > > On Fri, May 6, 2016 at 6:14 PM, Joe Glancy > > wrote: > > > In the documentation, the image class defines the two following > > > constructors (or their equivalent): > > > > > > classmicrobit.Image(string) classmicrobit.Image(width=None, > > > height=None, buffer=None) > > > > > > Does that not mean that I could initialise a new class: > > > > > > img = microbit.Image(foo_variable) > > > > > > And it could be interpreted as either giving a string or giving a > > > width? Or does MicroPython have something that stops this (like > > > checking the type of `foo_variable`)? Quote the documentation: > > > > > > Optionally buffer can be an array of width``?``height integers in > > > range 0-9 to initialize the image. > > > > > > So are width and height optional too, or not (so shouldn't have > > > the `=None`)? Or can I choose one or the other? > > > > > > _______________________________________________ > > > 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 > > > -- Radomir Dopieralski -- Radomir Dopieralski From dwight.hubbard at gmail.com Thu May 12 12:55:48 2016 From: dwight.hubbard at gmail.com (Dwight Hubbard) Date: Thu, 12 May 2016 09:55:48 -0700 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: References: Message-ID: If possible it would be useful to have a sprint IRC channel or hangout running before pycon so people can coordinate more easily (anyone have a perfernce??). I personally like IRC but find hangouts works a lot better when I'm not on my computer. It would also be good to know when people can attend the BOF ahead of time since the best times on the BOF board tend to fill up pretty quickly so we probably want to put our bof info on the board at badge pickup or the first morning. On Wed, May 11, 2016 at 12:45 AM, Nicholas H.Tollervey wrote: > On 10/05/16 19:47, Dwight Hubbard wrote: > > I noticed there was a micropython/microbit sprint on the PyCon site and > > I was interested in possible doing sprinting on Micropython while I'm > > there, Last year I ran the redislite sprint... > > > > I'm currently messing with the wipy, esp8266 and implementing an > > emscripten port. I'm curious if you'd be open to expanding the scope of > > the sprint a bit. Also I would like to get a micropython bof organized > > during the main conference time and possibly use that time to deal with > > sprint details before the sprints start. > > > > > > _______________________________________________ > > Microbit mailing list > > Microbit at python.org > > https://mail.python.org/mailman/listinfo/microbit > > > > Hi Dwight, > > This sounds very interesting and I think it'd be really useful to gave > all the MicroPython geeks sat together (cc'd is Mark Shannon who's also > going to be sprinting on this). +1 on the BOF too. > > How can I help? > > :-) > > N. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Fri May 13 03:45:39 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Fri, 13 May 2016 08:45:39 +0100 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: References: Message-ID: <551249e5-a8d5-07ce-8502-0a98d3f14df2@ntoll.org> On 12/05/16 17:55, Dwight Hubbard wrote: > If possible it would be useful to have a sprint IRC channel or hangout > running before pycon so people can coordinate more easily (anyone have a > perfernce??). I personally like IRC but find hangouts works a lot > better when I'm not on my computer. > There's already the #micropython and #microbit channels on Freenode IRC. > It would also be good to know when people can attend the BOF ahead of > time since the best times on the BOF board tend to fill up pretty > quickly so we probably want to put our bof info on the board at badge > pickup or the first morning. > +1 Early evening is perhaps the best time because people can follow up with a drink / meal. N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From nigel.kendrick at gmail.com Fri May 13 08:40:29 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Fri, 13 May 2016 13:40:29 +0100 Subject: [Microbit-Python] Introducing myself Message-ID: Hi Everyone, I've just subscribed to the list and wanted to say 'Hi'. I am a Support Engineer (enterprise disks, flash storage and object storage systems) with HGST (Western Digital) working on a personal and voluntary level as a STEM Ambassador. In a past role I was an electronics engineer working on analogue, digital and mixed-signal systems. With reference to the micro:bit, I have one via STEM Sussex with a brief to become familiar with the design and use in order to support classroom activities and other STEM ambassadors. Along the way, I am developing some project ideas, hence the interest in the I/O and programming. Anyhow, I am currently working on some audio/visual add-ons (workshop notes, schematics and code to be open source) and am keen to link up with any people or resources related to the micro:bit - especially hardware-related stuff which seems to be a bit sparse and scattered around at the moment (reading NRF chip specs over here, scouring the DAL..., whipping out the logic analyser...!). Does anyone have a shareable schematic yet - especially for the display matrix to save me some time in working it out!!?? Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr All the best Nigel Kendrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From nevil.hunt at hotmail.co.uk Fri May 13 16:26:44 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Fri, 13 May 2016 21:26:44 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: Message-ID: Hi Nigel, Welcome! I see you work in the Data Storage business - I worked as a hardware designer for Nexsan until the end of last year. I'm now doing micro:bit related work, some of it in conjunction with the guys at Kitronik. I am developing some add-on boards for the micro:bit. One of them is a prototyping board which I've been using to make soldered prototypes of my designs. I am getting a custom connector made so once I have a few more connectors I was planning to offer to send a prototyping board to anyone on this forum who wants one. If you'd like one then I'd be happy to send you one. Nevil Date: Fri, 13 May 2016 13:40:29 +0100 From: nigel.kendrick at gmail.com To: microbit at python.org Subject: [Microbit-Python] Introducing myself Hi Everyone, I've just subscribed to the list and wanted to say 'Hi'. I am a Support Engineer (enterprise disks, flash storage and object storage systems) with HGST (Western Digital) working on a personal and voluntary level as a STEM Ambassador. In a past role I was an electronics engineer working on analogue, digital and mixed-signal systems. With reference to the micro:bit, I have one via STEM Sussex with a brief to become familiar with the design and use in order to support classroom activities and other STEM ambassadors. Along the way, I am developing some project ideas, hence the interest in the I/O and programming. Anyhow, I am currently working on some audio/visual add-ons (workshop notes, schematics and code to be open source) and am keen to link up with any people or resources related to the micro:bit - especially hardware-related stuff which seems to be a bit sparse and scattered around at the moment (reading NRF chip specs over here, scouring the DAL..., whipping out the logic analyser...!). Does anyone have a shareable schematic yet - especially for the display matrix to save me some time in working it out!!?? Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr All the best Nigel Kendrick _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Fri May 13 16:40:48 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson) Date: Fri, 13 May 2016 21:40:48 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: Message-ID: On 13/05/16 13:40, Nigel Kendrick wrote: Anyhow, I am currently working on some audio/visual add-ons (workshop notes, schematics and code to be open source) and am keen to link up with any people or resources related to the micro:bit - especially hardware-related stuff which seems to be a bit sparse and scattered around at the moment (reading NRF chip specs over here, scouring the DAL..., whipping out the logic analyser...!). Does anyone have a shareable schematic yet - especially for the display matrix to save me some time in working it out!!?? I think that the full schematics are yet to be released by the BBC. From the micro:bit open source page (microbit.co.uk/open-source): Please note, the remaining items of the BBC micro:bit project open source portfolio will be made available from this page after completion of the delivery of BBC micro:bits to children ? expected to be in May, 2016. There is, however, a pinout diagram for the micro:bit which lists Pin 3 as LED Column 1, Pin 5 as LED Column 2, Pin 10 as LED column 3, Pin 7 as LED Row 1, Pin 6 as LED Row 2 and Pin 9 as LED Row 3. Perhaps this will help? Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr I like the photo next to the servers, and the supercomputer. Not intending to start a trend, but: http://imgur.com/a/zmPSA. Note that sadly I don't own the NeXT (brought along to a coding club) or the BBC Micro (my school's) - but I do have two BBC Micros of my own (only one is working currently). Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Fri May 13 17:06:10 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Fri, 13 May 2016 22:06:10 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: Message-ID: <00f901d1ad5b$476cb1f0$d64615d0$@gmail.com> Hi Nevil, Thanks for the message. I've exchanged a few emails with the guys at Kitronik too but just for general info. I have some audio projects breadboarded right now and when the designs are finalised I'll publish the student project notes, code, schematics and PCB layouts for anyone interested. I'd be very happy to take a board off your hands and am looking forward to contributing to the micro:bit ecosystem in general. All the best Nigel From: Microbit [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] On Behalf Of Nevil Hunt Sent: 13 May 2016 21:27 To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] Introducing myself Hi Nigel, Welcome! I see you work in the Data Storage business - I worked as a hardware designer for Nexsan until the end of last year. I'm now doing micro:bit related work, some of it in conjunction with the guys at Kitronik. I am developing some add-on boards for the micro:bit. One of them is a prototyping board which I've been using to make soldered prototypes of my designs. I am getting a custom connector made so once I have a few more connectors I was planning to offer to send a prototyping board to anyone on this forum who wants one. If you'd like one then I'd be happy to send you one. Nevil _____ Date: Fri, 13 May 2016 13:40:29 +0100 From: nigel.kendrick at gmail.com To: microbit at python.org Subject: [Microbit-Python] Introducing myself Hi Everyone, I've just subscribed to the list and wanted to say 'Hi'. I am a Support Engineer (enterprise disks, flash storage and object storage systems) with HGST (Western Digital) working on a personal and voluntary level as a STEM Ambassador. In a past role I was an electronics engineer working on analogue, digital and mixed-signal systems. With reference to the micro:bit, I have one via STEM Sussex with a brief to become familiar with the design and use in order to support classroom activities and other STEM ambassadors. Along the way, I am developing some project ideas, hence the interest in the I/O and programming. Anyhow, I am currently working on some audio/visual add-ons (workshop notes, schematics and code to be open source) and am keen to link up with any people or resources related to the micro:bit - especially hardware-related stuff which seems to be a bit sparse and scattered around at the moment (reading NRF chip specs over here, scouring the DAL..., whipping out the logic analyser...!). Does anyone have a shareable schematic yet - especially for the display matrix to save me some time in working it out!!?? Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr All the best Nigel Kendrick _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Fri May 13 17:17:41 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Fri, 13 May 2016 22:17:41 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: Message-ID: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> Hi Andrew, Thanks for the message and info. I have been advised today that not all of the LED matrix driving lines are broken out to the edge connector, which is a bit of a bummer, but there you go. Continuing the trend of not starting a trend, and since you mentioned the BBC Micro ? here?s some pics of my 1979 Acorn System-1 ? it was designed by Sophie Wilson, who also worked on the design of the BBC Micro. I don?t have a pic of the micro:bit with the System-1 yet, but I plan to do a bit of coding for both and link them together so something like a message ticker runs from one display to the other ? some form of ?handshake across the ages?! https://imgur.com/a/8qfon All the best Nigel From: Microbit [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] On Behalf Of Andrew Ferguson Sent: 13 May 2016 21:41 To: Python-MicroBit Subject: Re: [Microbit-Python] Introducing myself On 13/05/16 13:40, Nigel Kendrick wrote: Anyhow, I am currently working on some audio/visual add-ons (workshop notes, schematics and code to be open source) and am keen to link up with any people or resources related to the micro:bit - especially hardware-related stuff which seems to be a bit sparse and scattered around at the moment (reading NRF chip specs over here, scouring the DAL..., whipping out the logic analyser...!). Does anyone have a shareable schematic yet - especially for the display matrix to save me some time in working it out!!?? I think that the full schematics are yet to be released by the BBC. From the micro:bit open source page (microbit.co.uk/open-source ): Please note, the remaining items of the BBC micro:bit project open source portfolio will be made available from this page after completion of the delivery of BBC micro:bits to children ? expected to be in May, 2016. There is, however, a pinout diagram for the micro:bit which lists Pin 3 as LED Column 1, Pin 5 as LED Column 2, Pin 10 as LED column 3, Pin 7 as LED Row 1, Pin 6 as LED Row 2 and Pin 9 as LED Row 3. Perhaps this will help? Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr I like the photo next to the servers, and the supercomputer. Not intending to start a trend, but: http://imgur.com/a/zmPSA. Note that sadly I don't own the NeXT (brought along to a coding club) or the BBC Micro (my school's) - but I do have two BBC Micros of my own (only one is working currently). Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Sat May 14 04:23:39 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Sat, 14 May 2016 09:23:39 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> Message-ID: <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> Hi Folks, I'm really enjoying this exchange. I live close to Bletchley Park, so I might pop over and continue not to start a trend by taking some photos of a micro:bit with Colossus (or something). I guess this can only end when someone has a photo of a micro:bit with, I don't know, something like the Antikythera mechanism or an abacus from the British Museum. :-P Regarding the schematics. When last I spoke to the BBC about this they said they expect all the other assets to be open-sourced sometime in June once all the devices have been delivered to the kids (they don't want people to start [inevitably] manufacturing knock-offs before the kids have their million delivered). All the best! N. On 13/05/16 22:17, Nigel Kendrick wrote: > Hi Andrew, > > > > Thanks for the message and info. I have been advised today that not all > of the LED matrix driving lines are broken out to the edge connector, > which is a bit of a bummer, but there you go. > > > > Continuing the trend of not starting a trend, and since you mentioned > the BBC Micro ? here?s some pics of my 1979 Acorn System-1 ? it was > designed by Sophie Wilson, who also worked on the design of the BBC Micro. > > > > I don?t have a pic of the micro:bit with the System-1 yet, but I plan to > do a bit of coding for both and link them together so something like a > message ticker runs from one display to the other ? some form of > ?handshake across the ages?! > > > > https://imgur.com/a/8qfon > > > > All the best > > > > Nigel > > > > *From:*Microbit > [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] *On Behalf > Of *Andrew Ferguson > *Sent:* 13 May 2016 21:41 > *To:* Python-MicroBit > *Subject:* Re: [Microbit-Python] Introducing myself > > > > On 13/05/16 13:40, Nigel Kendrick wrote: > > Anyhow, I am currently working on some audio/visual add-ons > (workshop notes, schematics and code to be open source) and am keen > to link up with any people or resources related to the micro:bit - > especially hardware-related stuff which seems to be a bit sparse and > scattered around at the moment (reading NRF chip specs over here, > scouring the DAL..., whipping out the logic analyser...!). Does > anyone have a shareable schematic yet - especially for the display > matrix to save me some time in working it out!!?? > > I think that the full schematics are yet to be released by the BBC. From > the micro:bit open source page (microbit.co.uk/open-source > ): > > Please note, the remaining items of the BBC micro:bit project open > source portfolio will be made available from this page after > completion of the delivery of BBC micro:bits to children ? expected > to be in May, 2016. > > There is, however, a pinout diagram > > for the micro:bit which lists Pin 3 as LED Column 1, Pin 5 as LED Column > 2, Pin 10 as LED column 3, Pin 7 as LED Row 1, Pin 6 as LED Row 2 and > Pin 9 as LED Row 3. Perhaps this will help? > > > > > Fun and games pics here for those interested: https://imgur.com/a/Rn6Cr > > > > I like the photo next to the servers, and the supercomputer. Not > intending to start a trend, but: > http://imgur.com/a/zmPSA. Note that sadly I don't own the NeXT (brought > along to a coding club) or the BBC Micro (my school's) - but I do have > two BBC Micros of my own (only one is working currently). > > Andrew > > > > Virus-free. www.avast.com > > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From nigel.kendrick at gmail.com Sat May 14 09:00:55 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Sat, 14 May 2016 14:00:55 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> Message-ID: <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> I may have the opportunity to take a pic of the micro:bit on a Cray in a week or so, and I might be back in San Jose next quarter so I could pop over to the Computer History Museum in Mountain View! No, no trend emerging here! -- Nigel -----Original Message----- From: Microbit [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] On Behalf Of Nicholas H.Tollervey Sent: 14 May 2016 09:24 To: microbit at python.org Subject: Re: [Microbit-Python] Introducing myself Hi Folks, I'm really enjoying this exchange. I live close to Bletchley Park, so I might pop over and continue not to start a trend by taking some photos of a micro:bit with Colossus (or something). I guess this can only end when someone has a photo of a micro:bit with, I don't know, something like the Antikythera mechanism or an abacus from the British Museum. :-P Regarding the schematics. When last I spoke to the BBC about this they said they expect all the other assets to be open-sourced sometime in June once all the devices have been delivered to the kids (they don't want people to start [inevitably] manufacturing knock-offs before the kids have their million delivered). All the best! N. On 13/05/16 22:17, Nigel Kendrick wrote: > Hi Andrew, > > > > Thanks for the message and info. I have been advised today that not > all of the LED matrix driving lines are broken out to the edge > connector, which is a bit of a bummer, but there you go. > > > > Continuing the trend of not starting a trend, and since you mentioned > the BBC Micro - here's some pics of my 1979 Acorn System-1 - it was > designed by Sophie Wilson, who also worked on the design of the BBC Micro. > > > > I don't have a pic of the micro:bit with the System-1 yet, but I plan > to do a bit of coding for both and link them together so something > like a message ticker runs from one display to the other - some form > of "handshake across the ages"! > > > > https://imgur.com/a/8qfon > > > > All the best > > > > Nigel > > > > *From:*Microbit > [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] *On > Behalf Of *Andrew Ferguson > *Sent:* 13 May 2016 21:41 > *To:* Python-MicroBit > *Subject:* Re: [Microbit-Python] Introducing myself > > > > On 13/05/16 13:40, Nigel Kendrick wrote: > > Anyhow, I am currently working on some audio/visual add-ons > (workshop notes, schematics and code to be open source) and am keen > to link up with any people or resources related to the micro:bit - > especially hardware-related stuff which seems to be a bit sparse and > scattered around at the moment (reading NRF chip specs over here, > scouring the DAL..., whipping out the logic analyser...!). Does > anyone have a shareable schematic yet - especially for the display > matrix to save me some time in working it out!!?? > > I think that the full schematics are yet to be released by the BBC. > From the micro:bit open source page (microbit.co.uk/open-source > ): > > Please note, the remaining items of the BBC micro:bit project open > source portfolio will be made available from this page after > completion of the delivery of BBC micro:bits to children - expected > to be in May, 2016. > > There is, however, a pinout diagram > or_pinout.png> for the micro:bit which lists Pin 3 as LED Column 1, > Pin 5 as LED Column 2, Pin 10 as LED column 3, Pin 7 as LED Row 1, Pin > 6 as LED Row 2 and Pin 9 as LED Row 3. Perhaps this will help? > > > > > Fun and games pics here for those interested: > https://imgur.com/a/Rn6Cr > > > > I like the photo next to the servers, and the supercomputer. Not > intending to start a trend, but: > http://imgur.com/a/zmPSA. Note that sadly I don't own the NeXT > (brought along to a coding club) or the BBC Micro (my school's) - but > I do have two BBC Micros of my own (only one is working currently). > > Andrew > > > > Virus-free. www.avast.com > campaign=sig-email&utm_content=emailclient> > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From joe.t.glancy at gmail.com Sat May 14 09:25:09 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Sat, 14 May 2016 13:25:09 +0000 Subject: [Microbit-Python] Introducing myself In-Reply-To: <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: Welcome Nigel! Nice to have you around :) We should have a picture/video of the micro:bit communicating with a really old device over serial - maybe a Mac classic, or something else which used a serial link to hook up to a terminal - with a short video of them visually sending "Hello, X!" "Hello, micro:bit!" to each other (maybe something which has a similar spec (clock speed/ram wise), to show how technology has changed and become so eensy weensy?). On Sat, 14 May 2016, 14:00 Nigel Kendrick, wrote: > I may have the opportunity to take a pic of the micro:bit on a Cray in a > week or so, and I might be back in San Jose next quarter so I could pop > over > to the Computer History Museum in Mountain View! > > No, no trend emerging here! > > -- Nigel > -----Original Message----- > From: Microbit [mailto:microbit-bounces+nigel.kendrick= > gmail.com at python.org] > On Behalf Of Nicholas H.Tollervey > Sent: 14 May 2016 09:24 > To: microbit at python.org > Subject: Re: [Microbit-Python] Introducing myself > > Hi Folks, > > I'm really enjoying this exchange. I live close to Bletchley Park, so I > might pop over and continue not to start a trend by taking some photos of a > micro:bit with Colossus (or something). > > I guess this can only end when someone has a photo of a micro:bit with, I > don't know, something like the Antikythera mechanism or an abacus from the > British Museum. > > :-P > > Regarding the schematics. When last I spoke to the BBC about this they said > they expect all the other assets to be open-sourced sometime in June once > all the devices have been delivered to the kids (they don't want people to > start [inevitably] manufacturing knock-offs before the kids have their > million delivered). > > All the best! > > N. > > On 13/05/16 22:17, Nigel Kendrick wrote: > > Hi Andrew, > > > > > > > > Thanks for the message and info. I have been advised today that not > > all of the LED matrix driving lines are broken out to the edge > > connector, which is a bit of a bummer, but there you go. > > > > > > > > Continuing the trend of not starting a trend, and since you mentioned > > the BBC Micro - here's some pics of my 1979 Acorn System-1 - it was > > designed by Sophie Wilson, who also worked on the design of the BBC > Micro. > > > > > > > > I don't have a pic of the micro:bit with the System-1 yet, but I plan > > to do a bit of coding for both and link them together so something > > like a message ticker runs from one display to the other - some form > > of "handshake across the ages"! > > > > > > > > https://imgur.com/a/8qfon > > > > > > > > All the best > > > > > > > > Nigel > > > > > > > > *From:*Microbit > > [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] *On > > Behalf Of *Andrew Ferguson > > *Sent:* 13 May 2016 21:41 > > *To:* Python-MicroBit > > *Subject:* Re: [Microbit-Python] Introducing myself > > > > > > > > On 13/05/16 13:40, Nigel Kendrick wrote: > > > > Anyhow, I am currently working on some audio/visual add-ons > > (workshop notes, schematics and code to be open source) and am keen > > to link up with any people or resources related to the micro:bit - > > especially hardware-related stuff which seems to be a bit sparse and > > scattered around at the moment (reading NRF chip specs over here, > > scouring the DAL..., whipping out the logic analyser...!). Does > > anyone have a shareable schematic yet - especially for the display > > matrix to save me some time in working it out!!?? > > > > I think that the full schematics are yet to be released by the BBC. > > From the micro:bit open source page (microbit.co.uk/open-source > > ): > > > > Please note, the remaining items of the BBC micro:bit project open > > source portfolio will be made available from this page after > > completion of the delivery of BBC micro:bits to children - expected > > to be in May, 2016. > > > > There is, however, a pinout diagram > > > or_pinout.png> for the micro:bit which lists Pin 3 as LED Column 1, > > Pin 5 as LED Column 2, Pin 10 as LED column 3, Pin 7 as LED Row 1, Pin > > 6 as LED Row 2 and Pin 9 as LED Row 3. Perhaps this will help? > > > > > > > > > > Fun and games pics here for those interested: > > https://imgur.com/a/Rn6Cr > > > > > > > > I like the photo next to the servers, and the supercomputer. Not > > intending to start a trend, but: > > http://imgur.com/a/zmPSA. Note that sadly I don't own the NeXT > > (brought along to a coding club) or the BBC Micro (my school's) - but > > I do have two BBC Micros of my own (only one is working currently). > > > > Andrew > > > > > > > < > https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai > gn=sig-email&utm_content=emailclient > > > > > Virus-free. www.avast.com > > > campaign=sig-email&utm_content=emailclient> > > > > > > > > > > _______________________________________________ > > Microbit mailing list > > Microbit at python.org > > https://mail.python.org/mailman/listinfo/microbit > > > > > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sat May 14 11:05:57 2016 From: david at thinkingbinaries.com (David Whale) Date: Sat, 14 May 2016 16:05:57 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.t.glancy at gmail.com Sat May 14 14:19:56 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Sat, 14 May 2016 18:19:56 +0000 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: That sounds like a good idea - would that be possible with your working Micro Andrew? The Micro displaying "Hello micro:bit!" on some sort of terminal (as though it's actually saying that), and the micro:bit responding back by scrolling "Hello Micro!" (or the other way around. On Sat, 14 May 2016, 16:06 David Whale, wrote: > How about a BBC micro talking to a BBC micro:bit over serial? The RS422 > interface at the back of the original beeb is just a UART. Need a level > shifter, then bring into UART pins on the expansion pads at the bottom of > the micro:bit and use MicroPython UART object. > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.t.glancy at gmail.com Sat May 14 15:58:03 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Sat, 14 May 2016 19:58:03 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] Message-ID: Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for first starting this) have been working on something similar to David's mb_remote module for Python, called microperi (micro-peripheral, as that is what the micro:bit becomes :). It is currently (and very much) an alpha work-in-progress, and I'm only informing everyone here about it because we need testers and, more importantly, feedback. It lives at https://github.com/JoeGlancy/microperi, and because none of the install methods (pip3/python3 setup.py install) work properly as of now, the best way to try it is just create your scripts in the same directory where the docs (README, CONTRIBUTING etc) are and use `import microperi` (check out the example in the README for a bit of a better howto). It exposes almost all of the micro:bit's MicroPython `microbit` module, which is completely available through a microperi.Microbit object. This is actually one of the things that I'd like feedback about; see below for more information (I don't think I've explained this too well, but it's the best I could think of and word). If you just want to try it out, get cloning and give it a whirl. Anything you spot as a bug or something you feel needs to be improved/implemented, just create an issue or submit a PR (check CONTRIBUTING.rst first though). We decided on the Microbit object (instead of one pre-set object called `microperi.microbit`, which it actually was originally) so that multiple micro:bits can be used at the same time. The constructor is: microperi.Microbit(port=None) If port is not specified, the module will automatically detect the first available micro:bit and use that one (Nick, the finding code is from microrepl - could you comment on licensing please?). Otherwise, `port` must be a string determining the serial port which the micro:bit is connected to (e.g: /dev/ttyACM0, COM1, etc). Usual usage of the object is along the following lines (or, more literal, line): microbit = microperi.Microbit() and then things like the microbit.Image class are available through `microbit.Image`. However, if I were to call the micro:bit object a different name in my script (such as "uBit"), the Image class would be accessible as uBit.Image, which deviates from the MicroPython API. However, we did not want to place things like the Image & pin classes in somewhere like `microperi.microbit.Class_name` because then you'd have a bit of a mess like so: from microperi import * uBit = Microbit() solid = microbit.Image.SNAKE uBit.display.show(solid) because some things (e.g: microbit.i2c.read) would be accessible through `uBit.i2c.read`, and others (e.g: microbit.Image) would be accessible through `microbit.Image`, when they both should be under `microbit.X`, if you understand what I mean. The best solution for this currently is just calling the object `microbit`, and then everything will be as it should, but if you don't some things will be in different places. Anyway, I hope that this module will prove itself useful for people and perhaps even in the classroom, as it notably allows not only use of the microbit module but also every other Python 3 module out there, allowing much more powerful (possibly IoT integrated?) scripts to be created on a much more powerful machine. I look forward to any feedback, and hope for a proper, stable release (with documentation of some sort) sometime soon. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sat May 14 17:15:16 2016 From: david at thinkingbinaries.com (David Whale) Date: Sat, 14 May 2016 22:15:16 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: Copious notes here, for setting up the BBC Micro serial port: http://www.brahms.demon.co.uk/software/downloads/serial-cable.txt -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sat May 14 17:24:56 2016 From: david at thinkingbinaries.com (David Whale) Date: Sat, 14 May 2016 22:24:56 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: Looks great, Joe and Andrew! Yes, I wrote this original mb_remote version back in August 2015, but the Python API on the micro:bit changed many times since then and I've been too busy to maintain it. However, it's great to see this moving forward. There are some really nice use cases (especially micro:bit + Raspberry Pi) where this sort of approach is both really useful and great fun, as I discovered with my early tests. The 'flying xwing in minecraft with a micro:bit' that Martin and I did, was really the inspiration for me writing the mb_remote, more to get a feel for what it would look like than anything else. I had come to the conclusion that the micro:bit makes a great peripheral for other computers, what with it's onboard sensors and I/O pins, and having a really quick way to extend your python from the host PC onto the micro:bit is really fun. I'm also glad to see you take forward the idea of poking commands into the REPL and getting responses (that's much better than having to load custom firmware onto the micro:bit, as other solutions tend to go for). David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 14 May 2016 at 20:58, Joe Glancy wrote: > Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for first > starting this) have been working on something similar to David's mb_remote > module for Python, called microperi (micro-peripheral, as that is what the > micro:bit becomes :). It is currently (and very much) an alpha > work-in-progress, and I'm only informing everyone here about it because we > need testers and, more importantly, feedback. > > It lives at https://github.com/JoeGlancy/microperi, and because none of > the install methods (pip3/python3 setup.py install) work properly as of > now, the best way to try it is just create your scripts in the same > directory where the docs (README, CONTRIBUTING etc) are and use `import > microperi` (check out the example in the README for a bit of a better > howto). > > It exposes almost all of the micro:bit's MicroPython `microbit` module, > which is completely available through a microperi.Microbit object. This is > actually one of the things that I'd like feedback about; see below for more > information (I don't think I've explained this too well, but it's the best > I could think of and word). If you just want to try it out, get cloning and > give it a whirl. Anything you spot as a bug or something you feel needs to > be improved/implemented, just create an issue or submit a PR (check > CONTRIBUTING.rst first though). > > We decided on the Microbit object (instead of one pre-set object called > `microperi.microbit`, which it actually was originally) so that multiple > micro:bits can be used at the same time. The constructor is: > > microperi.Microbit(port=None) > > If port is not specified, the module will automatically detect the first > available micro:bit and use that one (Nick, the finding code is from > microrepl - could you comment on licensing please?). Otherwise, `port` must > be a string determining the serial port which the micro:bit is connected to > (e.g: /dev/ttyACM0, COM1, etc). > > Usual usage of the object is along the following lines (or, more literal, > line): > > microbit = microperi.Microbit() > > and then things like the microbit.Image class are available through > `microbit.Image`. However, if I were to call the micro:bit object a > different name in my script (such as "uBit"), the Image class would be > accessible as uBit.Image, which deviates from the MicroPython API. However, > we did not want to place things like the Image & pin classes in somewhere > like `microperi.microbit.Class_name` because then you'd have a bit of a > mess like so: > > from microperi import * > uBit = Microbit() > solid = microbit.Image.SNAKE > uBit.display.show(solid) > > because some things (e.g: microbit.i2c.read) would be accessible through > `uBit.i2c.read`, and others (e.g: microbit.Image) would be accessible > through `microbit.Image`, when they both should be under `microbit.X`, if > you understand what I mean. > > The best solution for this currently is just calling the object > `microbit`, and then everything will be as it should, but if you don't some > things will be in different places. > > Anyway, I hope that this module will prove itself useful for people and > perhaps even in the classroom, as it notably allows not only use of the > microbit module but also every other Python 3 module out there, allowing > much more powerful (possibly IoT integrated?) scripts to be created on a > much more powerful machine. I look forward to any feedback, and hope for a > proper, stable release (with documentation of some sort) sometime soon. > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.t.glancy at gmail.com Sat May 14 17:54:18 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Sat, 14 May 2016 21:54:18 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: Thanks David :) I'll see if I can find that demo and get it up and working with this module - would be nice to have some examples with it where it can interact with things such as MCPI straight out of the box. And indeed it does make an excellent addon, mostly thanks to the pretty much universal serial interface it uses to communicate (which allows it to be easily interfaced on many platforms with minimal (or even none) setup required). As a matter of fact, I thought up of something very similar to this but which communicated over Bluetooth instead a while ago (using a stock micro:bit image), with a Raspberry Pi 3 and micro:bit as use case. Unfortunately, I found it impossible to get the micro:bit to work properly with BlueZ, despite some help from the BlueZ IRC and Linux Bluetooth mailing list.This kind of lead to the wired approach you see now. Maybe the recent BlueZ updates will fix this, so that a wireless alternative to this module exists too. On Sat, 14 May 2016, 22:25 David Whale, wrote: > Looks great, Joe and Andrew! > > Yes, I wrote this original mb_remote version back in August 2015, but the > Python API on the micro:bit changed many times since then and I've been too > busy to maintain it. However, it's great to see this moving forward. There > are some really nice use cases (especially micro:bit + Raspberry Pi) where > this sort of approach is both really useful and great fun, as I discovered > with my early tests. > > The 'flying xwing in minecraft with a micro:bit' that Martin and I did, > was really the inspiration for me writing the mb_remote, more to get a feel > for what it would look like than anything else. I had come to the > conclusion that the micro:bit makes a great peripheral for other computers, > what with it's onboard sensors and I/O pins, and having a really quick way > to extend your python from the host PC onto the micro:bit is really fun. > > I'm also glad to see you take forward the idea of poking commands into the > REPL and getting responses (that's much better than having to load custom > firmware onto the micro:bit, as other solutions tend to go for). > > David > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 14 May 2016 at 20:58, Joe Glancy wrote: > >> Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for >> first starting this) have been working on something similar to David's >> mb_remote module for Python, called microperi (micro-peripheral, as that is >> what the micro:bit becomes :). It is currently (and very much) an alpha >> work-in-progress, and I'm only informing everyone here about it because we >> need testers and, more importantly, feedback. >> >> It lives at https://github.com/JoeGlancy/microperi, and because none of >> the install methods (pip3/python3 setup.py install) work properly as of >> now, the best way to try it is just create your scripts in the same >> directory where the docs (README, CONTRIBUTING etc) are and use `import >> microperi` (check out the example in the README for a bit of a better >> howto). >> >> It exposes almost all of the micro:bit's MicroPython `microbit` module, >> which is completely available through a microperi.Microbit object. This is >> actually one of the things that I'd like feedback about; see below for more >> information (I don't think I've explained this too well, but it's the best >> I could think of and word). If you just want to try it out, get cloning and >> give it a whirl. Anything you spot as a bug or something you feel needs to >> be improved/implemented, just create an issue or submit a PR (check >> CONTRIBUTING.rst first though). >> >> We decided on the Microbit object (instead of one pre-set object called >> `microperi.microbit`, which it actually was originally) so that multiple >> micro:bits can be used at the same time. The constructor is: >> >> microperi.Microbit(port=None) >> >> If port is not specified, the module will automatically detect the first >> available micro:bit and use that one (Nick, the finding code is from >> microrepl - could you comment on licensing please?). Otherwise, `port` must >> be a string determining the serial port which the micro:bit is connected to >> (e.g: /dev/ttyACM0, COM1, etc). >> >> Usual usage of the object is along the following lines (or, more literal, >> line): >> >> microbit = microperi.Microbit() >> >> and then things like the microbit.Image class are available through >> `microbit.Image`. However, if I were to call the micro:bit object a >> different name in my script (such as "uBit"), the Image class would be >> accessible as uBit.Image, which deviates from the MicroPython API. However, >> we did not want to place things like the Image & pin classes in somewhere >> like `microperi.microbit.Class_name` because then you'd have a bit of a >> mess like so: >> >> from microperi import * >> uBit = Microbit() >> solid = microbit.Image.SNAKE >> uBit.display.show(solid) >> >> because some things (e.g: microbit.i2c.read) would be accessible through >> `uBit.i2c.read`, and others (e.g: microbit.Image) would be accessible >> through `microbit.Image`, when they both should be under `microbit.X`, if >> you understand what I mean. >> >> The best solution for this currently is just calling the object >> `microbit`, and then everything will be as it should, but if you don't some >> things will be in different places. >> >> Anyway, I hope that this module will prove itself useful for people and >> perhaps even in the classroom, as it notably allows not only use of the >> microbit module but also every other Python 3 module out there, allowing >> much more powerful (possibly IoT integrated?) scripts to be created on a >> much more powerful machine. I look forward to any feedback, and hope for a >> proper, stable release (with documentation of some sort) sometime soon. >> >> _______________________________________________ >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Sat May 14 18:55:49 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson 500) Date: Sat, 14 May 2016 23:55:49 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: <12DCA664-B042-4D28-9541-44A23D387C5D@gmail.com> Absolutely, that is something I'll look into. Unfortunately it is unlikely I'll have time for this before the end of May - I am currently in the middle of my Higher exams and so don't have time for much else. But once they finish I'll see how it could be done. Andrew On 14 May 2016, at 19:19, Joe Glancy wrote: > That sounds like a good idea - would that be possible with your working Micro Andrew? The Micro displaying "Hello micro:bit!" on some sort of terminal (as though it's actually saying that), and the micro:bit responding back by scrolling "Hello Micro!" (or the other way around. > > > On Sat, 14 May 2016, 16:06 David Whale, wrote: > How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sun May 15 05:42:31 2016 From: david at thinkingbinaries.com (David Whale) Date: Sun, 15 May 2016 10:42:31 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: Joe and Andrew, Just a comment about this, please read this article, and consider *changing* how you package this, especially for teachers: https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ The version that I wrote back in August 2015 is zero install - yes, ZERO install. All a teacher has to do is to press the DownloadZip button, unzip it, and run it. This is VITAL for teachers to use these resources, especially on a Raspberry Pi where mostly they are not connected to the internet most of the time. Most of the time they want to just grab a file on a USB memory stick, and copy it over. sudo pip install is *useless* in this situation. Raspberry Pi's are mostly not connected to the internet in schools, because it stores the wifi password in plain text in the config file, and school IT technicians ban the teachers from using them for this reason (as it exposes the password to the kids, and then all their phones start connecting to the wifi and makes it crash). Really, this is a big problem, believe me! The way I did this was to *embed* pyserial into the package (and the licence allows for this providing you are clear about the containing licence). Please see my original here: https://github.com/whaleygeek/mb_remote and you will see this works really great. There is also a little bit of python magic in the file (it modifies the sys.path inplace) to make sure that this happens automatically. (you need to make this Python 3 safe still, of course). Can I strongly urge you to make it zero install? It'll get adopted really quickly that way. I've had a number of chats with teachers already about this and they are really excited about it, but they said to me 'ah, it's all that sudo pip stuff, that never works for us'. Lots of teachers I speak to gave in with PyGameZero because they couldn't get it to install. Thanks David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 14 May 2016 at 22:54, Joe Glancy wrote: > Thanks David :) > > I'll see if I can find that demo and get it up and working with this > module - would be nice to have some examples with it where it can interact > with things such as MCPI straight out of the box. > > And indeed it does make an excellent addon, mostly thanks to the pretty > much universal serial interface it uses to communicate (which allows it to > be easily interfaced on many platforms with minimal (or even none) setup > required). > > As a matter of fact, I thought up of something very similar to this but > which communicated over Bluetooth instead a while ago (using a stock > micro:bit image), with a Raspberry Pi 3 and micro:bit as use case. > Unfortunately, I found it impossible to get the micro:bit to work properly > with BlueZ, despite some help from the BlueZ IRC and Linux Bluetooth > mailing list.This kind of lead to the wired approach you see now. Maybe the > recent BlueZ updates will fix this, so that a wireless alternative to this > module exists too. > > On Sat, 14 May 2016, 22:25 David Whale, > wrote: > >> Looks great, Joe and Andrew! >> >> Yes, I wrote this original mb_remote version back in August 2015, but the >> Python API on the micro:bit changed many times since then and I've been too >> busy to maintain it. However, it's great to see this moving forward. There >> are some really nice use cases (especially micro:bit + Raspberry Pi) where >> this sort of approach is both really useful and great fun, as I discovered >> with my early tests. >> >> The 'flying xwing in minecraft with a micro:bit' that Martin and I did, >> was really the inspiration for me writing the mb_remote, more to get a feel >> for what it would look like than anything else. I had come to the >> conclusion that the micro:bit makes a great peripheral for other computers, >> what with it's onboard sensors and I/O pins, and having a really quick way >> to extend your python from the host PC onto the micro:bit is really fun. >> >> I'm also glad to see you take forward the idea of poking commands into >> the REPL and getting responses (that's much better than having to load >> custom firmware onto the micro:bit, as other solutions tend to go for). >> >> David >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 14 May 2016 at 20:58, Joe Glancy wrote: >> >>> Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for >>> first starting this) have been working on something similar to David's >>> mb_remote module for Python, called microperi (micro-peripheral, as that is >>> what the micro:bit becomes :). It is currently (and very much) an alpha >>> work-in-progress, and I'm only informing everyone here about it because we >>> need testers and, more importantly, feedback. >>> >>> It lives at https://github.com/JoeGlancy/microperi, and because none of >>> the install methods (pip3/python3 setup.py install) work properly as of >>> now, the best way to try it is just create your scripts in the same >>> directory where the docs (README, CONTRIBUTING etc) are and use `import >>> microperi` (check out the example in the README for a bit of a better >>> howto). >>> >>> It exposes almost all of the micro:bit's MicroPython `microbit` module, >>> which is completely available through a microperi.Microbit object. This is >>> actually one of the things that I'd like feedback about; see below for more >>> information (I don't think I've explained this too well, but it's the best >>> I could think of and word). If you just want to try it out, get cloning and >>> give it a whirl. Anything you spot as a bug or something you feel needs to >>> be improved/implemented, just create an issue or submit a PR (check >>> CONTRIBUTING.rst first though). >>> >>> We decided on the Microbit object (instead of one pre-set object called >>> `microperi.microbit`, which it actually was originally) so that multiple >>> micro:bits can be used at the same time. The constructor is: >>> >>> microperi.Microbit(port=None) >>> >>> If port is not specified, the module will automatically detect the first >>> available micro:bit and use that one (Nick, the finding code is from >>> microrepl - could you comment on licensing please?). Otherwise, `port` must >>> be a string determining the serial port which the micro:bit is connected to >>> (e.g: /dev/ttyACM0, COM1, etc). >>> >>> Usual usage of the object is along the following lines (or, more >>> literal, line): >>> >>> microbit = microperi.Microbit() >>> >>> and then things like the microbit.Image class are available through >>> `microbit.Image`. However, if I were to call the micro:bit object a >>> different name in my script (such as "uBit"), the Image class would be >>> accessible as uBit.Image, which deviates from the MicroPython API. However, >>> we did not want to place things like the Image & pin classes in somewhere >>> like `microperi.microbit.Class_name` because then you'd have a bit of a >>> mess like so: >>> >>> from microperi import * >>> uBit = Microbit() >>> solid = microbit.Image.SNAKE >>> uBit.display.show(solid) >>> >>> because some things (e.g: microbit.i2c.read) would be accessible through >>> `uBit.i2c.read`, and others (e.g: microbit.Image) would be accessible >>> through `microbit.Image`, when they both should be under `microbit.X`, if >>> you understand what I mean. >>> >>> The best solution for this currently is just calling the object >>> `microbit`, and then everything will be as it should, but if you don't some >>> things will be in different places. >>> >>> Anyway, I hope that this module will prove itself useful for people and >>> perhaps even in the classroom, as it notably allows not only use of the >>> microbit module but also every other Python 3 module out there, allowing >>> much more powerful (possibly IoT integrated?) scripts to be created on a >>> much more powerful machine. I look forward to any feedback, and hope for a >>> proper, stable release (with documentation of some sort) sometime soon. >>> >>> _______________________________________________ >>> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nevil.hunt at hotmail.co.uk Sun May 15 06:09:33 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Sun, 15 May 2016 11:09:33 +0100 Subject: [Microbit-Python] UART Pins In-Reply-To: References: , , <010801d1ad5c$e3408d30$a9c1a790$@gmail.com>, <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org>, <002901d1ade0$a8fd09d0$faf71d70$@gmail.com>, , Message-ID: Hi David, My micro:bit diagram shows the I2C and SPI pins on the edge connector. Which are the UART Tx & Rx pins? Nevil Date: Sat, 14 May 2016 16:05:57 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] Introducing myself How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sun May 15 06:44:18 2016 From: david at thinkingbinaries.com (David Whale) Date: Sun, 15 May 2016 11:44:18 +0100 Subject: [Microbit-Python] UART Pins In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: Read the docs ;-) http://microbit-micropython.readthedocs.io/en/latest/uart.html You can specify *any other pins* you want by passing the desired pin objects to the tx and rxparameters. David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 15 May 2016 at 11:09, Nevil Hunt wrote: > Hi David, > > My micro:bit diagram shows the I2C and SPI pins on the edge connector. > Which are the UART Tx & Rx pins? > > Nevil > > ------------------------------ > Date: Sat, 14 May 2016 16:05:57 +0100 > From: david at thinkingbinaries.com > To: microbit at python.org > Subject: Re: [Microbit-Python] Introducing myself > > How about a BBC micro talking to a BBC micro:bit over serial? The RS422 > interface at the back of the original beeb is just a UART. Need a level > shifter, then bring into UART pins on the expansion pads at the bottom of > the micro:bit and use MicroPython UART object. > > > _______________________________________________ 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Sun May 15 08:01:01 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Sun, 15 May 2016 13:01:01 +0100 Subject: [Microbit-Python] I/O pins pull-up/down/float Message-ID: <003d01d1aea1$748361b0$5d8a2510$@gmail.com> Hi Folks, I see that the micro:bit runtime defines a pin mode for the GPIO internal pull-ups: Int setPull ( PinMode pull) Description Configures the pull of this pin. Parameters? PinMode pull - one of the mbed pull configurations: PullUp, PullDown, PullNone Returns MICROBIT_NOT_SUPPORTED if the current pin configuration is anything other than a digital input, otherwise MICROBIT_OK. But I don?t see this abstracted to any of the end-user coding environments (I may be wrong ? be gentle with me as I am still getting up to speed here). Is there a default behaviour for I/O pullups/downs/floats or a recommended way to handle this with MicroPython on the micro:bit? Tldr; I am deciding whether I need external pullups/downs on a board I am developing. Thanks. Nigel Kendrick --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at benmr.com Sun May 15 08:19:54 2016 From: ben at benmr.com (Ben Mustill-Rose) Date: Sun, 15 May 2016 13:19:54 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: <12DCA664-B042-4D28-9541-44A23D387C5D@gmail.com> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> <12DCA664-B042-4D28-9541-44A23D387C5D@gmail.com> Message-ID: Hi Nigel & welcome to the list! I suppose I should post some photos: http://imgur.com/g04VmyB FYI that's a Sharp MZ80a that I was gifted around 15 years ago. Unfortunately I turned it on last year & it started smoking - a quick look inside suggests that at minimum some of the caps need replacing. I'm not sure if I can make this next one even remotely on-topic, but since you work for WD, we're doing old versus new & I collect hard drives: http://imgur.com/KXflrSb The (physically) larger one is a Miniscribe 2012 20MB 3600RPM? 5.25 MFM drive & the other one is a WD40EFRX 4TB 5400RPM SATA III. Cheers, Ben. On 5/14/16, Andrew Ferguson 500 wrote: > Absolutely, that is something I'll look into. > > Unfortunately it is unlikely I'll have time for this before the end of May - > I am currently in the middle of my Higher exams and so don't have time for > much else. But once they finish I'll see how it could be done. > > Andrew > > On 14 May 2016, at 19:19, Joe Glancy wrote: > >> That sounds like a good idea - would that be possible with your working >> Micro Andrew? The Micro displaying "Hello micro:bit!" on some sort of >> terminal (as though it's actually saying that), and the micro:bit >> responding back by scrolling "Hello Micro!" (or the other way around. >> >> >> On Sat, 14 May 2016, 16:06 David Whale, >> wrote: >> How about a BBC micro talking to a BBC micro:bit over serial? The RS422 >> interface at the back of the original beeb is just a UART. Need a level >> shifter, then bring into UART pins on the expansion pads at the bottom of >> the micro:bit and use MicroPython UART object. >> >> _______________________________________________ >> 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 > From joe.t.glancy at gmail.com Sun May 15 08:21:01 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Sun, 15 May 2016 12:21:01 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: That's a good point - embedding pyserial would certainly make it more portable, as it doesn't depend on anything else except standard modules then. The only (small) limitation with a zero install is that scripts would have to be in the same location as the module's directory, but that's hardly an issue. On Sun, 15 May 2016, 10:42 David Whale, wrote: > Joe and Andrew, > > Just a comment about this, please read this article, and consider > *changing* how you package this, especially for teachers: > > https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ > > The version that I wrote back in August 2015 is zero install - yes, ZERO > install. All a teacher has to do is to press the DownloadZip button, unzip > it, and run it. This is VITAL for teachers to use these resources, > especially on a Raspberry Pi where mostly they are not connected to the > internet most of the time. Most of the time they want to just grab a file > on a USB memory stick, and copy it over. sudo pip install is *useless* in > this situation. > > Raspberry Pi's are mostly not connected to the internet in schools, > because it stores the wifi password in plain text in the config file, and > school IT technicians ban the teachers from using them for this reason (as > it exposes the password to the kids, and then all their phones start > connecting to the wifi and makes it crash). Really, this is a big problem, > believe me! > > The way I did this was to *embed* pyserial into the package (and the > licence allows for this providing you are clear about the containing > licence). Please see my original here: > https://github.com/whaleygeek/mb_remote and you will see this works > really great. There is also a little bit of python magic in the file (it > modifies the sys.path inplace) to make sure that this happens > automatically. (you need to make this Python 3 safe still, of course). > > Can I strongly urge you to make it zero install? It'll get adopted really > quickly that way. > > I've had a number of chats with teachers already about this and they are > really excited about it, but they said to me 'ah, it's all that sudo pip > stuff, that never works for us'. Lots of teachers I speak to gave in with > PyGameZero because they couldn't get it to install. > > Thanks > > David > > > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 14 May 2016 at 22:54, Joe Glancy wrote: > >> Thanks David :) >> >> I'll see if I can find that demo and get it up and working with this >> module - would be nice to have some examples with it where it can interact >> with things such as MCPI straight out of the box. >> >> And indeed it does make an excellent addon, mostly thanks to the pretty >> much universal serial interface it uses to communicate (which allows it to >> be easily interfaced on many platforms with minimal (or even none) setup >> required). >> >> As a matter of fact, I thought up of something very similar to this but >> which communicated over Bluetooth instead a while ago (using a stock >> micro:bit image), with a Raspberry Pi 3 and micro:bit as use case. >> Unfortunately, I found it impossible to get the micro:bit to work properly >> with BlueZ, despite some help from the BlueZ IRC and Linux Bluetooth >> mailing list.This kind of lead to the wired approach you see now. Maybe the >> recent BlueZ updates will fix this, so that a wireless alternative to this >> module exists too. >> >> On Sat, 14 May 2016, 22:25 David Whale, >> wrote: >> >>> Looks great, Joe and Andrew! >>> >>> Yes, I wrote this original mb_remote version back in August 2015, but >>> the Python API on the micro:bit changed many times since then and I've been >>> too busy to maintain it. However, it's great to see this moving forward. >>> There are some really nice use cases (especially micro:bit + Raspberry Pi) >>> where this sort of approach is both really useful and great fun, as I >>> discovered with my early tests. >>> >>> The 'flying xwing in minecraft with a micro:bit' that Martin and I did, >>> was really the inspiration for me writing the mb_remote, more to get a feel >>> for what it would look like than anything else. I had come to the >>> conclusion that the micro:bit makes a great peripheral for other computers, >>> what with it's onboard sensors and I/O pins, and having a really quick way >>> to extend your python from the host PC onto the micro:bit is really fun. >>> >>> I'm also glad to see you take forward the idea of poking commands into >>> the REPL and getting responses (that's much better than having to load >>> custom firmware onto the micro:bit, as other solutions tend to go for). >>> >>> David >>> >>> >>> ___________________________________________________________ >>> David Whale, B.Sc (Hons), MIET >>> *Software Engineer and IET Schools Liaison Officer, Essex* >>> >>> >>> On 14 May 2016 at 20:58, Joe Glancy wrote: >>> >>>> Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for >>>> first starting this) have been working on something similar to David's >>>> mb_remote module for Python, called microperi (micro-peripheral, as that is >>>> what the micro:bit becomes :). It is currently (and very much) an alpha >>>> work-in-progress, and I'm only informing everyone here about it because we >>>> need testers and, more importantly, feedback. >>>> >>>> It lives at https://github.com/JoeGlancy/microperi, and because none >>>> of the install methods (pip3/python3 setup.py install) work properly as of >>>> now, the best way to try it is just create your scripts in the same >>>> directory where the docs (README, CONTRIBUTING etc) are and use `import >>>> microperi` (check out the example in the README for a bit of a better >>>> howto). >>>> >>>> It exposes almost all of the micro:bit's MicroPython `microbit` module, >>>> which is completely available through a microperi.Microbit object. This is >>>> actually one of the things that I'd like feedback about; see below for more >>>> information (I don't think I've explained this too well, but it's the best >>>> I could think of and word). If you just want to try it out, get cloning and >>>> give it a whirl. Anything you spot as a bug or something you feel needs to >>>> be improved/implemented, just create an issue or submit a PR (check >>>> CONTRIBUTING.rst first though). >>>> >>>> We decided on the Microbit object (instead of one pre-set object called >>>> `microperi.microbit`, which it actually was originally) so that multiple >>>> micro:bits can be used at the same time. The constructor is: >>>> >>>> microperi.Microbit(port=None) >>>> >>>> If port is not specified, the module will automatically detect the >>>> first available micro:bit and use that one (Nick, the finding code is from >>>> microrepl - could you comment on licensing please?). Otherwise, `port` must >>>> be a string determining the serial port which the micro:bit is connected to >>>> (e.g: /dev/ttyACM0, COM1, etc). >>>> >>>> Usual usage of the object is along the following lines (or, more >>>> literal, line): >>>> >>>> microbit = microperi.Microbit() >>>> >>>> and then things like the microbit.Image class are available through >>>> `microbit.Image`. However, if I were to call the micro:bit object a >>>> different name in my script (such as "uBit"), the Image class would be >>>> accessible as uBit.Image, which deviates from the MicroPython API. However, >>>> we did not want to place things like the Image & pin classes in somewhere >>>> like `microperi.microbit.Class_name` because then you'd have a bit of a >>>> mess like so: >>>> >>>> from microperi import * >>>> uBit = Microbit() >>>> solid = microbit.Image.SNAKE >>>> uBit.display.show(solid) >>>> >>>> because some things (e.g: microbit.i2c.read) would be accessible >>>> through `uBit.i2c.read`, and others (e.g: microbit.Image) would be >>>> accessible through `microbit.Image`, when they both should be under >>>> `microbit.X`, if you understand what I mean. >>>> >>>> The best solution for this currently is just calling the object >>>> `microbit`, and then everything will be as it should, but if you don't some >>>> things will be in different places. >>>> >>>> Anyway, I hope that this module will prove itself useful for people and >>>> perhaps even in the classroom, as it notably allows not only use of the >>>> microbit module but also every other Python 3 module out there, allowing >>>> much more powerful (possibly IoT integrated?) scripts to be created on a >>>> much more powerful machine. I look forward to any feedback, and hope for a >>>> proper, stable release (with documentation of some sort) sometime soon. >>>> >>>> _______________________________________________ >>>> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Sun May 15 11:13:13 2016 From: david at thinkingbinaries.com (David Whale) Date: Sun, 15 May 2016 16:13:13 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: Hi Joe, Yes, but the way we typically do this is to unzip the package directory into the users project directory. That's how I do it with the anyio library I wrote for my minecraft book, and that's ow the original mb_remote works. i.e. if the user project directory is my_awesome_project ...and if there is a file my_awesome_project/test1.py ...and if there is a folder my_awesome_project/microbit ...then when you import microbit in test1.py, it all works. The embedded serial folder inside the microbit folder (with it's magic sys.path modifier) just makes it all work seamlessly. It really is very simple to use. Lines 28..33 here: https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 Teachers hate it when you have to run install scripts and need admin access, because (a) it means you have to beg to the IT technician which sometimes takes months (literally), and (b) it means that they have to consider which machines are configured correctly and which are not. If all you have to do is unzip a folder and start coding, it's *really* simple. They can even give the instructions to the kids and they can just unzip the file into their user directory and it all works seamlessly. In one school, it took the technician 3 months (of continuous teacher begging) to get python installed, just so they could run the GCSE controlled assessments. David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 15 May 2016 at 13:21, Joe Glancy wrote: > That's a good point - embedding pyserial would certainly make it more > portable, as it doesn't depend on anything else except standard modules > then. The only (small) limitation with a zero install is that scripts would > have to be in the same location as the module's directory, but that's > hardly an issue. > > On Sun, 15 May 2016, 10:42 David Whale, > wrote: > >> Joe and Andrew, >> >> Just a comment about this, please read this article, and consider >> *changing* how you package this, especially for teachers: >> >> https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ >> >> The version that I wrote back in August 2015 is zero install - yes, ZERO >> install. All a teacher has to do is to press the DownloadZip button, unzip >> it, and run it. This is VITAL for teachers to use these resources, >> especially on a Raspberry Pi where mostly they are not connected to the >> internet most of the time. Most of the time they want to just grab a file >> on a USB memory stick, and copy it over. sudo pip install is *useless* in >> this situation. >> >> Raspberry Pi's are mostly not connected to the internet in schools, >> because it stores the wifi password in plain text in the config file, and >> school IT technicians ban the teachers from using them for this reason (as >> it exposes the password to the kids, and then all their phones start >> connecting to the wifi and makes it crash). Really, this is a big problem, >> believe me! >> >> The way I did this was to *embed* pyserial into the package (and the >> licence allows for this providing you are clear about the containing >> licence). Please see my original here: >> https://github.com/whaleygeek/mb_remote and you will see this works >> really great. There is also a little bit of python magic in the file (it >> modifies the sys.path inplace) to make sure that this happens >> automatically. (you need to make this Python 3 safe still, of course). >> >> Can I strongly urge you to make it zero install? It'll get adopted really >> quickly that way. >> >> I've had a number of chats with teachers already about this and they are >> really excited about it, but they said to me 'ah, it's all that sudo pip >> stuff, that never works for us'. Lots of teachers I speak to gave in with >> PyGameZero because they couldn't get it to install. >> >> Thanks >> >> David >> >> >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 14 May 2016 at 22:54, Joe Glancy wrote: >> >>> Thanks David :) >>> >>> I'll see if I can find that demo and get it up and working with this >>> module - would be nice to have some examples with it where it can interact >>> with things such as MCPI straight out of the box. >>> >>> And indeed it does make an excellent addon, mostly thanks to the pretty >>> much universal serial interface it uses to communicate (which allows it to >>> be easily interfaced on many platforms with minimal (or even none) setup >>> required). >>> >>> As a matter of fact, I thought up of something very similar to this but >>> which communicated over Bluetooth instead a while ago (using a stock >>> micro:bit image), with a Raspberry Pi 3 and micro:bit as use case. >>> Unfortunately, I found it impossible to get the micro:bit to work properly >>> with BlueZ, despite some help from the BlueZ IRC and Linux Bluetooth >>> mailing list.This kind of lead to the wired approach you see now. Maybe the >>> recent BlueZ updates will fix this, so that a wireless alternative to this >>> module exists too. >>> >>> On Sat, 14 May 2016, 22:25 David Whale, >>> wrote: >>> >>>> Looks great, Joe and Andrew! >>>> >>>> Yes, I wrote this original mb_remote version back in August 2015, but >>>> the Python API on the micro:bit changed many times since then and I've been >>>> too busy to maintain it. However, it's great to see this moving forward. >>>> There are some really nice use cases (especially micro:bit + Raspberry Pi) >>>> where this sort of approach is both really useful and great fun, as I >>>> discovered with my early tests. >>>> >>>> The 'flying xwing in minecraft with a micro:bit' that Martin and I did, >>>> was really the inspiration for me writing the mb_remote, more to get a feel >>>> for what it would look like than anything else. I had come to the >>>> conclusion that the micro:bit makes a great peripheral for other computers, >>>> what with it's onboard sensors and I/O pins, and having a really quick way >>>> to extend your python from the host PC onto the micro:bit is really fun. >>>> >>>> I'm also glad to see you take forward the idea of poking commands into >>>> the REPL and getting responses (that's much better than having to load >>>> custom firmware onto the micro:bit, as other solutions tend to go for). >>>> >>>> David >>>> >>>> >>>> ___________________________________________________________ >>>> David Whale, B.Sc (Hons), MIET >>>> *Software Engineer and IET Schools Liaison Officer, Essex* >>>> >>>> >>>> On 14 May 2016 at 20:58, Joe Glancy wrote: >>>> >>>>> Myself and Andrew (Mulholland, @gbaman on GitHub - credit to him for >>>>> first starting this) have been working on something similar to David's >>>>> mb_remote module for Python, called microperi (micro-peripheral, as that is >>>>> what the micro:bit becomes :). It is currently (and very much) an alpha >>>>> work-in-progress, and I'm only informing everyone here about it because we >>>>> need testers and, more importantly, feedback. >>>>> >>>>> It lives at https://github.com/JoeGlancy/microperi, and because none >>>>> of the install methods (pip3/python3 setup.py install) work properly as of >>>>> now, the best way to try it is just create your scripts in the same >>>>> directory where the docs (README, CONTRIBUTING etc) are and use `import >>>>> microperi` (check out the example in the README for a bit of a better >>>>> howto). >>>>> >>>>> It exposes almost all of the micro:bit's MicroPython `microbit` >>>>> module, which is completely available through a microperi.Microbit object. >>>>> This is actually one of the things that I'd like feedback about; see below >>>>> for more information (I don't think I've explained this too well, but it's >>>>> the best I could think of and word). If you just want to try it out, get >>>>> cloning and give it a whirl. Anything you spot as a bug or something you >>>>> feel needs to be improved/implemented, just create an issue or submit a PR >>>>> (check CONTRIBUTING.rst first though). >>>>> >>>>> We decided on the Microbit object (instead of one pre-set object >>>>> called `microperi.microbit`, which it actually was originally) so that >>>>> multiple micro:bits can be used at the same time. The constructor is: >>>>> >>>>> microperi.Microbit(port=None) >>>>> >>>>> If port is not specified, the module will automatically detect the >>>>> first available micro:bit and use that one (Nick, the finding code is from >>>>> microrepl - could you comment on licensing please?). Otherwise, `port` must >>>>> be a string determining the serial port which the micro:bit is connected to >>>>> (e.g: /dev/ttyACM0, COM1, etc). >>>>> >>>>> Usual usage of the object is along the following lines (or, more >>>>> literal, line): >>>>> >>>>> microbit = microperi.Microbit() >>>>> >>>>> and then things like the microbit.Image class are available through >>>>> `microbit.Image`. However, if I were to call the micro:bit object a >>>>> different name in my script (such as "uBit"), the Image class would be >>>>> accessible as uBit.Image, which deviates from the MicroPython API. However, >>>>> we did not want to place things like the Image & pin classes in somewhere >>>>> like `microperi.microbit.Class_name` because then you'd have a bit of a >>>>> mess like so: >>>>> >>>>> from microperi import * >>>>> uBit = Microbit() >>>>> solid = microbit.Image.SNAKE >>>>> uBit.display.show(solid) >>>>> >>>>> because some things (e.g: microbit.i2c.read) would be accessible >>>>> through `uBit.i2c.read`, and others (e.g: microbit.Image) would be >>>>> accessible through `microbit.Image`, when they both should be under >>>>> `microbit.X`, if you understand what I mean. >>>>> >>>>> The best solution for this currently is just calling the object >>>>> `microbit`, and then everything will be as it should, but if you don't some >>>>> things will be in different places. >>>>> >>>>> Anyway, I hope that this module will prove itself useful for people >>>>> and perhaps even in the classroom, as it notably allows not only use of the >>>>> microbit module but also every other Python 3 module out there, allowing >>>>> much more powerful (possibly IoT integrated?) scripts to be created on a >>>>> much more powerful machine. I look forward to any feedback, and hope for a >>>>> proper, stable release (with documentation of some sort) sometime soon. >>>>> >>>>> _______________________________________________ >>>>> 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 >> > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Sun May 15 11:23:18 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Sun, 15 May 2016 16:23:18 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> <12DCA664-B042-4D28-9541-44A23D387C5D@gmail.com> Message-ID: <007201d1aebd$b6741d50$235c57f0$@gmail.com> I dug out the Acorn System 1 for a pic... http://i.imgur.com/eTgF48e.jpg -- Nigel -----Original Message----- From: Microbit [mailto:microbit-bounces+nigel.kendrick=gmail.com at python.org] On Behalf Of Ben Mustill-Rose Sent: 15 May 2016 13:20 To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] Introducing myself Hi Nigel & welcome to the list! I suppose I should post some photos: http://imgur.com/g04VmyB FYI that's a Sharp MZ80a that I was gifted around 15 years ago. Unfortunately I turned it on last year & it started smoking - a quick look inside suggests that at minimum some of the caps need replacing. I'm not sure if I can make this next one even remotely on-topic, but since you work for WD, we're doing old versus new & I collect hard drives: http://imgur.com/KXflrSb The (physically) larger one is a Miniscribe 2012 20MB 3600RPM? 5.25 MFM drive & the other one is a WD40EFRX 4TB 5400RPM SATA III. Cheers, Ben. On 5/14/16, Andrew Ferguson 500 wrote: > Absolutely, that is something I'll look into. > > Unfortunately it is unlikely I'll have time for this before the end of > May - I am currently in the middle of my Higher exams and so don't > have time for much else. But once they finish I'll see how it could be done. > > Andrew > > On 14 May 2016, at 19:19, Joe Glancy wrote: > >> That sounds like a good idea - would that be possible with your >> working Micro Andrew? The Micro displaying "Hello micro:bit!" on some >> sort of terminal (as though it's actually saying that), and the >> micro:bit responding back by scrolling "Hello Micro!" (or the other way around. >> >> >> On Sat, 14 May 2016, 16:06 David Whale, >> wrote: >> How about a BBC micro talking to a BBC micro:bit over serial? The >> RS422 interface at the back of the original beeb is just a UART. Need >> a level shifter, then bring into UART pins on the expansion pads at >> the bottom of the micro:bit and use MicroPython UART object. >> >> _______________________________________________ >> 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 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From nevil.hunt at hotmail.co.uk Sun May 15 12:22:52 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Sun, 15 May 2016 17:22:52 +0100 Subject: [Microbit-Python] UART Pins In-Reply-To: References: , , <010801d1ad5c$e3408d30$a9c1a790$@gmail.com>, <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org>, <002901d1ade0$a8fd09d0$faf71d70$@gmail.com>, , , , Message-ID: Thanks David! I take it using P3,4,5,6,7,9,10 or 11 would interfere with the LEDs & Switches on the micro:bit. What about using the SPI or I2C pins? Is there anything on the micro:bit hanging off any of these pins that would conflict with the UART? Nevil Date: Sun, 15 May 2016 11:44:18 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] UART Pins Read the docs ;-) http://microbit-micropython.readthedocs.io/en/latest/uart.html You can specify any other pins you want by passing the desired pin objects to the tx and rxparameters. David ___________________________________________________________ David Whale, B.Sc (Hons), MIET Software Engineer and IET Schools Liaison Officer, Essex On 15 May 2016 at 11:09, Nevil Hunt wrote: Hi David, My micro:bit diagram shows the I2C and SPI pins on the edge connector. Which are the UART Tx & Rx pins? Nevil Date: Sat, 14 May 2016 16:05:57 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] Introducing myself How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Austin at arm.com Sun May 15 14:50:05 2016 From: Jonathan.Austin at arm.com (Jonathan Austin) Date: Sun, 15 May 2016 18:50:05 +0000 Subject: [Microbit-Python] UART Pins In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> On 15 May 2016, at 17:22, Nevil Hunt > wrote: Thanks David! I take it using P3,4,5,6,7,9,10 or 11 would interfere with the LEDs & Switches on the micro:bit. That?s correct - from the ?DAL? there?s a way to turn off the display to use these, if you really need them :) Looking at https://microbit-micropython.readthedocs.io/en/latest/display.html I don?t see an equivalent from MicroPython - can anyone comment on whether there?s a way to do this? What about using the SPI or I2C pins? Is there anything on the micro:bit hanging off any of these pins that would conflict with the UART? The on-board accelerometer and magnetometer are hanging off I2C, but nothing on-board is using SPI, so you shouldn?t have any trouble using those :) Do you think there?s value in a convention for tx/rx on the edge connector? Joe and I had previously discussed suggesting this is P0 and P1 (the first two big rings) which would allow two micro:bits to be turned face-to-face and connected through those rings and then talk to each other! Jonny Nevil ________________________________ Date: Sun, 15 May 2016 11:44:18 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] UART Pins Read the docs ;-) http://microbit-micropython.readthedocs.io/en/latest/uart.html You can specify any other pins you want by passing the desired pin objects to the tx and rxparameters. David ___________________________________________________________ David Whale, B.Sc (Hons), MIET Software Engineer and IET Schools Liaison Officer, Essex On 15 May 2016 at 11:09, Nevil Hunt > wrote: Hi David, My micro:bit diagram shows the I2C and SPI pins on the edge connector. Which are the UART Tx & Rx pins? Nevil ________________________________ Date: Sat, 14 May 2016 16:05:57 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] Introducing myself How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. _______________________________________________ Microbit mailing listMicrobit 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.orghttps://mail.python.org/mailman/listinfo/microbit _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Mon May 16 03:39:44 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 08:39:44 +0100 Subject: [Microbit-Python] Introducing myself In-Reply-To: References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> Message-ID: On 14/05/16 22:15, David Whale wrote: > Copious notes here, for setting up the BBC Micro serial port: > > http://www.brahms.demon.co.uk/software/downloads/serial-cable.txt > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > Boy oh boy... seeing BBC basic again after all those years is a wonderful start to my Monday morning. It's how 9yo me learned to program and I wouldn't be a developer if it were not for the BBC micro. Not sure why they author puts the screen into MODE 0 at the start. That'd just immediately take up 20k of RAM and make the output amazingly difficult to read. Here's hoping MicroPython and the BBC micro:bit have a similar legacy for many others. N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From ntoll at ntoll.org Mon May 16 03:42:05 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 08:42:05 +0100 Subject: [Microbit-Python] UART Pins In-Reply-To: <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> Message-ID: <5a63b513-584a-88bb-69ef-df41fe5cb7d0@ntoll.org> On 15/05/16 19:50, Jonathan Austin wrote: > Looking > at https://microbit-micropython.readthedocs.io/en/latest/display.html I > don?t see an equivalent from MicroPython - can anyone comment on whether > there?s a way to do this? Calling Mark Shannon... ;-) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From ntoll at ntoll.org Mon May 16 03:47:45 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 08:47:45 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: Message-ID: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> For the Mu editor Carlos did some amazing work in automatically building a stand-alone executable for Windows, OSX and Linux. Of course, Windows will complain if you try to run a stand-alone executable and warn you to the extent that you'll imagine the world is about to end, but there you go. Unfortunately, the real problem (the way schools organise their IT) is impossible for us to fix. Ergo all this faffing about. Nevertheless, it's worth it when teachers and kids get their hands on the good stuff. Best wishes, N. On 15/05/16 16:13, David Whale wrote: > Hi Joe, > > Yes, but the way we typically do this is to unzip the package directory > into the users project directory. That's how I do it with the anyio > library I wrote for my minecraft book, and that's ow the original > mb_remote works. > > i.e. if the user project directory is my_awesome_project > ...and if there is a file my_awesome_project/test1.py > ...and if there is a folder my_awesome_project/microbit > > ...then when you import microbit in test1.py, it all works. > > The embedded serial folder inside the microbit folder (with it's magic > sys.path modifier) just makes it all work seamlessly. > > It really is very simple to use. > > Lines 28..33 > here: https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 > > > Teachers hate it when you have to run install scripts and need admin > access, because (a) it means you have to beg to the IT technician which > sometimes takes months (literally), and (b) it means that they have to > consider which machines are configured correctly and which are not. > > If all you have to do is unzip a folder and start coding, it's *really* > simple. They can even give the instructions to the kids and they can > just unzip the file into their user directory and it all works seamlessly. > > In one school, it took the technician 3 months (of continuous teacher > begging) to get python installed, just so they could run the GCSE > controlled assessments. > > David > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 15 May 2016 at 13:21, Joe Glancy > wrote: > > That's a good point - embedding pyserial would certainly make it > more portable, as it doesn't depend on anything else except standard > modules then. The only (small) limitation with a zero install is > that scripts would have to be in the same location as the module's > directory, but that's hardly an issue. > > > On Sun, 15 May 2016, 10:42 David Whale, > wrote: > > Joe and Andrew, > > Just a comment about this, please read this article, and > consider *changing* how you package this, especially for teachers: > > https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ > > The version that I wrote back in August 2015 is zero install - > yes, ZERO install. All a teacher has to do is to press the > DownloadZip button, unzip it, and run it. This is VITAL for > teachers to use these resources, especially on a Raspberry Pi > where mostly they are not connected to the internet most of the > time. Most of the time they want to just grab a file on a USB > memory stick, and copy it over. sudo pip install is *useless* in > this situation. > > Raspberry Pi's are mostly not connected to the internet in > schools, because it stores the wifi password in plain text in > the config file, and school IT technicians ban the teachers from > using them for this reason (as it exposes the password to the > kids, and then all their phones start connecting to the wifi and > makes it crash). Really, this is a big problem, believe me! > > The way I did this was to *embed* pyserial into the package (and > the licence allows for this providing you are clear about the > containing licence). Please see my original > here: https://github.com/whaleygeek/mb_remote and you will see > this works really great. There is also a little bit of python > magic in the file (it modifies the sys.path inplace) to make > sure that this happens automatically. (you need to make this > Python 3 safe still, of course). > > Can I strongly urge you to make it zero install? It'll get > adopted really quickly that way. > > I've had a number of chats with teachers already about this and > they are really excited about it, but they said to me 'ah, it's > all that sudo pip stuff, that never works for us'. Lots of > teachers I speak to gave in with PyGameZero because they > couldn't get it to install. > > Thanks > > David > > > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 14 May 2016 at 22:54, Joe Glancy > wrote: > > Thanks David :) > > I'll see if I can find that demo and get it up and working > with this module - would be nice to have some examples with > it where it can interact with things such as MCPI straight > out of the box. > > And indeed it does make an excellent addon, mostly thanks to > the pretty much universal serial interface it uses to > communicate (which allows it to be easily interfaced on many > platforms with minimal (or even none) setup required). > > As a matter of fact, I thought up of something very similar > to this but which communicated over Bluetooth instead a > while ago (using a stock micro:bit image), with a Raspberry > Pi 3 and micro:bit as use case. Unfortunately, I found it > impossible to get the micro:bit to work properly with BlueZ, > despite some help from the BlueZ IRC and Linux Bluetooth > mailing list.This kind of lead to the wired approach you see > now. Maybe the recent BlueZ updates will fix this, so that a > wireless alternative to this module exists too. > > > On Sat, 14 May 2016, 22:25 David Whale, > > wrote: > > Looks great, Joe and Andrew! > > Yes, I wrote this original mb_remote version back in > August 2015, but the Python API on the micro:bit changed > many times since then and I've been too busy to maintain > it. However, it's great to see this moving forward. > There are some really nice use cases (especially > micro:bit + Raspberry Pi) where this sort of approach is > both really useful and great fun, as I discovered with > my early tests. > > The 'flying xwing in minecraft with a micro:bit' that > Martin and I did, was really the inspiration for me > writing the mb_remote, more to get a feel for what it > would look like than anything else. I had come to the > conclusion that the micro:bit makes a great peripheral > for other computers, what with it's onboard sensors and > I/O pins, and having a really quick way to extend your > python from the host PC onto the micro:bit is really fun. > > I'm also glad to see you take forward the idea of poking > commands into the REPL and getting responses (that's > much better than having to load custom firmware onto the > micro:bit, as other solutions tend to go for). > > David > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 14 May 2016 at 20:58, Joe Glancy > > > wrote: > > Myself and Andrew (Mulholland, @gbaman on GitHub - > credit to him for first starting this) have been > working on something similar to David's mb_remote > module for Python, called microperi > (micro-peripheral, as that is what the micro:bit > becomes :). It is currently (and very much) an alpha > work-in-progress, and I'm only informing everyone > here about it because we need testers and, more > importantly, feedback. > > It lives at https://github.com/JoeGlancy/microperi, > and because none of the install methods > (pip3/python3 setup.py install) work properly as of > now, the best way to try it is just create your > scripts in the same directory where the docs > (README, CONTRIBUTING etc) are and use `import > microperi` (check out the example in the README for > a bit of a better howto). > > It exposes almost all of the micro:bit's MicroPython > `microbit` module, which is completely available > through a microperi.Microbit object. This is > actually one of the things that I'd like feedback > about; see below for more information (I don't think > I've explained this too well, but it's the best I > could think of and word). If you just want to try it > out, get cloning and give it a whirl. Anything you > spot as a bug or something you feel needs to be > improved/implemented, just create an issue or submit > a PR (check CONTRIBUTING.rst first though). > > We decided on the Microbit object (instead of one > pre-set object called `microperi.microbit`, which it > actually was originally) so that multiple micro:bits > can be used at the same time. The constructor is: > > microperi.Microbit(port=None) > > If port is not specified, the module will > automatically detect the first available micro:bit > and use that one (Nick, the finding code is from > microrepl - could you comment on licensing please?). > Otherwise, `port` must be a string determining the > serial port which the micro:bit is connected to > (e.g: /dev/ttyACM0, COM1, etc). > > Usual usage of the object is along the following > lines (or, more literal, line): > > microbit = microperi.Microbit() > > and then things like the microbit.Image class are > available through `microbit.Image`. However, if I > were to call the micro:bit object a different name > in my script (such as "uBit"), the Image class would > be accessible as uBit.Image, which deviates from the > MicroPython API. However, we did not want to place > things like the Image & pin classes in somewhere > like `microperi.microbit.Class_name` because then > you'd have a bit of a mess like so: > > from microperi import * > uBit = Microbit() > solid = microbit.Image.SNAKE > uBit.display.show(solid) > > because some things (e.g: microbit.i2c.read) would > be accessible through `uBit.i2c.read`, and others > (e.g: microbit.Image) would be accessible through > `microbit.Image`, when they both should be under > `microbit.X`, if you understand what I mean. > > The best solution for this currently is just calling > the object `microbit`, and then everything will be > as it should, but if you don't some things will be > in different places. > > Anyway, I hope that this module will prove itself > useful for people and perhaps even in the classroom, > as it notably allows not only use of the microbit > module but also every other Python 3 module out > there, allowing much more powerful (possibly IoT > integrated?) scripts to be created on a much more > powerful machine. I look forward to any feedback, > and hope for a proper, stable release (with > documentation of some sort) sometime soon. > > _______________________________________________ > 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 > > > _______________________________________________ > 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From gw14raduzkyronen at glow.ea.glasgow.sch.uk Sat May 14 13:20:35 2016 From: gw14raduzkyronen at glow.ea.glasgow.sch.uk (Ronen Raduzky) Date: Sat, 14 May 2016 17:20:35 +0000 Subject: [Microbit-Python] Servo Module for microbit Message-ID: Hello my name is Ronen, I have a microbit and I got a hold of a breakout board and I want to try and connect a servo to it. But there is nothing in the guide talking about the servo. Is it possible that you could help me with this problem. Could you also assist me on how to write a module for microbit python. Thank You Ronen Raduzky -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Mon May 16 04:13:19 2016 From: david at thinkingbinaries.com (David Whale) Date: Mon, 16 May 2016 09:13:19 +0100 Subject: [Microbit-Python] Servo Module for microbit In-Reply-To: References: Message-ID: Try the world tour, lots of people used Servos in MicroPython on that... https://microworldtour.github.io/microbit/monifa.html David -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at hotpy.org Mon May 16 04:17:53 2016 From: mark at hotpy.org (Mark Shannon) Date: Mon, 16 May 2016 01:17:53 -0700 Subject: [Microbit-Python] UART Pins In-Reply-To: <5a63b513-584a-88bb-69ef-df41fe5cb7d0@ntoll.org> References: <010801d1ad5c$e3408d30$a9c1a790$@gmail.com> <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org> <002901d1ade0$a8fd09d0$faf71d70$@gmail.com> <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> <5a63b513-584a-88bb-69ef-df41fe5cb7d0@ntoll.org> Message-ID: <57398231.5060400@hotpy.org> The short answer is "no". It would be quite easy to add though: https://github.com/bbcmicrobit/micropython/issues/274 On 16/05/16 00:42, Nicholas H.Tollervey wrote: > On 15/05/16 19:50, Jonathan Austin wrote: >> Looking >> at https://microbit-micropython.readthedocs.io/en/latest/display.html I >> don?t see an equivalent from MicroPython - can anyone comment on whether >> there?s a way to do this? > > > Calling Mark Shannon... ;-) > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From david at thinkingbinaries.com Mon May 16 04:18:21 2016 From: david at thinkingbinaries.com (David Whale) Date: Mon, 16 May 2016 09:18:21 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> Message-ID: I think it's not really how schools organise their IT that is the problem. It's us developers who assume that *everyone else* is happy with spending hours downloading all sorts of things and building packages from source. I actually take sides with Laura Dixon on this one. Why should I have to download a program in order to install some other program? I don't think we're there yet as an industry. If we want to engage with schools and teachers, we have to have some better best-practices that we can all follow to make it easier and more accessible for them. Another one to add to the 'lunchtime beer and chat' agenda ;-) David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 16 May 2016 at 08:47, Nicholas H.Tollervey wrote: > For the Mu editor Carlos did some amazing work in automatically building > a stand-alone executable for Windows, OSX and Linux. > > Of course, Windows will complain if you try to run a stand-alone > executable and warn you to the extent that you'll imagine the world is > about to end, but there you go. > > Unfortunately, the real problem (the way schools organise their IT) is > impossible for us to fix. Ergo all this faffing about. Nevertheless, > it's worth it when teachers and kids get their hands on the good stuff. > > Best wishes, > > N. > > On 15/05/16 16:13, David Whale wrote: > > Hi Joe, > > > > Yes, but the way we typically do this is to unzip the package directory > > into the users project directory. That's how I do it with the anyio > > library I wrote for my minecraft book, and that's ow the original > > mb_remote works. > > > > i.e. if the user project directory is my_awesome_project > > ...and if there is a file my_awesome_project/test1.py > > ...and if there is a folder my_awesome_project/microbit > > > > ...then when you import microbit in test1.py, it all works. > > > > The embedded serial folder inside the microbit folder (with it's magic > > sys.path modifier) just makes it all work seamlessly. > > > > It really is very simple to use. > > > > Lines 28..33 > > here: > https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 > > > > > > Teachers hate it when you have to run install scripts and need admin > > access, because (a) it means you have to beg to the IT technician which > > sometimes takes months (literally), and (b) it means that they have to > > consider which machines are configured correctly and which are not. > > > > If all you have to do is unzip a folder and start coding, it's *really* > > simple. They can even give the instructions to the kids and they can > > just unzip the file into their user directory and it all works > seamlessly. > > > > In one school, it took the technician 3 months (of continuous teacher > > begging) to get python installed, just so they could run the GCSE > > controlled assessments. > > > > David > > > > > > ___________________________________________________________ > > David Whale, B.Sc (Hons), MIET > > *Software Engineer and IET Schools Liaison Officer, Essex* > > > > > > On 15 May 2016 at 13:21, Joe Glancy > > wrote: > > > > That's a good point - embedding pyserial would certainly make it > > more portable, as it doesn't depend on anything else except standard > > modules then. The only (small) limitation with a zero install is > > that scripts would have to be in the same location as the module's > > directory, but that's hardly an issue. > > > > > > On Sun, 15 May 2016, 10:42 David Whale, > > wrote: > > > > Joe and Andrew, > > > > Just a comment about this, please read this article, and > > consider *changing* how you package this, especially for > teachers: > > > > > https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ > > > > The version that I wrote back in August 2015 is zero install - > > yes, ZERO install. All a teacher has to do is to press the > > DownloadZip button, unzip it, and run it. This is VITAL for > > teachers to use these resources, especially on a Raspberry Pi > > where mostly they are not connected to the internet most of the > > time. Most of the time they want to just grab a file on a USB > > memory stick, and copy it over. sudo pip install is *useless* in > > this situation. > > > > Raspberry Pi's are mostly not connected to the internet in > > schools, because it stores the wifi password in plain text in > > the config file, and school IT technicians ban the teachers from > > using them for this reason (as it exposes the password to the > > kids, and then all their phones start connecting to the wifi and > > makes it crash). Really, this is a big problem, believe me! > > > > The way I did this was to *embed* pyserial into the package (and > > the licence allows for this providing you are clear about the > > containing licence). Please see my original > > here: https://github.com/whaleygeek/mb_remote and you will see > > this works really great. There is also a little bit of python > > magic in the file (it modifies the sys.path inplace) to make > > sure that this happens automatically. (you need to make this > > Python 3 safe still, of course). > > > > Can I strongly urge you to make it zero install? It'll get > > adopted really quickly that way. > > > > I've had a number of chats with teachers already about this and > > they are really excited about it, but they said to me 'ah, it's > > all that sudo pip stuff, that never works for us'. Lots of > > teachers I speak to gave in with PyGameZero because they > > couldn't get it to install. > > > > Thanks > > > > David > > > > > > > > > > ___________________________________________________________ > > David Whale, B.Sc (Hons), MIET > > *Software Engineer and IET Schools Liaison Officer, Essex* > > > > > > On 14 May 2016 at 22:54, Joe Glancy > > wrote: > > > > Thanks David :) > > > > I'll see if I can find that demo and get it up and working > > with this module - would be nice to have some examples with > > it where it can interact with things such as MCPI straight > > out of the box. > > > > And indeed it does make an excellent addon, mostly thanks to > > the pretty much universal serial interface it uses to > > communicate (which allows it to be easily interfaced on many > > platforms with minimal (or even none) setup required). > > > > As a matter of fact, I thought up of something very similar > > to this but which communicated over Bluetooth instead a > > while ago (using a stock micro:bit image), with a Raspberry > > Pi 3 and micro:bit as use case. Unfortunately, I found it > > impossible to get the micro:bit to work properly with BlueZ, > > despite some help from the BlueZ IRC and Linux Bluetooth > > mailing list.This kind of lead to the wired approach you see > > now. Maybe the recent BlueZ updates will fix this, so that a > > wireless alternative to this module exists too. > > > > > > On Sat, 14 May 2016, 22:25 David Whale, > > > > wrote: > > > > Looks great, Joe and Andrew! > > > > Yes, I wrote this original mb_remote version back in > > August 2015, but the Python API on the micro:bit changed > > many times since then and I've been too busy to maintain > > it. However, it's great to see this moving forward. > > There are some really nice use cases (especially > > micro:bit + Raspberry Pi) where this sort of approach is > > both really useful and great fun, as I discovered with > > my early tests. > > > > The 'flying xwing in minecraft with a micro:bit' that > > Martin and I did, was really the inspiration for me > > writing the mb_remote, more to get a feel for what it > > would look like than anything else. I had come to the > > conclusion that the micro:bit makes a great peripheral > > for other computers, what with it's onboard sensors and > > I/O pins, and having a really quick way to extend your > > python from the host PC onto the micro:bit is really fun. > > > > I'm also glad to see you take forward the idea of poking > > commands into the REPL and getting responses (that's > > much better than having to load custom firmware onto the > > micro:bit, as other solutions tend to go for). > > > > David > > > > > > > ___________________________________________________________ > > David Whale, B.Sc (Hons), MIET > > *Software Engineer and IET Schools Liaison Officer, > Essex* > > > > > > On 14 May 2016 at 20:58, Joe Glancy > > > > > wrote: > > > > Myself and Andrew (Mulholland, @gbaman on GitHub - > > credit to him for first starting this) have been > > working on something similar to David's mb_remote > > module for Python, called microperi > > (micro-peripheral, as that is what the micro:bit > > becomes :). It is currently (and very much) an alpha > > work-in-progress, and I'm only informing everyone > > here about it because we need testers and, more > > importantly, feedback. > > > > It lives at https://github.com/JoeGlancy/microperi, > > and because none of the install methods > > (pip3/python3 setup.py install) work properly as of > > now, the best way to try it is just create your > > scripts in the same directory where the docs > > (README, CONTRIBUTING etc) are and use `import > > microperi` (check out the example in the README for > > a bit of a better howto). > > > > It exposes almost all of the micro:bit's MicroPython > > `microbit` module, which is completely available > > through a microperi.Microbit object. This is > > actually one of the things that I'd like feedback > > about; see below for more information (I don't think > > I've explained this too well, but it's the best I > > could think of and word). If you just want to try it > > out, get cloning and give it a whirl. Anything you > > spot as a bug or something you feel needs to be > > improved/implemented, just create an issue or submit > > a PR (check CONTRIBUTING.rst first though). > > > > We decided on the Microbit object (instead of one > > pre-set object called `microperi.microbit`, which it > > actually was originally) so that multiple micro:bits > > can be used at the same time. The constructor is: > > > > microperi.Microbit(port=None) > > > > If port is not specified, the module will > > automatically detect the first available micro:bit > > and use that one (Nick, the finding code is from > > microrepl - could you comment on licensing please?). > > Otherwise, `port` must be a string determining the > > serial port which the micro:bit is connected to > > (e.g: /dev/ttyACM0, COM1, etc). > > > > Usual usage of the object is along the following > > lines (or, more literal, line): > > > > microbit = microperi.Microbit() > > > > and then things like the microbit.Image class are > > available through `microbit.Image`. However, if I > > were to call the micro:bit object a different name > > in my script (such as "uBit"), the Image class would > > be accessible as uBit.Image, which deviates from the > > MicroPython API. However, we did not want to place > > things like the Image & pin classes in somewhere > > like `microperi.microbit.Class_name` because then > > you'd have a bit of a mess like so: > > > > from microperi import * > > uBit = Microbit() > > solid = microbit.Image.SNAKE > > uBit.display.show(solid) > > > > because some things (e.g: microbit.i2c.read) would > > be accessible through `uBit.i2c.read`, and others > > (e.g: microbit.Image) would be accessible through > > `microbit.Image`, when they both should be under > > `microbit.X`, if you understand what I mean. > > > > The best solution for this currently is just calling > > the object `microbit`, and then everything will be > > as it should, but if you don't some things will be > > in different places. > > > > Anyway, I hope that this module will prove itself > > useful for people and perhaps even in the classroom, > > as it notably allows not only use of the microbit > > module but also every other Python 3 module out > > there, allowing much more powerful (possibly IoT > > integrated?) scripts to be created on a much more > > powerful machine. I look forward to any feedback, > > and hope for a proper, stable release (with > > documentation of some sort) sometime soon. > > > > _______________________________________________ > > 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 > > > > > > _______________________________________________ > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Mon May 16 04:31:56 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 09:31:56 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> Message-ID: <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> On 16/05/16 09:18, David Whale wrote: > I think it's not really how schools organise their IT that is the > problem. It's us developers who assume that *everyone else* is happy > with spending hours downloading all sorts of things and building > packages from source. > > I actually take sides with Laura Dixon on this one. > > Why should I have to download a program in order to install some other > program? > > I don't think we're there yet as an industry. If we want to engage with > schools and teachers, we have to have some better best-practices that we > can all follow to make it easier and more accessible for them. > > Another one to add to the 'lunchtime beer and chat' agenda ;-) > > David > Oh I'm totally with Laura and you on this. But let's be honest here, school IT is *also* a huge problem. I've spent hours talking to teachers who vent about not being able to install things because of bureaucratic reasons. Note - this is not the same problem as venting because installation is complicated, the IT infrastructure issue is because of ineffective leadership and bureaucracy. Both should be tackled, but I agree with you 100% that making things easy to install is important and, importantly, it's something we developers can help with a lot easier than, say, fixing shonky school IT infrastructure. Best wishes, N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From nevil.hunt at hotmail.co.uk Mon May 16 05:02:05 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Mon, 16 May 2016 10:02:05 +0100 Subject: [Microbit-Python] UART Pins In-Reply-To: <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> References: , , <010801d1ad5c$e3408d30$a9c1a790$@gmail.com>, <8592bb68-ad65-7c29-826d-fd29e7bf6ad2@ntoll.org>, <002901d1ade0$a8fd09d0$faf71d70$@gmail.com>, , , , , , <09A9F0F9-B36F-4AB3-98BB-FF481D94EB53@arm.com> Message-ID: Thanks Jonathan! If as you say there is nothing on the SPI pins when I need an external UART I will probably use P14 MISO as UART Rx, P15 MOSI as UART Tx. As far as a convention for using the 'major' GPIO pins for the UART my suggestion would be to use P1 & P2 as P0 is the default for generating audio. Nevil From: Jonathan.Austin at arm.com To: microbit at python.org Date: Sun, 15 May 2016 18:50:05 +0000 Subject: Re: [Microbit-Python] UART Pins On 15 May 2016, at 17:22, Nevil Hunt wrote: Thanks David! I take it using P3,4,5,6,7,9,10 or 11 would interfere with the LEDs & Switches on the micro:bit. That?s correct - from the ?DAL? there?s a way to turn off the display to use these, if you really need them :) Looking at https://microbit-micropython.readthedocs.io/en/latest/display.html I don?t see an equivalent from MicroPython - can anyone comment on whether there?s a way to do this? What about using the SPI or I2C pins? Is there anything on the micro:bit hanging off any of these pins that would conflict with the UART? The on-board accelerometer and magnetometer are hanging off I2C, but nothing on-board is using SPI, so you shouldn?t have any trouble using those :) Do you think there?s value in a convention for tx/rx on the edge connector? Joe and I had previously discussed suggesting this is P0 and P1 (the first two big rings) which would allow two micro:bits to be turned face-to-face and connected through those rings and then talk to each other! Jonny Nevil Date: Sun, 15 May 2016 11:44:18 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] UART Pins Read the docs ;-) http://microbit-micropython.readthedocs.io/en/latest/uart.html You can specify any other pins you want by passing the desired pin objects to the tx and rxparameters. David ___________________________________________________________ David Whale, B.Sc (Hons), MIET Software Engineer and IET Schools Liaison Officer, Essex On 15 May 2016 at 11:09, Nevil Hunt wrote: Hi David, My micro:bit diagram shows the I2C and SPI pins on the edge connector. Which are the UART Tx & Rx pins? Nevil Date: Sat, 14 May 2016 16:05:57 +0100 From: david at thinkingbinaries.com To: microbit at python.org Subject: Re: [Microbit-Python] Introducing myself How about a BBC micro talking to a BBC micro:bit over serial? The RS422 interface at the back of the original beeb is just a UART. Need a level shifter, then bring into UART pins on the expansion pads at the bottom of the micro:bit and use MicroPython UART object. _______________________________________________ Microbit mailing listMicrobit 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.orghttps://mail.python.org/mailman/listinfo/microbit _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.crook at gmail.com Mon May 16 05:06:27 2016 From: andy.crook at gmail.com (Andy Crook) Date: Mon, 16 May 2016 10:06:27 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> Message-ID: School IT is a massive problem. I teach computer science and the controlled assessments require linux usage this time. We don't have any linux boxes, won't get any, can't install any VM (it's too 'expensive'!) and aren't allowing kids to bring in anything of their own. On windows, they aren't able to use a terminal or run executables. So I'm just saying, if anything makes things easier to depoly and use without any rights so much the better. On 16 May 2016 at 09:31, Nicholas H.Tollervey wrote: > On 16/05/16 09:18, David Whale wrote: > > I think it's not really how schools organise their IT that is the > > problem. It's us developers who assume that *everyone else* is happy > > with spending hours downloading all sorts of things and building > > packages from source. > > > > I actually take sides with Laura Dixon on this one. > > > > Why should I have to download a program in order to install some other > > program? > > > > I don't think we're there yet as an industry. If we want to engage with > > schools and teachers, we have to have some better best-practices that we > > can all follow to make it easier and more accessible for them. > > > > Another one to add to the 'lunchtime beer and chat' agenda ;-) > > > > David > > > > Oh I'm totally with Laura and you on this. But let's be honest here, > school IT is *also* a huge problem. I've spent hours talking to teachers > who vent about not being able to install things because of bureaucratic > reasons. Note - this is not the same problem as venting because > installation is complicated, the IT infrastructure issue is because of > ineffective leadership and bureaucracy. > > Both should be tackled, but I agree with you 100% that making things > easy to install is important and, importantly, it's something we > developers can help with a lot easier than, say, fixing shonky school IT > infrastructure. > > Best wishes, > > N. > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Mon May 16 05:15:04 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 10:15:04 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> Message-ID: Andy, Your email is a perfect example of the sort of conversations I've been having with teachers. VirtualBox (https://www.virtualbox.org/) is a free VM from Oracle. If you're being told virtualization is too expensive then I'd push back hard. It doesn't need to be. That this sort of thing is annoying both developers, teachers and students is, in the long run, a good thing (tm) since people will try to fix it (where "fix" is likely to be both a technical and "organisational" solution). Hope this helps, N. On 16/05/16 10:06, Andy Crook wrote: > School IT is a massive problem. I teach computer science and the > controlled assessments require linux usage this time. We don't have any > linux boxes, won't get any, can't install any VM (it's too 'expensive'!) > and aren't allowing kids to bring in anything of their own. > > On windows, they aren't able to use a terminal or run executables. So > I'm just saying, if anything makes things easier to depoly and use > without any rights so much the better. > > On 16 May 2016 at 09:31, Nicholas H.Tollervey > wrote: > > On 16/05/16 09:18, David Whale wrote: > > I think it's not really how schools organise their IT that is the > > problem. It's us developers who assume that *everyone else* is happy > > with spending hours downloading all sorts of things and building > > packages from source. > > > > I actually take sides with Laura Dixon on this one. > > > > Why should I have to download a program in order to install some other > > program? > > > > I don't think we're there yet as an industry. If we want to engage with > > schools and teachers, we have to have some better best-practices that we > > can all follow to make it easier and more accessible for them. > > > > Another one to add to the 'lunchtime beer and chat' agenda ;-) > > > > David > > > > Oh I'm totally with Laura and you on this. But let's be honest here, > school IT is *also* a huge problem. I've spent hours talking to teachers > who vent about not being able to install things because of bureaucratic > reasons. Note - this is not the same problem as venting because > installation is complicated, the IT infrastructure issue is because of > ineffective leadership and bureaucracy. > > Both should be tackled, but I agree with you 100% that making things > easy to install is important and, importantly, it's something we > developers can help with a lot easier than, say, fixing shonky school IT > infrastructure. > > Best wishes, > > N. > > > > _______________________________________________ > 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From andy.crook at gmail.com Mon May 16 05:27:13 2016 From: andy.crook at gmail.com (Andy Crook) Date: Mon, 16 May 2016 10:27:13 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> Message-ID: Sadly our IT is run at county level who assess every suggestion and get back to us. I guess by expensive they mean technician time to dedicate to creating the custom image with all the necessary restrictions in place, then deploying it with an install of virtualbox. A couple of years ago I was told we can't have Blender installed as it would require python. Go figure. I asked for Mu to be installed on all pc's months ago. They were quick to put it on the list of jobs to be done. It's not done yet. I get the scary feeling that microbit will fall flat on its face here as we won't be able to use them in any capacity. I was thinking for next year I should tell all CS students to get a raspberry pi and an HDMI to VGA lead to connect to our monitors, so at least they can use the device properly. However, *that's* not allowed as they wouldn't be our gear, so not PAT tested etc. Rock and a hard place. However, this is getting a bit doom 'n' gloom. I hope things eventually sort out but for me progress seems glacial. On 16 May 2016 at 10:15, Nicholas H.Tollervey wrote: > Andy, > > Your email is a perfect example of the sort of conversations I've been > having with teachers. > > VirtualBox (https://www.virtualbox.org/) is a free VM from Oracle. If > you're being told virtualization is too expensive then I'd push back > hard. It doesn't need to be. > > That this sort of thing is annoying both developers, teachers and > students is, in the long run, a good thing (tm) since people will try to > fix it (where "fix" is likely to be both a technical and > "organisational" solution). > > Hope this helps, > > N. > > On 16/05/16 10:06, Andy Crook wrote: > > School IT is a massive problem. I teach computer science and the > > controlled assessments require linux usage this time. We don't have any > > linux boxes, won't get any, can't install any VM (it's too 'expensive'!) > > and aren't allowing kids to bring in anything of their own. > > > > On windows, they aren't able to use a terminal or run executables. So > > I'm just saying, if anything makes things easier to depoly and use > > without any rights so much the better. > > > > On 16 May 2016 at 09:31, Nicholas H.Tollervey > > wrote: > > > > On 16/05/16 09:18, David Whale wrote: > > > I think it's not really how schools organise their IT that is the > > > problem. It's us developers who assume that *everyone else* is > happy > > > with spending hours downloading all sorts of things and building > > > packages from source. > > > > > > I actually take sides with Laura Dixon on this one. > > > > > > Why should I have to download a program in order to install some > other > > > program? > > > > > > I don't think we're there yet as an industry. If we want to engage > with > > > schools and teachers, we have to have some better best-practices > that we > > > can all follow to make it easier and more accessible for them. > > > > > > Another one to add to the 'lunchtime beer and chat' agenda ;-) > > > > > > David > > > > > > > Oh I'm totally with Laura and you on this. But let's be honest here, > > school IT is *also* a huge problem. I've spent hours talking to > teachers > > who vent about not being able to install things because of > bureaucratic > > reasons. Note - this is not the same problem as venting because > > installation is complicated, the IT infrastructure issue is because > of > > ineffective leadership and bureaucracy. > > > > Both should be tackled, but I agree with you 100% that making things > > easy to install is important and, importantly, it's something we > > developers can help with a lot easier than, say, fixing shonky > school IT > > infrastructure. > > > > Best wishes, > > > > N. > > > > > > > > _______________________________________________ > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Mon May 16 05:37:54 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson 500) Date: Mon, 16 May 2016 10:37:54 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> Message-ID: <1BDDE3AD-AB04-43BC-A7B0-E23E2F12F856@gmail.com> One thing to note is that some schools (such as the one I go to) don't permit running any new applications, but do permit running python programs. Therefore I think it would always be a good idea to have the raw python files available so that schools with access to python but with no way to run built executables can use the programs. On 16 May 2016, at 10:27, Andy Crook wrote: > Sadly our IT is run at county level who assess every suggestion and get back to us. I guess by expensive they mean technician time to dedicate to creating the custom image with all the necessary restrictions in place, then deploying it with an install of virtualbox. A couple of years ago I was told we can't have Blender installed as it would require python. Go figure. > > I asked for Mu to be installed on all pc's months ago. They were quick to put it on the list of jobs to be done. It's not done yet. I get the scary feeling that microbit will fall flat on its face here as we won't be able to use them in any capacity. > > I was thinking for next year I should tell all CS students to get a raspberry pi and an HDMI to VGA lead to connect to our monitors, so at least they can use the device properly. However, that's not allowed as they wouldn't be our gear, so not PAT tested etc. Rock and a hard place. > > However, this is getting a bit doom 'n' gloom. I hope things eventually sort out but for me progress seems glacial. > > On 16 May 2016 at 10:15, Nicholas H.Tollervey wrote: > Andy, > > Your email is a perfect example of the sort of conversations I've been > having with teachers. > > VirtualBox (https://www.virtualbox.org/) is a free VM from Oracle. If > you're being told virtualization is too expensive then I'd push back > hard. It doesn't need to be. > > That this sort of thing is annoying both developers, teachers and > students is, in the long run, a good thing (tm) since people will try to > fix it (where "fix" is likely to be both a technical and > "organisational" solution). > > Hope this helps, > > N. > > On 16/05/16 10:06, Andy Crook wrote: > > School IT is a massive problem. I teach computer science and the > > controlled assessments require linux usage this time. We don't have any > > linux boxes, won't get any, can't install any VM (it's too 'expensive'!) > > and aren't allowing kids to bring in anything of their own. > > > > On windows, they aren't able to use a terminal or run executables. So > > I'm just saying, if anything makes things easier to depoly and use > > without any rights so much the better. > > > > On 16 May 2016 at 09:31, Nicholas H.Tollervey > > wrote: > > > > On 16/05/16 09:18, David Whale wrote: > > > I think it's not really how schools organise their IT that is the > > > problem. It's us developers who assume that *everyone else* is happy > > > with spending hours downloading all sorts of things and building > > > packages from source. > > > > > > I actually take sides with Laura Dixon on this one. > > > > > > Why should I have to download a program in order to install some other > > > program? > > > > > > I don't think we're there yet as an industry. If we want to engage with > > > schools and teachers, we have to have some better best-practices that we > > > can all follow to make it easier and more accessible for them. > > > > > > Another one to add to the 'lunchtime beer and chat' agenda ;-) > > > > > > David > > > > > > > Oh I'm totally with Laura and you on this. But let's be honest here, > > school IT is *also* a huge problem. I've spent hours talking to teachers > > who vent about not being able to install things because of bureaucratic > > reasons. Note - this is not the same problem as venting because > > installation is complicated, the IT infrastructure issue is because of > > ineffective leadership and bureaucracy. > > > > Both should be tackled, but I agree with you 100% that making things > > easy to install is important and, importantly, it's something we > > developers can help with a lot easier than, say, fixing shonky school IT > > infrastructure. > > > > Best wishes, > > > > N. > > > > > > > > _______________________________________________ > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.grandi at gmail.com Mon May 16 05:48:30 2016 From: a.grandi at gmail.com (a.grandi at gmail.com) Date: Mon, 16 May 2016 10:48:30 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: <1BDDE3AD-AB04-43BC-A7B0-E23E2F12F856@gmail.com> References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> <1BDDE3AD-AB04-43BC-A7B0-E23E2F12F856@gmail.com> Message-ID: What happens if a Python script invokes an external app :) ? just curious :P On 16 May 2016 at 10:37, Andrew Ferguson 500 wrote: > One thing to note is that some schools (such as the one I go to) don't > permit running any new applications, but do permit running python programs. > Therefore I think it would always be a good idea to have the raw python > files available so that schools with access to python but with no way to run > built executables can use the programs. > > > > On 16 May 2016, at 10:27, Andy Crook wrote: > > Sadly our IT is run at county level who assess every suggestion and get back > to us. I guess by expensive they mean technician time to dedicate to > creating the custom image with all the necessary restrictions in place, then > deploying it with an install of virtualbox. A couple of years ago I was told > we can't have Blender installed as it would require python. Go figure. > > I asked for Mu to be installed on all pc's months ago. They were quick to > put it on the list of jobs to be done. It's not done yet. I get the scary > feeling that microbit will fall flat on its face here as we won't be able to > use them in any capacity. > > I was thinking for next year I should tell all CS students to get a > raspberry pi and an HDMI to VGA lead to connect to our monitors, so at least > they can use the device properly. However, that's not allowed as they > wouldn't be our gear, so not PAT tested etc. Rock and a hard place. > > However, this is getting a bit doom 'n' gloom. I hope things eventually sort > out but for me progress seems glacial. > > On 16 May 2016 at 10:15, Nicholas H.Tollervey wrote: >> >> Andy, >> >> Your email is a perfect example of the sort of conversations I've been >> having with teachers. >> >> VirtualBox (https://www.virtualbox.org/) is a free VM from Oracle. If >> you're being told virtualization is too expensive then I'd push back >> hard. It doesn't need to be. >> >> That this sort of thing is annoying both developers, teachers and >> students is, in the long run, a good thing (tm) since people will try to >> fix it (where "fix" is likely to be both a technical and >> "organisational" solution). >> >> Hope this helps, >> >> N. >> >> On 16/05/16 10:06, Andy Crook wrote: >> > School IT is a massive problem. I teach computer science and the >> > controlled assessments require linux usage this time. We don't have any >> > linux boxes, won't get any, can't install any VM (it's too 'expensive'!) >> > and aren't allowing kids to bring in anything of their own. >> > >> > On windows, they aren't able to use a terminal or run executables. So >> > I'm just saying, if anything makes things easier to depoly and use >> > without any rights so much the better. >> > >> > On 16 May 2016 at 09:31, Nicholas H.Tollervey > > > wrote: >> > >> > On 16/05/16 09:18, David Whale wrote: >> > > I think it's not really how schools organise their IT that is the >> > > problem. It's us developers who assume that *everyone else* is >> > happy >> > > with spending hours downloading all sorts of things and building >> > > packages from source. >> > > >> > > I actually take sides with Laura Dixon on this one. >> > > >> > > Why should I have to download a program in order to install some >> > other >> > > program? >> > > >> > > I don't think we're there yet as an industry. If we want to engage >> > with >> > > schools and teachers, we have to have some better best-practices >> > that we >> > > can all follow to make it easier and more accessible for them. >> > > >> > > Another one to add to the 'lunchtime beer and chat' agenda ;-) >> > > >> > > David >> > > >> > >> > Oh I'm totally with Laura and you on this. But let's be honest here, >> > school IT is *also* a huge problem. I've spent hours talking to >> > teachers >> > who vent about not being able to install things because of >> > bureaucratic >> > reasons. Note - this is not the same problem as venting because >> > installation is complicated, the IT infrastructure issue is because >> > of >> > ineffective leadership and bureaucracy. >> > >> > Both should be tackled, but I agree with you 100% that making things >> > easy to install is important and, importantly, it's something we >> > developers can help with a lot easier than, say, fixing shonky >> > school IT >> > infrastructure. >> > >> > Best wishes, >> > >> > N. >> > >> > >> > >> > _______________________________________________ >> > 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 > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -- Andrea Grandi - Software Engineer Website: https://www.andreagrandi.it Twitter: https://twitter.com/andreagrandi GitHub: https://github.com/andreagrandi PGP: 7238 74F6 886D 5994 323F 1781 8CFB 47AD C384 F0CC From andrewferguson500 at gmail.com Mon May 16 05:55:43 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson 500) Date: Mon, 16 May 2016 10:55:43 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <08df2f7e-c69b-8e58-ce63-0a3fd373f604@ntoll.org> <1BDDE3AD-AB04-43BC-A7B0-E23E2F12F856@gmail.com> Message-ID: If that app has not been explicitly allowed, it will not run. On 16 May 2016, at 10:48, "a.grandi at gmail.com" wrote: > What happens if a Python script invokes an external app :) ? > > just curious :P > > On 16 May 2016 at 10:37, Andrew Ferguson 500 > wrote: >> One thing to note is that some schools (such as the one I go to) don't >> permit running any new applications, but do permit running python programs. >> Therefore I think it would always be a good idea to have the raw python >> files available so that schools with access to python but with no way to run >> built executables can use the programs. >> >> >> >> On 16 May 2016, at 10:27, Andy Crook wrote: >> >> Sadly our IT is run at county level who assess every suggestion and get back >> to us. I guess by expensive they mean technician time to dedicate to >> creating the custom image with all the necessary restrictions in place, then >> deploying it with an install of virtualbox. A couple of years ago I was told >> we can't have Blender installed as it would require python. Go figure. >> >> I asked for Mu to be installed on all pc's months ago. They were quick to >> put it on the list of jobs to be done. It's not done yet. I get the scary >> feeling that microbit will fall flat on its face here as we won't be able to >> use them in any capacity. >> >> I was thinking for next year I should tell all CS students to get a >> raspberry pi and an HDMI to VGA lead to connect to our monitors, so at least >> they can use the device properly. However, that's not allowed as they >> wouldn't be our gear, so not PAT tested etc. Rock and a hard place. >> >> However, this is getting a bit doom 'n' gloom. I hope things eventually sort >> out but for me progress seems glacial. >> >> On 16 May 2016 at 10:15, Nicholas H.Tollervey wrote: >>> >>> Andy, >>> >>> Your email is a perfect example of the sort of conversations I've been >>> having with teachers. >>> >>> VirtualBox (https://www.virtualbox.org/) is a free VM from Oracle. If >>> you're being told virtualization is too expensive then I'd push back >>> hard. It doesn't need to be. >>> >>> That this sort of thing is annoying both developers, teachers and >>> students is, in the long run, a good thing (tm) since people will try to >>> fix it (where "fix" is likely to be both a technical and >>> "organisational" solution). >>> >>> Hope this helps, >>> >>> N. >>> >>> On 16/05/16 10:06, Andy Crook wrote: >>>> School IT is a massive problem. I teach computer science and the >>>> controlled assessments require linux usage this time. We don't have any >>>> linux boxes, won't get any, can't install any VM (it's too 'expensive'!) >>>> and aren't allowing kids to bring in anything of their own. >>>> >>>> On windows, they aren't able to use a terminal or run executables. So >>>> I'm just saying, if anything makes things easier to depoly and use >>>> without any rights so much the better. >>>> >>>> On 16 May 2016 at 09:31, Nicholas H.Tollervey >>> > wrote: >>>> >>>> On 16/05/16 09:18, David Whale wrote: >>>>> I think it's not really how schools organise their IT that is the >>>>> problem. It's us developers who assume that *everyone else* is >>>> happy >>>>> with spending hours downloading all sorts of things and building >>>>> packages from source. >>>>> >>>>> I actually take sides with Laura Dixon on this one. >>>>> >>>>> Why should I have to download a program in order to install some >>>> other >>>>> program? >>>>> >>>>> I don't think we're there yet as an industry. If we want to engage >>>> with >>>>> schools and teachers, we have to have some better best-practices >>>> that we >>>>> can all follow to make it easier and more accessible for them. >>>>> >>>>> Another one to add to the 'lunchtime beer and chat' agenda ;-) >>>>> >>>>> David >>>>> >>>> >>>> Oh I'm totally with Laura and you on this. But let's be honest here, >>>> school IT is *also* a huge problem. I've spent hours talking to >>>> teachers >>>> who vent about not being able to install things because of >>>> bureaucratic >>>> reasons. Note - this is not the same problem as venting because >>>> installation is complicated, the IT infrastructure issue is because >>>> of >>>> ineffective leadership and bureaucracy. >>>> >>>> Both should be tackled, but I agree with you 100% that making things >>>> easy to install is important and, importantly, it's something we >>>> developers can help with a lot easier than, say, fixing shonky >>>> school IT >>>> infrastructure. >>>> >>>> Best wishes, >>>> >>>> N. >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit >> > > > > -- > Andrea Grandi - Software Engineer > Website: https://www.andreagrandi.it > Twitter: https://twitter.com/andreagrandi > GitHub: https://github.com/andreagrandi > PGP: 7238 74F6 886D 5994 323F 1781 8CFB 47AD C384 F0CC > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit From mal at egenix.com Mon May 16 05:57:25 2016 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 16 May 2016 11:57:25 +0200 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> Message-ID: <57399985.1040407@egenix.com> On 16.05.2016 09:47, Nicholas H.Tollervey wrote: > For the Mu editor Carlos did some amazing work in automatically building > a stand-alone executable for Windows, OSX and Linux. > > Of course, Windows will complain if you try to run a stand-alone > executable and warn you to the extent that you'll imagine the world is > about to end, but there you go. Why is that ? Because you are accessing the serial port ? I think you can get (at least partially) around this by signing the executable. > Unfortunately, the real problem (the way schools organise their IT) is > impossible for us to fix. Ergo all this faffing about. Nevertheless, > it's worth it when teachers and kids get their hands on the good stuff. Am I right in assuming that most schools use Windows for their (kids) PCs ? > Best wishes, > > N. > > On 15/05/16 16:13, David Whale wrote: >> Hi Joe, >> >> Yes, but the way we typically do this is to unzip the package directory >> into the users project directory. That's how I do it with the anyio >> library I wrote for my minecraft book, and that's ow the original >> mb_remote works. >> >> i.e. if the user project directory is my_awesome_project >> ...and if there is a file my_awesome_project/test1.py >> ...and if there is a folder my_awesome_project/microbit >> >> ...then when you import microbit in test1.py, it all works. >> >> The embedded serial folder inside the microbit folder (with it's magic >> sys.path modifier) just makes it all work seamlessly. >> >> It really is very simple to use. >> >> Lines 28..33 >> here: https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 >> >> >> Teachers hate it when you have to run install scripts and need admin >> access, because (a) it means you have to beg to the IT technician which >> sometimes takes months (literally), and (b) it means that they have to >> consider which machines are configured correctly and which are not. >> >> If all you have to do is unzip a folder and start coding, it's *really* >> simple. They can even give the instructions to the kids and they can >> just unzip the file into their user directory and it all works seamlessly. >> >> In one school, it took the technician 3 months (of continuous teacher >> begging) to get python installed, just so they could run the GCSE >> controlled assessments. >> >> David >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 15 May 2016 at 13:21, Joe Glancy > > wrote: >> >> That's a good point - embedding pyserial would certainly make it >> more portable, as it doesn't depend on anything else except standard >> modules then. The only (small) limitation with a zero install is >> that scripts would have to be in the same location as the module's >> directory, but that's hardly an issue. >> >> >> On Sun, 15 May 2016, 10:42 David Whale, > > wrote: >> >> Joe and Andrew, >> >> Just a comment about this, please read this article, and >> consider *changing* how you package this, especially for teachers: >> >> https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ >> >> The version that I wrote back in August 2015 is zero install - >> yes, ZERO install. All a teacher has to do is to press the >> DownloadZip button, unzip it, and run it. This is VITAL for >> teachers to use these resources, especially on a Raspberry Pi >> where mostly they are not connected to the internet most of the >> time. Most of the time they want to just grab a file on a USB >> memory stick, and copy it over. sudo pip install is *useless* in >> this situation. >> >> Raspberry Pi's are mostly not connected to the internet in >> schools, because it stores the wifi password in plain text in >> the config file, and school IT technicians ban the teachers from >> using them for this reason (as it exposes the password to the >> kids, and then all their phones start connecting to the wifi and >> makes it crash). Really, this is a big problem, believe me! >> >> The way I did this was to *embed* pyserial into the package (and >> the licence allows for this providing you are clear about the >> containing licence). Please see my original >> here: https://github.com/whaleygeek/mb_remote and you will see >> this works really great. There is also a little bit of python >> magic in the file (it modifies the sys.path inplace) to make >> sure that this happens automatically. (you need to make this >> Python 3 safe still, of course). >> >> Can I strongly urge you to make it zero install? It'll get >> adopted really quickly that way. >> >> I've had a number of chats with teachers already about this and >> they are really excited about it, but they said to me 'ah, it's >> all that sudo pip stuff, that never works for us'. Lots of >> teachers I speak to gave in with PyGameZero because they >> couldn't get it to install. >> >> Thanks >> >> David >> >> >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 14 May 2016 at 22:54, Joe Glancy > > wrote: >> >> Thanks David :) >> >> I'll see if I can find that demo and get it up and working >> with this module - would be nice to have some examples with >> it where it can interact with things such as MCPI straight >> out of the box. >> >> And indeed it does make an excellent addon, mostly thanks to >> the pretty much universal serial interface it uses to >> communicate (which allows it to be easily interfaced on many >> platforms with minimal (or even none) setup required). >> >> As a matter of fact, I thought up of something very similar >> to this but which communicated over Bluetooth instead a >> while ago (using a stock micro:bit image), with a Raspberry >> Pi 3 and micro:bit as use case. Unfortunately, I found it >> impossible to get the micro:bit to work properly with BlueZ, >> despite some help from the BlueZ IRC and Linux Bluetooth >> mailing list.This kind of lead to the wired approach you see >> now. Maybe the recent BlueZ updates will fix this, so that a >> wireless alternative to this module exists too. >> >> >> On Sat, 14 May 2016, 22:25 David Whale, >> > > wrote: >> >> Looks great, Joe and Andrew! >> >> Yes, I wrote this original mb_remote version back in >> August 2015, but the Python API on the micro:bit changed >> many times since then and I've been too busy to maintain >> it. However, it's great to see this moving forward. >> There are some really nice use cases (especially >> micro:bit + Raspberry Pi) where this sort of approach is >> both really useful and great fun, as I discovered with >> my early tests. >> >> The 'flying xwing in minecraft with a micro:bit' that >> Martin and I did, was really the inspiration for me >> writing the mb_remote, more to get a feel for what it >> would look like than anything else. I had come to the >> conclusion that the micro:bit makes a great peripheral >> for other computers, what with it's onboard sensors and >> I/O pins, and having a really quick way to extend your >> python from the host PC onto the micro:bit is really fun. >> >> I'm also glad to see you take forward the idea of poking >> commands into the REPL and getting responses (that's >> much better than having to load custom firmware onto the >> micro:bit, as other solutions tend to go for). >> >> David >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 14 May 2016 at 20:58, Joe Glancy >> > >> wrote: >> >> Myself and Andrew (Mulholland, @gbaman on GitHub - >> credit to him for first starting this) have been >> working on something similar to David's mb_remote >> module for Python, called microperi >> (micro-peripheral, as that is what the micro:bit >> becomes :). It is currently (and very much) an alpha >> work-in-progress, and I'm only informing everyone >> here about it because we need testers and, more >> importantly, feedback. >> >> It lives at https://github.com/JoeGlancy/microperi, >> and because none of the install methods >> (pip3/python3 setup.py install) work properly as of >> now, the best way to try it is just create your >> scripts in the same directory where the docs >> (README, CONTRIBUTING etc) are and use `import >> microperi` (check out the example in the README for >> a bit of a better howto). >> >> It exposes almost all of the micro:bit's MicroPython >> `microbit` module, which is completely available >> through a microperi.Microbit object. This is >> actually one of the things that I'd like feedback >> about; see below for more information (I don't think >> I've explained this too well, but it's the best I >> could think of and word). If you just want to try it >> out, get cloning and give it a whirl. Anything you >> spot as a bug or something you feel needs to be >> improved/implemented, just create an issue or submit >> a PR (check CONTRIBUTING.rst first though). >> >> We decided on the Microbit object (instead of one >> pre-set object called `microperi.microbit`, which it >> actually was originally) so that multiple micro:bits >> can be used at the same time. The constructor is: >> >> microperi.Microbit(port=None) >> >> If port is not specified, the module will >> automatically detect the first available micro:bit >> and use that one (Nick, the finding code is from >> microrepl - could you comment on licensing please?). >> Otherwise, `port` must be a string determining the >> serial port which the micro:bit is connected to >> (e.g: /dev/ttyACM0, COM1, etc). >> >> Usual usage of the object is along the following >> lines (or, more literal, line): >> >> microbit = microperi.Microbit() >> >> and then things like the microbit.Image class are >> available through `microbit.Image`. However, if I >> were to call the micro:bit object a different name >> in my script (such as "uBit"), the Image class would >> be accessible as uBit.Image, which deviates from the >> MicroPython API. However, we did not want to place >> things like the Image & pin classes in somewhere >> like `microperi.microbit.Class_name` because then >> you'd have a bit of a mess like so: >> >> from microperi import * >> uBit = Microbit() >> solid = microbit.Image.SNAKE >> uBit.display.show(solid) >> >> because some things (e.g: microbit.i2c.read) would >> be accessible through `uBit.i2c.read`, and others >> (e.g: microbit.Image) would be accessible through >> `microbit.Image`, when they both should be under >> `microbit.X`, if you understand what I mean. >> >> The best solution for this currently is just calling >> the object `microbit`, and then everything will be >> as it should, but if you don't some things will be >> in different places. >> >> Anyway, I hope that this module will prove itself >> useful for people and perhaps even in the classroom, >> as it notably allows not only use of the microbit >> module but also every other Python 3 module out >> there, allowing much more powerful (possibly IoT >> integrated?) scripts to be created on a much more >> powerful machine. I look forward to any feedback, >> and hope for a proper, stable release (with >> documentation of some sort) sometime soon. >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 16 2016) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/ From damien.p.george at gmail.com Mon May 16 06:26:43 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 16 May 2016 11:26:43 +0100 Subject: [Microbit-Python] I/O pins pull-up/down/float In-Reply-To: <003d01d1aea1$748361b0$5d8a2510$@gmail.com> References: <003d01d1aea1$748361b0$5d8a2510$@gmail.com> Message-ID: It's not exposed in the MicroPython implementation, but we can easily add it. It looks to me that the default behaviour for a digital IO pin (ie if you do pin.read_digital()) is PullDown. On Sun, May 15, 2016 at 1:01 PM, Nigel Kendrick wrote: > Hi Folks, > > > > I see that the micro:bit runtime defines a pin mode for the GPIO internal > pull-ups: > > > > Int setPull ( PinMode pull) > > > > Description > > > > Configures the pull of this pin. > > Parameters? > > > > PinMode > > pull - one of the mbed pull configurations: PullUp, PullDown, PullNone > > > > Returns > > > > MICROBIT_NOT_SUPPORTED if the current pin configuration is anything other > than a digital input, otherwise MICROBIT_OK. > > > > But I don?t see this abstracted to any of the end-user coding environments > (I may be wrong ? be gentle with me as I am still getting up to speed > here). Is there a default behaviour for I/O pullups/downs/floats or a > recommended way to handle this with MicroPython on the micro:bit? > > > > Tldr; I am deciding whether I need external pullups/downs on a board I am > developing. > > > > Thanks. > > > > Nigel Kendrick > > > ------------------------------ > [image: Avast logo] > > This email has been checked for viruses by Avast antivirus software. > www.avast.com > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.t.glancy at gmail.com Mon May 16 06:59:51 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Mon, 16 May 2016 10:59:51 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: <57399985.1040407@egenix.com> References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: Yeah, pretty much every school uses Windows (I think most often it's Windows 7?). Thanks for the tip David - microperi is now completely portable and requires 0 installation (plus very little effort). On Mon, 16 May 2016, 10:57 M.-A. Lemburg, wrote: > On 16.05.2016 09:47, Nicholas H.Tollervey wrote: > > For the Mu editor Carlos did some amazing work in automatically building > > a stand-alone executable for Windows, OSX and Linux. > > > > Of course, Windows will complain if you try to run a stand-alone > > executable and warn you to the extent that you'll imagine the world is > > about to end, but there you go. > > Why is that ? Because you are accessing the serial port ? > I think you can get (at least partially) around this by signing > the executable. > > > Unfortunately, the real problem (the way schools organise their IT) is > > impossible for us to fix. Ergo all this faffing about. Nevertheless, > > it's worth it when teachers and kids get their hands on the good stuff. > > Am I right in assuming that most schools use Windows for their > (kids) PCs ? > > > Best wishes, > > > > N. > > > > On 15/05/16 16:13, David Whale wrote: > >> Hi Joe, > >> > >> Yes, but the way we typically do this is to unzip the package directory > >> into the users project directory. That's how I do it with the anyio > >> library I wrote for my minecraft book, and that's ow the original > >> mb_remote works. > >> > >> i.e. if the user project directory is my_awesome_project > >> ...and if there is a file my_awesome_project/test1.py > >> ...and if there is a folder my_awesome_project/microbit > >> > >> ...then when you import microbit in test1.py, it all works. > >> > >> The embedded serial folder inside the microbit folder (with it's magic > >> sys.path modifier) just makes it all work seamlessly. > >> > >> It really is very simple to use. > >> > >> Lines 28..33 > >> here: > https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 > >> > >> > >> Teachers hate it when you have to run install scripts and need admin > >> access, because (a) it means you have to beg to the IT technician which > >> sometimes takes months (literally), and (b) it means that they have to > >> consider which machines are configured correctly and which are not. > >> > >> If all you have to do is unzip a folder and start coding, it's *really* > >> simple. They can even give the instructions to the kids and they can > >> just unzip the file into their user directory and it all works > seamlessly. > >> > >> In one school, it took the technician 3 months (of continuous teacher > >> begging) to get python installed, just so they could run the GCSE > >> controlled assessments. > >> > >> David > >> > >> > >> ___________________________________________________________ > >> David Whale, B.Sc (Hons), MIET > >> *Software Engineer and IET Schools Liaison Officer, Essex* > >> > >> > >> On 15 May 2016 at 13:21, Joe Glancy >> > wrote: > >> > >> That's a good point - embedding pyserial would certainly make it > >> more portable, as it doesn't depend on anything else except standard > >> modules then. The only (small) limitation with a zero install is > >> that scripts would have to be in the same location as the module's > >> directory, but that's hardly an issue. > >> > >> > >> On Sun, 15 May 2016, 10:42 David Whale, >> > wrote: > >> > >> Joe and Andrew, > >> > >> Just a comment about this, please read this article, and > >> consider *changing* how you package this, especially for > teachers: > >> > >> > https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ > >> > >> The version that I wrote back in August 2015 is zero install - > >> yes, ZERO install. All a teacher has to do is to press the > >> DownloadZip button, unzip it, and run it. This is VITAL for > >> teachers to use these resources, especially on a Raspberry Pi > >> where mostly they are not connected to the internet most of the > >> time. Most of the time they want to just grab a file on a USB > >> memory stick, and copy it over. sudo pip install is *useless* in > >> this situation. > >> > >> Raspberry Pi's are mostly not connected to the internet in > >> schools, because it stores the wifi password in plain text in > >> the config file, and school IT technicians ban the teachers from > >> using them for this reason (as it exposes the password to the > >> kids, and then all their phones start connecting to the wifi and > >> makes it crash). Really, this is a big problem, believe me! > >> > >> The way I did this was to *embed* pyserial into the package (and > >> the licence allows for this providing you are clear about the > >> containing licence). Please see my original > >> here: https://github.com/whaleygeek/mb_remote and you will see > >> this works really great. There is also a little bit of python > >> magic in the file (it modifies the sys.path inplace) to make > >> sure that this happens automatically. (you need to make this > >> Python 3 safe still, of course). > >> > >> Can I strongly urge you to make it zero install? It'll get > >> adopted really quickly that way. > >> > >> I've had a number of chats with teachers already about this and > >> they are really excited about it, but they said to me 'ah, it's > >> all that sudo pip stuff, that never works for us'. Lots of > >> teachers I speak to gave in with PyGameZero because they > >> couldn't get it to install. > >> > >> Thanks > >> > >> David > >> > >> > >> > >> > >> ___________________________________________________________ > >> David Whale, B.Sc (Hons), MIET > >> *Software Engineer and IET Schools Liaison Officer, Essex* > >> > >> > >> On 14 May 2016 at 22:54, Joe Glancy >> > wrote: > >> > >> Thanks David :) > >> > >> I'll see if I can find that demo and get it up and working > >> with this module - would be nice to have some examples with > >> it where it can interact with things such as MCPI straight > >> out of the box. > >> > >> And indeed it does make an excellent addon, mostly thanks to > >> the pretty much universal serial interface it uses to > >> communicate (which allows it to be easily interfaced on many > >> platforms with minimal (or even none) setup required). > >> > >> As a matter of fact, I thought up of something very similar > >> to this but which communicated over Bluetooth instead a > >> while ago (using a stock micro:bit image), with a Raspberry > >> Pi 3 and micro:bit as use case. Unfortunately, I found it > >> impossible to get the micro:bit to work properly with BlueZ, > >> despite some help from the BlueZ IRC and Linux Bluetooth > >> mailing list.This kind of lead to the wired approach you see > >> now. Maybe the recent BlueZ updates will fix this, so that a > >> wireless alternative to this module exists too. > >> > >> > >> On Sat, 14 May 2016, 22:25 David Whale, > >> >> > wrote: > >> > >> Looks great, Joe and Andrew! > >> > >> Yes, I wrote this original mb_remote version back in > >> August 2015, but the Python API on the micro:bit changed > >> many times since then and I've been too busy to maintain > >> it. However, it's great to see this moving forward. > >> There are some really nice use cases (especially > >> micro:bit + Raspberry Pi) where this sort of approach is > >> both really useful and great fun, as I discovered with > >> my early tests. > >> > >> The 'flying xwing in minecraft with a micro:bit' that > >> Martin and I did, was really the inspiration for me > >> writing the mb_remote, more to get a feel for what it > >> would look like than anything else. I had come to the > >> conclusion that the micro:bit makes a great peripheral > >> for other computers, what with it's onboard sensors and > >> I/O pins, and having a really quick way to extend your > >> python from the host PC onto the micro:bit is really > fun. > >> > >> I'm also glad to see you take forward the idea of poking > >> commands into the REPL and getting responses (that's > >> much better than having to load custom firmware onto the > >> micro:bit, as other solutions tend to go for). > >> > >> David > >> > >> > >> > ___________________________________________________________ > >> David Whale, B.Sc (Hons), MIET > >> *Software Engineer and IET Schools Liaison Officer, > Essex* > >> > >> > >> On 14 May 2016 at 20:58, Joe Glancy > >> >> > >> wrote: > >> > >> Myself and Andrew (Mulholland, @gbaman on GitHub - > >> credit to him for first starting this) have been > >> working on something similar to David's mb_remote > >> module for Python, called microperi > >> (micro-peripheral, as that is what the micro:bit > >> becomes :). It is currently (and very much) an alpha > >> work-in-progress, and I'm only informing everyone > >> here about it because we need testers and, more > >> importantly, feedback. > >> > >> It lives at https://github.com/JoeGlancy/microperi, > >> and because none of the install methods > >> (pip3/python3 setup.py install) work properly as of > >> now, the best way to try it is just create your > >> scripts in the same directory where the docs > >> (README, CONTRIBUTING etc) are and use `import > >> microperi` (check out the example in the README for > >> a bit of a better howto). > >> > >> It exposes almost all of the micro:bit's MicroPython > >> `microbit` module, which is completely available > >> through a microperi.Microbit object. This is > >> actually one of the things that I'd like feedback > >> about; see below for more information (I don't think > >> I've explained this too well, but it's the best I > >> could think of and word). If you just want to try it > >> out, get cloning and give it a whirl. Anything you > >> spot as a bug or something you feel needs to be > >> improved/implemented, just create an issue or submit > >> a PR (check CONTRIBUTING.rst first though). > >> > >> We decided on the Microbit object (instead of one > >> pre-set object called `microperi.microbit`, which it > >> actually was originally) so that multiple micro:bits > >> can be used at the same time. The constructor is: > >> > >> microperi.Microbit(port=None) > >> > >> If port is not specified, the module will > >> automatically detect the first available micro:bit > >> and use that one (Nick, the finding code is from > >> microrepl - could you comment on licensing please?). > >> Otherwise, `port` must be a string determining the > >> serial port which the micro:bit is connected to > >> (e.g: /dev/ttyACM0, COM1, etc). > >> > >> Usual usage of the object is along the following > >> lines (or, more literal, line): > >> > >> microbit = microperi.Microbit() > >> > >> and then things like the microbit.Image class are > >> available through `microbit.Image`. However, if I > >> were to call the micro:bit object a different name > >> in my script (such as "uBit"), the Image class would > >> be accessible as uBit.Image, which deviates from the > >> MicroPython API. However, we did not want to place > >> things like the Image & pin classes in somewhere > >> like `microperi.microbit.Class_name` because then > >> you'd have a bit of a mess like so: > >> > >> from microperi import * > >> uBit = Microbit() > >> solid = microbit.Image.SNAKE > >> uBit.display.show(solid) > >> > >> because some things (e.g: microbit.i2c.read) would > >> be accessible through `uBit.i2c.read`, and others > >> (e.g: microbit.Image) would be accessible through > >> `microbit.Image`, when they both should be under > >> `microbit.X`, if you understand what I mean. > >> > >> The best solution for this currently is just calling > >> the object `microbit`, and then everything will be > >> as it should, but if you don't some things will be > >> in different places. > >> > >> Anyway, I hope that this module will prove itself > >> useful for people and perhaps even in the classroom, > >> as it notably allows not only use of the microbit > >> module but also every other Python 3 module out > >> there, allowing much more powerful (possibly IoT > >> integrated?) scripts to be created on a much more > >> powerful machine. I look forward to any feedback, > >> and hope for a proper, stable release (with > >> documentation of some sort) sometime soon. > >> > >> _______________________________________________ > >> 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 > >> > >> > >> _______________________________________________ > >> 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 > > > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Experts (#1, May 16 2016) > >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ > >>> Python Database Interfaces ... http://products.egenix.com/ > >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ > ________________________________________________________________________ > > ::: We implement business ideas - efficiently in both time and costs ::: > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > Registered at Amtsgericht Duesseldorf: HRB 46611 > http://www.egenix.com/company/contact/ > http://www.malemburg.com/ > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Mon May 16 07:12:07 2016 From: david at thinkingbinaries.com (David Whale) Date: Mon, 16 May 2016 12:12:07 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: Joe, I like what you did there! https://github.com/JoeGlancy/microperi/blob/master/microperi/microperi.py#L20 Great stuff. Zero install, if possible, is always the way to go! David ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 16 May 2016 at 11:59, Joe Glancy wrote: > Yeah, pretty much every school uses Windows (I think most often it's > Windows 7?). > > Thanks for the tip David - microperi is now completely portable and > requires 0 installation (plus very little effort). > > On Mon, 16 May 2016, 10:57 M.-A. Lemburg, wrote: > >> On 16.05.2016 09:47, Nicholas H.Tollervey wrote: >> > For the Mu editor Carlos did some amazing work in automatically building >> > a stand-alone executable for Windows, OSX and Linux. >> > >> > Of course, Windows will complain if you try to run a stand-alone >> > executable and warn you to the extent that you'll imagine the world is >> > about to end, but there you go. >> >> Why is that ? Because you are accessing the serial port ? >> I think you can get (at least partially) around this by signing >> the executable. >> >> > Unfortunately, the real problem (the way schools organise their IT) is >> > impossible for us to fix. Ergo all this faffing about. Nevertheless, >> > it's worth it when teachers and kids get their hands on the good stuff. >> >> Am I right in assuming that most schools use Windows for their >> (kids) PCs ? >> >> > Best wishes, >> > >> > N. >> > >> > On 15/05/16 16:13, David Whale wrote: >> >> Hi Joe, >> >> >> >> Yes, but the way we typically do this is to unzip the package directory >> >> into the users project directory. That's how I do it with the anyio >> >> library I wrote for my minecraft book, and that's ow the original >> >> mb_remote works. >> >> >> >> i.e. if the user project directory is my_awesome_project >> >> ...and if there is a file my_awesome_project/test1.py >> >> ...and if there is a folder my_awesome_project/microbit >> >> >> >> ...then when you import microbit in test1.py, it all works. >> >> >> >> The embedded serial folder inside the microbit folder (with it's magic >> >> sys.path modifier) just makes it all work seamlessly. >> >> >> >> It really is very simple to use. >> >> >> >> Lines 28..33 >> >> here: >> https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 >> >> >> >> >> >> Teachers hate it when you have to run install scripts and need admin >> >> access, because (a) it means you have to beg to the IT technician which >> >> sometimes takes months (literally), and (b) it means that they have to >> >> consider which machines are configured correctly and which are not. >> >> >> >> If all you have to do is unzip a folder and start coding, it's *really* >> >> simple. They can even give the instructions to the kids and they can >> >> just unzip the file into their user directory and it all works >> seamlessly. >> >> >> >> In one school, it took the technician 3 months (of continuous teacher >> >> begging) to get python installed, just so they could run the GCSE >> >> controlled assessments. >> >> >> >> David >> >> >> >> >> >> ___________________________________________________________ >> >> David Whale, B.Sc (Hons), MIET >> >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> >> >> >> On 15 May 2016 at 13:21, Joe Glancy > >> > wrote: >> >> >> >> That's a good point - embedding pyserial would certainly make it >> >> more portable, as it doesn't depend on anything else except >> standard >> >> modules then. The only (small) limitation with a zero install is >> >> that scripts would have to be in the same location as the module's >> >> directory, but that's hardly an issue. >> >> >> >> >> >> On Sun, 15 May 2016, 10:42 David Whale, < >> david at thinkingbinaries.com >> >> > wrote: >> >> >> >> Joe and Andrew, >> >> >> >> Just a comment about this, please read this article, and >> >> consider *changing* how you package this, especially for >> teachers: >> >> >> >> >> https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ >> >> >> >> The version that I wrote back in August 2015 is zero install - >> >> yes, ZERO install. All a teacher has to do is to press the >> >> DownloadZip button, unzip it, and run it. This is VITAL for >> >> teachers to use these resources, especially on a Raspberry Pi >> >> where mostly they are not connected to the internet most of the >> >> time. Most of the time they want to just grab a file on a USB >> >> memory stick, and copy it over. sudo pip install is *useless* >> in >> >> this situation. >> >> >> >> Raspberry Pi's are mostly not connected to the internet in >> >> schools, because it stores the wifi password in plain text in >> >> the config file, and school IT technicians ban the teachers >> from >> >> using them for this reason (as it exposes the password to the >> >> kids, and then all their phones start connecting to the wifi >> and >> >> makes it crash). Really, this is a big problem, believe me! >> >> >> >> The way I did this was to *embed* pyserial into the package >> (and >> >> the licence allows for this providing you are clear about the >> >> containing licence). Please see my original >> >> here: https://github.com/whaleygeek/mb_remote and you will see >> >> this works really great. There is also a little bit of python >> >> magic in the file (it modifies the sys.path inplace) to make >> >> sure that this happens automatically. (you need to make this >> >> Python 3 safe still, of course). >> >> >> >> Can I strongly urge you to make it zero install? It'll get >> >> adopted really quickly that way. >> >> >> >> I've had a number of chats with teachers already about this and >> >> they are really excited about it, but they said to me 'ah, it's >> >> all that sudo pip stuff, that never works for us'. Lots of >> >> teachers I speak to gave in with PyGameZero because they >> >> couldn't get it to install. >> >> >> >> Thanks >> >> >> >> David >> >> >> >> >> >> >> >> >> >> ___________________________________________________________ >> >> David Whale, B.Sc (Hons), MIET >> >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> >> >> >> On 14 May 2016 at 22:54, Joe Glancy > >> > wrote: >> >> >> >> Thanks David :) >> >> >> >> I'll see if I can find that demo and get it up and working >> >> with this module - would be nice to have some examples with >> >> it where it can interact with things such as MCPI straight >> >> out of the box. >> >> >> >> And indeed it does make an excellent addon, mostly thanks >> to >> >> the pretty much universal serial interface it uses to >> >> communicate (which allows it to be easily interfaced on >> many >> >> platforms with minimal (or even none) setup required). >> >> >> >> As a matter of fact, I thought up of something very similar >> >> to this but which communicated over Bluetooth instead a >> >> while ago (using a stock micro:bit image), with a Raspberry >> >> Pi 3 and micro:bit as use case. Unfortunately, I found it >> >> impossible to get the micro:bit to work properly with >> BlueZ, >> >> despite some help from the BlueZ IRC and Linux Bluetooth >> >> mailing list.This kind of lead to the wired approach you >> see >> >> now. Maybe the recent BlueZ updates will fix this, so that >> a >> >> wireless alternative to this module exists too. >> >> >> >> >> >> On Sat, 14 May 2016, 22:25 David Whale, >> >> > >> > wrote: >> >> >> >> Looks great, Joe and Andrew! >> >> >> >> Yes, I wrote this original mb_remote version back in >> >> August 2015, but the Python API on the micro:bit >> changed >> >> many times since then and I've been too busy to >> maintain >> >> it. However, it's great to see this moving forward. >> >> There are some really nice use cases (especially >> >> micro:bit + Raspberry Pi) where this sort of approach >> is >> >> both really useful and great fun, as I discovered with >> >> my early tests. >> >> >> >> The 'flying xwing in minecraft with a micro:bit' that >> >> Martin and I did, was really the inspiration for me >> >> writing the mb_remote, more to get a feel for what it >> >> would look like than anything else. I had come to the >> >> conclusion that the micro:bit makes a great peripheral >> >> for other computers, what with it's onboard sensors and >> >> I/O pins, and having a really quick way to extend your >> >> python from the host PC onto the micro:bit is really >> fun. >> >> >> >> I'm also glad to see you take forward the idea of >> poking >> >> commands into the REPL and getting responses (that's >> >> much better than having to load custom firmware onto >> the >> >> micro:bit, as other solutions tend to go for). >> >> >> >> David >> >> >> >> >> >> >> ___________________________________________________________ >> >> David Whale, B.Sc (Hons), MIET >> >> *Software Engineer and IET Schools Liaison Officer, >> Essex* >> >> >> >> >> >> On 14 May 2016 at 20:58, Joe Glancy >> >> > >> >> >> wrote: >> >> >> >> Myself and Andrew (Mulholland, @gbaman on GitHub - >> >> credit to him for first starting this) have been >> >> working on something similar to David's mb_remote >> >> module for Python, called microperi >> >> (micro-peripheral, as that is what the micro:bit >> >> becomes :). It is currently (and very much) an >> alpha >> >> work-in-progress, and I'm only informing everyone >> >> here about it because we need testers and, more >> >> importantly, feedback. >> >> >> >> It lives at https://github.com/JoeGlancy/microperi >> , >> >> and because none of the install methods >> >> (pip3/python3 setup.py install) work properly as of >> >> now, the best way to try it is just create your >> >> scripts in the same directory where the docs >> >> (README, CONTRIBUTING etc) are and use `import >> >> microperi` (check out the example in the README for >> >> a bit of a better howto). >> >> >> >> It exposes almost all of the micro:bit's >> MicroPython >> >> `microbit` module, which is completely available >> >> through a microperi.Microbit object. This is >> >> actually one of the things that I'd like feedback >> >> about; see below for more information (I don't >> think >> >> I've explained this too well, but it's the best I >> >> could think of and word). If you just want to try >> it >> >> out, get cloning and give it a whirl. Anything you >> >> spot as a bug or something you feel needs to be >> >> improved/implemented, just create an issue or >> submit >> >> a PR (check CONTRIBUTING.rst first though). >> >> >> >> We decided on the Microbit object (instead of one >> >> pre-set object called `microperi.microbit`, which >> it >> >> actually was originally) so that multiple >> micro:bits >> >> can be used at the same time. The constructor is: >> >> >> >> microperi.Microbit(port=None) >> >> >> >> If port is not specified, the module will >> >> automatically detect the first available micro:bit >> >> and use that one (Nick, the finding code is from >> >> microrepl - could you comment on licensing >> please?). >> >> Otherwise, `port` must be a string determining the >> >> serial port which the micro:bit is connected to >> >> (e.g: /dev/ttyACM0, COM1, etc). >> >> >> >> Usual usage of the object is along the following >> >> lines (or, more literal, line): >> >> >> >> microbit = microperi.Microbit() >> >> >> >> and then things like the microbit.Image class are >> >> available through `microbit.Image`. However, if I >> >> were to call the micro:bit object a different name >> >> in my script (such as "uBit"), the Image class >> would >> >> be accessible as uBit.Image, which deviates from >> the >> >> MicroPython API. However, we did not want to place >> >> things like the Image & pin classes in somewhere >> >> like `microperi.microbit.Class_name` because then >> >> you'd have a bit of a mess like so: >> >> >> >> from microperi import * >> >> uBit = Microbit() >> >> solid = microbit.Image.SNAKE >> >> uBit.display.show(solid) >> >> >> >> because some things (e.g: microbit.i2c.read) would >> >> be accessible through `uBit.i2c.read`, and others >> >> (e.g: microbit.Image) would be accessible through >> >> `microbit.Image`, when they both should be under >> >> `microbit.X`, if you understand what I mean. >> >> >> >> The best solution for this currently is just >> calling >> >> the object `microbit`, and then everything will be >> >> as it should, but if you don't some things will be >> >> in different places. >> >> >> >> Anyway, I hope that this module will prove itself >> >> useful for people and perhaps even in the >> classroom, >> >> as it notably allows not only use of the microbit >> >> module but also every other Python 3 module out >> >> there, allowing much more powerful (possibly IoT >> >> integrated?) scripts to be created on a much more >> >> powerful machine. I look forward to any feedback, >> >> and hope for a proper, stable release (with >> >> documentation of some sort) sometime soon. >> >> >> >> _______________________________________________ >> >> 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 >> >> >> >> >> >> _______________________________________________ >> >> 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 >> > >> >> -- >> Marc-Andre Lemburg >> eGenix.com >> >> Professional Python Services directly from the Experts (#1, May 16 2016) >> >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >> >>> Python Database Interfaces ... http://products.egenix.com/ >> >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ >> ________________________________________________________________________ >> >> ::: We implement business ideas - efficiently in both time and costs ::: >> >> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 >> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg >> Registered at Amtsgericht Duesseldorf: HRB 46611 >> http://www.egenix.com/company/contact/ >> http://www.malemburg.com/ >> >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Mon May 16 07:25:16 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 16 May 2016 12:25:16 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: Joe & Andrew: great work! But did you know about raw REPL mode? If you type ctrl-A at the REPL then it goes into this mode which is like the normal REPL but does not echo characters back. It also requires you to send ctrl-D to finish the input (and thus you can enter multiple lines, even blank lines, as part of your input). Raw REPL mode is used to talk to MicroPython from a PC, so is exactly what you want! On Mon, May 16, 2016 at 12:12 PM, David Whale wrote: > Joe, I like what you did there! > > https://github.com/JoeGlancy/microperi/blob/master/microperi/microperi.py#L20 > > Great stuff. > > Zero install, if possible, is always the way to go! > > David > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > Software Engineer and IET Schools Liaison Officer, Essex > > > On 16 May 2016 at 11:59, Joe Glancy wrote: >> >> Yeah, pretty much every school uses Windows (I think most often it's >> Windows 7?). >> >> Thanks for the tip David - microperi is now completely portable and >> requires 0 installation (plus very little effort). >> >> >> On Mon, 16 May 2016, 10:57 M.-A. Lemburg, wrote: >>> >>> On 16.05.2016 09:47, Nicholas H.Tollervey wrote: >>> > For the Mu editor Carlos did some amazing work in automatically >>> > building >>> > a stand-alone executable for Windows, OSX and Linux. >>> > >>> > Of course, Windows will complain if you try to run a stand-alone >>> > executable and warn you to the extent that you'll imagine the world is >>> > about to end, but there you go. >>> >>> Why is that ? Because you are accessing the serial port ? >>> I think you can get (at least partially) around this by signing >>> the executable. >>> >>> > Unfortunately, the real problem (the way schools organise their IT) is >>> > impossible for us to fix. Ergo all this faffing about. Nevertheless, >>> > it's worth it when teachers and kids get their hands on the good stuff. >>> >>> Am I right in assuming that most schools use Windows for their >>> (kids) PCs ? >>> >>> > Best wishes, >>> > >>> > N. >>> > >>> > On 15/05/16 16:13, David Whale wrote: >>> >> Hi Joe, >>> >> >>> >> Yes, but the way we typically do this is to unzip the package >>> >> directory >>> >> into the users project directory. That's how I do it with the anyio >>> >> library I wrote for my minecraft book, and that's ow the original >>> >> mb_remote works. >>> >> >>> >> i.e. if the user project directory is my_awesome_project >>> >> ...and if there is a file my_awesome_project/test1.py >>> >> ...and if there is a folder my_awesome_project/microbit >>> >> >>> >> ...then when you import microbit in test1.py, it all works. >>> >> >>> >> The embedded serial folder inside the microbit folder (with it's magic >>> >> sys.path modifier) just makes it all work seamlessly. >>> >> >>> >> It really is very simple to use. >>> >> >>> >> Lines 28..33 >>> >> here: >>> >> https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 >>> >> >>> >> >>> >> Teachers hate it when you have to run install scripts and need admin >>> >> access, because (a) it means you have to beg to the IT technician >>> >> which >>> >> sometimes takes months (literally), and (b) it means that they have to >>> >> consider which machines are configured correctly and which are not. >>> >> >>> >> If all you have to do is unzip a folder and start coding, it's >>> >> *really* >>> >> simple. They can even give the instructions to the kids and they can >>> >> just unzip the file into their user directory and it all works >>> >> seamlessly. >>> >> >>> >> In one school, it took the technician 3 months (of continuous teacher >>> >> begging) to get python installed, just so they could run the GCSE >>> >> controlled assessments. >>> >> >>> >> David >>> >> >>> >> >>> >> ___________________________________________________________ >>> >> David Whale, B.Sc (Hons), MIET >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* >>> >> >>> >> >>> >> On 15 May 2016 at 13:21, Joe Glancy >> >> > wrote: >>> >> >>> >> That's a good point - embedding pyserial would certainly make it >>> >> more portable, as it doesn't depend on anything else except >>> >> standard >>> >> modules then. The only (small) limitation with a zero install is >>> >> that scripts would have to be in the same location as the module's >>> >> directory, but that's hardly an issue. >>> >> >>> >> >>> >> On Sun, 15 May 2016, 10:42 David Whale, >>> >> >> >> > wrote: >>> >> >>> >> Joe and Andrew, >>> >> >>> >> Just a comment about this, please read this article, and >>> >> consider *changing* how you package this, especially for >>> >> teachers: >>> >> >>> >> >>> >> https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ >>> >> >>> >> The version that I wrote back in August 2015 is zero install - >>> >> yes, ZERO install. All a teacher has to do is to press the >>> >> DownloadZip button, unzip it, and run it. This is VITAL for >>> >> teachers to use these resources, especially on a Raspberry Pi >>> >> where mostly they are not connected to the internet most of >>> >> the >>> >> time. Most of the time they want to just grab a file on a USB >>> >> memory stick, and copy it over. sudo pip install is *useless* >>> >> in >>> >> this situation. >>> >> >>> >> Raspberry Pi's are mostly not connected to the internet in >>> >> schools, because it stores the wifi password in plain text in >>> >> the config file, and school IT technicians ban the teachers >>> >> from >>> >> using them for this reason (as it exposes the password to the >>> >> kids, and then all their phones start connecting to the wifi >>> >> and >>> >> makes it crash). Really, this is a big problem, believe me! >>> >> >>> >> The way I did this was to *embed* pyserial into the package >>> >> (and >>> >> the licence allows for this providing you are clear about the >>> >> containing licence). Please see my original >>> >> here: https://github.com/whaleygeek/mb_remote and you will see >>> >> this works really great. There is also a little bit of python >>> >> magic in the file (it modifies the sys.path inplace) to make >>> >> sure that this happens automatically. (you need to make this >>> >> Python 3 safe still, of course). >>> >> >>> >> Can I strongly urge you to make it zero install? It'll get >>> >> adopted really quickly that way. >>> >> >>> >> I've had a number of chats with teachers already about this >>> >> and >>> >> they are really excited about it, but they said to me 'ah, >>> >> it's >>> >> all that sudo pip stuff, that never works for us'. Lots of >>> >> teachers I speak to gave in with PyGameZero because they >>> >> couldn't get it to install. >>> >> >>> >> Thanks >>> >> >>> >> David >>> >> >>> >> >>> >> >>> >> >>> >> ___________________________________________________________ >>> >> David Whale, B.Sc (Hons), MIET >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* >>> >> >>> >> >>> >> On 14 May 2016 at 22:54, Joe Glancy >> >> > wrote: >>> >> >>> >> Thanks David :) >>> >> >>> >> I'll see if I can find that demo and get it up and working >>> >> with this module - would be nice to have some examples >>> >> with >>> >> it where it can interact with things such as MCPI straight >>> >> out of the box. >>> >> >>> >> And indeed it does make an excellent addon, mostly thanks >>> >> to >>> >> the pretty much universal serial interface it uses to >>> >> communicate (which allows it to be easily interfaced on >>> >> many >>> >> platforms with minimal (or even none) setup required). >>> >> >>> >> As a matter of fact, I thought up of something very >>> >> similar >>> >> to this but which communicated over Bluetooth instead a >>> >> while ago (using a stock micro:bit image), with a >>> >> Raspberry >>> >> Pi 3 and micro:bit as use case. Unfortunately, I found it >>> >> impossible to get the micro:bit to work properly with >>> >> BlueZ, >>> >> despite some help from the BlueZ IRC and Linux Bluetooth >>> >> mailing list.This kind of lead to the wired approach you >>> >> see >>> >> now. Maybe the recent BlueZ updates will fix this, so that >>> >> a >>> >> wireless alternative to this module exists too. >>> >> >>> >> >>> >> On Sat, 14 May 2016, 22:25 David Whale, >>> >> >> >> > wrote: >>> >> >>> >> Looks great, Joe and Andrew! >>> >> >>> >> Yes, I wrote this original mb_remote version back in >>> >> August 2015, but the Python API on the micro:bit >>> >> changed >>> >> many times since then and I've been too busy to >>> >> maintain >>> >> it. However, it's great to see this moving forward. >>> >> There are some really nice use cases (especially >>> >> micro:bit + Raspberry Pi) where this sort of approach >>> >> is >>> >> both really useful and great fun, as I discovered with >>> >> my early tests. >>> >> >>> >> The 'flying xwing in minecraft with a micro:bit' that >>> >> Martin and I did, was really the inspiration for me >>> >> writing the mb_remote, more to get a feel for what it >>> >> would look like than anything else. I had come to the >>> >> conclusion that the micro:bit makes a great peripheral >>> >> for other computers, what with it's onboard sensors >>> >> and >>> >> I/O pins, and having a really quick way to extend your >>> >> python from the host PC onto the micro:bit is really >>> >> fun. >>> >> >>> >> I'm also glad to see you take forward the idea of >>> >> poking >>> >> commands into the REPL and getting responses (that's >>> >> much better than having to load custom firmware onto >>> >> the >>> >> micro:bit, as other solutions tend to go for). >>> >> >>> >> David >>> >> >>> >> >>> >> >>> >> ___________________________________________________________ >>> >> David Whale, B.Sc (Hons), MIET >>> >> *Software Engineer and IET Schools Liaison Officer, >>> >> Essex* >>> >> >>> >> >>> >> On 14 May 2016 at 20:58, Joe Glancy >>> >> >> >> > >>> >> wrote: >>> >> >>> >> Myself and Andrew (Mulholland, @gbaman on GitHub - >>> >> credit to him for first starting this) have been >>> >> working on something similar to David's mb_remote >>> >> module for Python, called microperi >>> >> (micro-peripheral, as that is what the micro:bit >>> >> becomes :). It is currently (and very much) an >>> >> alpha >>> >> work-in-progress, and I'm only informing everyone >>> >> here about it because we need testers and, more >>> >> importantly, feedback. >>> >> >>> >> It lives at >>> >> https://github.com/JoeGlancy/microperi, >>> >> and because none of the install methods >>> >> (pip3/python3 setup.py install) work properly as >>> >> of >>> >> now, the best way to try it is just create your >>> >> scripts in the same directory where the docs >>> >> (README, CONTRIBUTING etc) are and use `import >>> >> microperi` (check out the example in the README >>> >> for >>> >> a bit of a better howto). >>> >> >>> >> It exposes almost all of the micro:bit's >>> >> MicroPython >>> >> `microbit` module, which is completely available >>> >> through a microperi.Microbit object. This is >>> >> actually one of the things that I'd like feedback >>> >> about; see below for more information (I don't >>> >> think >>> >> I've explained this too well, but it's the best I >>> >> could think of and word). If you just want to try >>> >> it >>> >> out, get cloning and give it a whirl. Anything you >>> >> spot as a bug or something you feel needs to be >>> >> improved/implemented, just create an issue or >>> >> submit >>> >> a PR (check CONTRIBUTING.rst first though). >>> >> >>> >> We decided on the Microbit object (instead of one >>> >> pre-set object called `microperi.microbit`, which >>> >> it >>> >> actually was originally) so that multiple >>> >> micro:bits >>> >> can be used at the same time. The constructor is: >>> >> >>> >> microperi.Microbit(port=None) >>> >> >>> >> If port is not specified, the module will >>> >> automatically detect the first available micro:bit >>> >> and use that one (Nick, the finding code is from >>> >> microrepl - could you comment on licensing >>> >> please?). >>> >> Otherwise, `port` must be a string determining the >>> >> serial port which the micro:bit is connected to >>> >> (e.g: /dev/ttyACM0, COM1, etc). >>> >> >>> >> Usual usage of the object is along the following >>> >> lines (or, more literal, line): >>> >> >>> >> microbit = microperi.Microbit() >>> >> >>> >> and then things like the microbit.Image class are >>> >> available through `microbit.Image`. However, if I >>> >> were to call the micro:bit object a different name >>> >> in my script (such as "uBit"), the Image class >>> >> would >>> >> be accessible as uBit.Image, which deviates from >>> >> the >>> >> MicroPython API. However, we did not want to place >>> >> things like the Image & pin classes in somewhere >>> >> like `microperi.microbit.Class_name` because then >>> >> you'd have a bit of a mess like so: >>> >> >>> >> from microperi import * >>> >> uBit = Microbit() >>> >> solid = microbit.Image.SNAKE >>> >> uBit.display.show(solid) >>> >> >>> >> because some things (e.g: microbit.i2c.read) would >>> >> be accessible through `uBit.i2c.read`, and others >>> >> (e.g: microbit.Image) would be accessible through >>> >> `microbit.Image`, when they both should be under >>> >> `microbit.X`, if you understand what I mean. >>> >> >>> >> The best solution for this currently is just >>> >> calling >>> >> the object `microbit`, and then everything will be >>> >> as it should, but if you don't some things will be >>> >> in different places. >>> >> >>> >> Anyway, I hope that this module will prove itself >>> >> useful for people and perhaps even in the >>> >> classroom, >>> >> as it notably allows not only use of the microbit >>> >> module but also every other Python 3 module out >>> >> there, allowing much more powerful (possibly IoT >>> >> integrated?) scripts to be created on a much more >>> >> powerful machine. I look forward to any feedback, >>> >> and hope for a proper, stable release (with >>> >> documentation of some sort) sometime soon. >>> >> >>> >> _______________________________________________ >>> >> 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 >>> >> >>> >> >>> >> _______________________________________________ >>> >> 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 >>> > >>> >>> -- >>> Marc-Andre Lemburg >>> eGenix.com >>> >>> Professional Python Services directly from the Experts (#1, May 16 2016) >>> >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> >>> Python Database Interfaces ... http://products.egenix.com/ >>> >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ >>> ________________________________________________________________________ >>> >>> ::: We implement business ideas - efficiently in both time and costs ::: >>> >>> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 >>> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg >>> Registered at Amtsgericht Duesseldorf: HRB 46611 >>> http://www.egenix.com/company/contact/ >>> http://www.malemburg.com/ >>> >>> _______________________________________________ >>> 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 > From joe.t.glancy at gmail.com Mon May 16 07:39:13 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Mon, 16 May 2016 11:39:13 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: That's something I haven't considered yet - I assume that you'll get the normal output from a command (if any)? On Mon, 16 May 2016, 12:25 Damien George, wrote: > Joe & Andrew: great work! But did you know about raw REPL mode? If > you type ctrl-A at the REPL then it goes into this mode which is like > the normal REPL but does not echo characters back. It also requires > you to send ctrl-D to finish the input (and thus you can enter > multiple lines, even blank lines, as part of your input). Raw REPL > mode is used to talk to MicroPython from a PC, so is exactly what you > want! > > On Mon, May 16, 2016 at 12:12 PM, David Whale > wrote: > > Joe, I like what you did there! > > > > > https://github.com/JoeGlancy/microperi/blob/master/microperi/microperi.py#L20 > > > > Great stuff. > > > > Zero install, if possible, is always the way to go! > > > > David > > > > > > ___________________________________________________________ > > David Whale, B.Sc (Hons), MIET > > Software Engineer and IET Schools Liaison Officer, Essex > > > > > > On 16 May 2016 at 11:59, Joe Glancy wrote: > >> > >> Yeah, pretty much every school uses Windows (I think most often it's > >> Windows 7?). > >> > >> Thanks for the tip David - microperi is now completely portable and > >> requires 0 installation (plus very little effort). > >> > >> > >> On Mon, 16 May 2016, 10:57 M.-A. Lemburg, wrote: > >>> > >>> On 16.05.2016 09:47, Nicholas H.Tollervey wrote: > >>> > For the Mu editor Carlos did some amazing work in automatically > >>> > building > >>> > a stand-alone executable for Windows, OSX and Linux. > >>> > > >>> > Of course, Windows will complain if you try to run a stand-alone > >>> > executable and warn you to the extent that you'll imagine the world > is > >>> > about to end, but there you go. > >>> > >>> Why is that ? Because you are accessing the serial port ? > >>> I think you can get (at least partially) around this by signing > >>> the executable. > >>> > >>> > Unfortunately, the real problem (the way schools organise their IT) > is > >>> > impossible for us to fix. Ergo all this faffing about. Nevertheless, > >>> > it's worth it when teachers and kids get their hands on the good > stuff. > >>> > >>> Am I right in assuming that most schools use Windows for their > >>> (kids) PCs ? > >>> > >>> > Best wishes, > >>> > > >>> > N. > >>> > > >>> > On 15/05/16 16:13, David Whale wrote: > >>> >> Hi Joe, > >>> >> > >>> >> Yes, but the way we typically do this is to unzip the package > >>> >> directory > >>> >> into the users project directory. That's how I do it with the anyio > >>> >> library I wrote for my minecraft book, and that's ow the original > >>> >> mb_remote works. > >>> >> > >>> >> i.e. if the user project directory is my_awesome_project > >>> >> ...and if there is a file my_awesome_project/test1.py > >>> >> ...and if there is a folder my_awesome_project/microbit > >>> >> > >>> >> ...then when you import microbit in test1.py, it all works. > >>> >> > >>> >> The embedded serial folder inside the microbit folder (with it's > magic > >>> >> sys.path modifier) just makes it all work seamlessly. > >>> >> > >>> >> It really is very simple to use. > >>> >> > >>> >> Lines 28..33 > >>> >> here: > >>> >> > https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 > >>> >> > >>> >> > >>> >> Teachers hate it when you have to run install scripts and need admin > >>> >> access, because (a) it means you have to beg to the IT technician > >>> >> which > >>> >> sometimes takes months (literally), and (b) it means that they have > to > >>> >> consider which machines are configured correctly and which are not. > >>> >> > >>> >> If all you have to do is unzip a folder and start coding, it's > >>> >> *really* > >>> >> simple. They can even give the instructions to the kids and they can > >>> >> just unzip the file into their user directory and it all works > >>> >> seamlessly. > >>> >> > >>> >> In one school, it took the technician 3 months (of continuous > teacher > >>> >> begging) to get python installed, just so they could run the GCSE > >>> >> controlled assessments. > >>> >> > >>> >> David > >>> >> > >>> >> > >>> >> ___________________________________________________________ > >>> >> David Whale, B.Sc (Hons), MIET > >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* > >>> >> > >>> >> > >>> >> On 15 May 2016 at 13:21, Joe Glancy >>> >> > wrote: > >>> >> > >>> >> That's a good point - embedding pyserial would certainly make it > >>> >> more portable, as it doesn't depend on anything else except > >>> >> standard > >>> >> modules then. The only (small) limitation with a zero install is > >>> >> that scripts would have to be in the same location as the > module's > >>> >> directory, but that's hardly an issue. > >>> >> > >>> >> > >>> >> On Sun, 15 May 2016, 10:42 David Whale, > >>> >> >>> >> > wrote: > >>> >> > >>> >> Joe and Andrew, > >>> >> > >>> >> Just a comment about this, please read this article, and > >>> >> consider *changing* how you package this, especially for > >>> >> teachers: > >>> >> > >>> >> > >>> >> > https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ > >>> >> > >>> >> The version that I wrote back in August 2015 is zero > install - > >>> >> yes, ZERO install. All a teacher has to do is to press the > >>> >> DownloadZip button, unzip it, and run it. This is VITAL for > >>> >> teachers to use these resources, especially on a Raspberry > Pi > >>> >> where mostly they are not connected to the internet most of > >>> >> the > >>> >> time. Most of the time they want to just grab a file on a > USB > >>> >> memory stick, and copy it over. sudo pip install is > *useless* > >>> >> in > >>> >> this situation. > >>> >> > >>> >> Raspberry Pi's are mostly not connected to the internet in > >>> >> schools, because it stores the wifi password in plain text > in > >>> >> the config file, and school IT technicians ban the teachers > >>> >> from > >>> >> using them for this reason (as it exposes the password to > the > >>> >> kids, and then all their phones start connecting to the wifi > >>> >> and > >>> >> makes it crash). Really, this is a big problem, believe me! > >>> >> > >>> >> The way I did this was to *embed* pyserial into the package > >>> >> (and > >>> >> the licence allows for this providing you are clear about > the > >>> >> containing licence). Please see my original > >>> >> here: https://github.com/whaleygeek/mb_remote and you will > see > >>> >> this works really great. There is also a little bit of > python > >>> >> magic in the file (it modifies the sys.path inplace) to make > >>> >> sure that this happens automatically. (you need to make this > >>> >> Python 3 safe still, of course). > >>> >> > >>> >> Can I strongly urge you to make it zero install? It'll get > >>> >> adopted really quickly that way. > >>> >> > >>> >> I've had a number of chats with teachers already about this > >>> >> and > >>> >> they are really excited about it, but they said to me 'ah, > >>> >> it's > >>> >> all that sudo pip stuff, that never works for us'. Lots of > >>> >> teachers I speak to gave in with PyGameZero because they > >>> >> couldn't get it to install. > >>> >> > >>> >> Thanks > >>> >> > >>> >> David > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> ___________________________________________________________ > >>> >> David Whale, B.Sc (Hons), MIET > >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* > >>> >> > >>> >> > >>> >> On 14 May 2016 at 22:54, Joe Glancy >>> >> > wrote: > >>> >> > >>> >> Thanks David :) > >>> >> > >>> >> I'll see if I can find that demo and get it up and > working > >>> >> with this module - would be nice to have some examples > >>> >> with > >>> >> it where it can interact with things such as MCPI > straight > >>> >> out of the box. > >>> >> > >>> >> And indeed it does make an excellent addon, mostly > thanks > >>> >> to > >>> >> the pretty much universal serial interface it uses to > >>> >> communicate (which allows it to be easily interfaced on > >>> >> many > >>> >> platforms with minimal (or even none) setup required). > >>> >> > >>> >> As a matter of fact, I thought up of something very > >>> >> similar > >>> >> to this but which communicated over Bluetooth instead a > >>> >> while ago (using a stock micro:bit image), with a > >>> >> Raspberry > >>> >> Pi 3 and micro:bit as use case. Unfortunately, I found > it > >>> >> impossible to get the micro:bit to work properly with > >>> >> BlueZ, > >>> >> despite some help from the BlueZ IRC and Linux Bluetooth > >>> >> mailing list.This kind of lead to the wired approach you > >>> >> see > >>> >> now. Maybe the recent BlueZ updates will fix this, so > that > >>> >> a > >>> >> wireless alternative to this module exists too. > >>> >> > >>> >> > >>> >> On Sat, 14 May 2016, 22:25 David Whale, > >>> >> >>> >> > wrote: > >>> >> > >>> >> Looks great, Joe and Andrew! > >>> >> > >>> >> Yes, I wrote this original mb_remote version back in > >>> >> August 2015, but the Python API on the micro:bit > >>> >> changed > >>> >> many times since then and I've been too busy to > >>> >> maintain > >>> >> it. However, it's great to see this moving forward. > >>> >> There are some really nice use cases (especially > >>> >> micro:bit + Raspberry Pi) where this sort of > approach > >>> >> is > >>> >> both really useful and great fun, as I discovered > with > >>> >> my early tests. > >>> >> > >>> >> The 'flying xwing in minecraft with a micro:bit' > that > >>> >> Martin and I did, was really the inspiration for me > >>> >> writing the mb_remote, more to get a feel for what > it > >>> >> would look like than anything else. I had come to > the > >>> >> conclusion that the micro:bit makes a great > peripheral > >>> >> for other computers, what with it's onboard sensors > >>> >> and > >>> >> I/O pins, and having a really quick way to extend > your > >>> >> python from the host PC onto the micro:bit is really > >>> >> fun. > >>> >> > >>> >> I'm also glad to see you take forward the idea of > >>> >> poking > >>> >> commands into the REPL and getting responses (that's > >>> >> much better than having to load custom firmware onto > >>> >> the > >>> >> micro:bit, as other solutions tend to go for). > >>> >> > >>> >> David > >>> >> > >>> >> > >>> >> > >>> >> ___________________________________________________________ > >>> >> David Whale, B.Sc (Hons), MIET > >>> >> *Software Engineer and IET Schools Liaison Officer, > >>> >> Essex* > >>> >> > >>> >> > >>> >> On 14 May 2016 at 20:58, Joe Glancy > >>> >> >>> >> > > >>> >> wrote: > >>> >> > >>> >> Myself and Andrew (Mulholland, @gbaman on > GitHub - > >>> >> credit to him for first starting this) have been > >>> >> working on something similar to David's > mb_remote > >>> >> module for Python, called microperi > >>> >> (micro-peripheral, as that is what the micro:bit > >>> >> becomes :). It is currently (and very much) an > >>> >> alpha > >>> >> work-in-progress, and I'm only informing > everyone > >>> >> here about it because we need testers and, more > >>> >> importantly, feedback. > >>> >> > >>> >> It lives at > >>> >> https://github.com/JoeGlancy/microperi, > >>> >> and because none of the install methods > >>> >> (pip3/python3 setup.py install) work properly as > >>> >> of > >>> >> now, the best way to try it is just create your > >>> >> scripts in the same directory where the docs > >>> >> (README, CONTRIBUTING etc) are and use `import > >>> >> microperi` (check out the example in the README > >>> >> for > >>> >> a bit of a better howto). > >>> >> > >>> >> It exposes almost all of the micro:bit's > >>> >> MicroPython > >>> >> `microbit` module, which is completely available > >>> >> through a microperi.Microbit object. This is > >>> >> actually one of the things that I'd like > feedback > >>> >> about; see below for more information (I don't > >>> >> think > >>> >> I've explained this too well, but it's the best > I > >>> >> could think of and word). If you just want to > try > >>> >> it > >>> >> out, get cloning and give it a whirl. Anything > you > >>> >> spot as a bug or something you feel needs to be > >>> >> improved/implemented, just create an issue or > >>> >> submit > >>> >> a PR (check CONTRIBUTING.rst first though). > >>> >> > >>> >> We decided on the Microbit object (instead of > one > >>> >> pre-set object called `microperi.microbit`, > which > >>> >> it > >>> >> actually was originally) so that multiple > >>> >> micro:bits > >>> >> can be used at the same time. The constructor > is: > >>> >> > >>> >> microperi.Microbit(port=None) > >>> >> > >>> >> If port is not specified, the module will > >>> >> automatically detect the first available > micro:bit > >>> >> and use that one (Nick, the finding code is from > >>> >> microrepl - could you comment on licensing > >>> >> please?). > >>> >> Otherwise, `port` must be a string determining > the > >>> >> serial port which the micro:bit is connected to > >>> >> (e.g: /dev/ttyACM0, COM1, etc). > >>> >> > >>> >> Usual usage of the object is along the following > >>> >> lines (or, more literal, line): > >>> >> > >>> >> microbit = microperi.Microbit() > >>> >> > >>> >> and then things like the microbit.Image class > are > >>> >> available through `microbit.Image`. However, if > I > >>> >> were to call the micro:bit object a different > name > >>> >> in my script (such as "uBit"), the Image class > >>> >> would > >>> >> be accessible as uBit.Image, which deviates from > >>> >> the > >>> >> MicroPython API. However, we did not want to > place > >>> >> things like the Image & pin classes in somewhere > >>> >> like `microperi.microbit.Class_name` because > then > >>> >> you'd have a bit of a mess like so: > >>> >> > >>> >> from microperi import * > >>> >> uBit = Microbit() > >>> >> solid = microbit.Image.SNAKE > >>> >> uBit.display.show(solid) > >>> >> > >>> >> because some things (e.g: microbit.i2c.read) > would > >>> >> be accessible through `uBit.i2c.read`, and > others > >>> >> (e.g: microbit.Image) would be accessible > through > >>> >> `microbit.Image`, when they both should be under > >>> >> `microbit.X`, if you understand what I mean. > >>> >> > >>> >> The best solution for this currently is just > >>> >> calling > >>> >> the object `microbit`, and then everything will > be > >>> >> as it should, but if you don't some things will > be > >>> >> in different places. > >>> >> > >>> >> Anyway, I hope that this module will prove > itself > >>> >> useful for people and perhaps even in the > >>> >> classroom, > >>> >> as it notably allows not only use of the > microbit > >>> >> module but also every other Python 3 module out > >>> >> there, allowing much more powerful (possibly IoT > >>> >> integrated?) scripts to be created on a much > more > >>> >> powerful machine. I look forward to any > feedback, > >>> >> and hope for a proper, stable release (with > >>> >> documentation of some sort) sometime soon. > >>> >> > >>> >> _______________________________________________ > >>> >> 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 > >>> >> > >>> >> > >>> >> _______________________________________________ > >>> >> 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 > >>> > > >>> > >>> -- > >>> Marc-Andre Lemburg > >>> eGenix.com > >>> > >>> Professional Python Services directly from the Experts (#1, May 16 > 2016) > >>> >>> Python Projects, Coaching and Consulting ... > http://www.egenix.com/ > >>> >>> Python Database Interfaces ... > http://products.egenix.com/ > >>> >>> Plone/Zope Database Interfaces ... > http://zope.egenix.com/ > >>> > ________________________________________________________________________ > >>> > >>> ::: We implement business ideas - efficiently in both time and costs > ::: > >>> > >>> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > >>> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > >>> Registered at Amtsgericht Duesseldorf: HRB 46611 > >>> http://www.egenix.com/company/contact/ > >>> http://www.malemburg.com/ > >>> > >>> _______________________________________________ > >>> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Mon May 16 07:45:07 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 16 May 2016 12:45:07 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: Yes you still get normal output. So it should be easy to change microperi to use raw REPL. On Mon, May 16, 2016 at 12:39 PM, Joe Glancy wrote: > That's something I haven't considered yet - I assume that you'll get the > normal output from a command (if any)? > > > On Mon, 16 May 2016, 12:25 Damien George, wrote: >> >> Joe & Andrew: great work! But did you know about raw REPL mode? If >> you type ctrl-A at the REPL then it goes into this mode which is like >> the normal REPL but does not echo characters back. It also requires >> you to send ctrl-D to finish the input (and thus you can enter >> multiple lines, even blank lines, as part of your input). Raw REPL >> mode is used to talk to MicroPython from a PC, so is exactly what you >> want! >> >> On Mon, May 16, 2016 at 12:12 PM, David Whale >> wrote: >> > Joe, I like what you did there! >> > >> > >> > https://github.com/JoeGlancy/microperi/blob/master/microperi/microperi.py#L20 >> > >> > Great stuff. >> > >> > Zero install, if possible, is always the way to go! >> > >> > David >> > >> > >> > ___________________________________________________________ >> > David Whale, B.Sc (Hons), MIET >> > Software Engineer and IET Schools Liaison Officer, Essex >> > >> > >> > On 16 May 2016 at 11:59, Joe Glancy wrote: >> >> >> >> Yeah, pretty much every school uses Windows (I think most often it's >> >> Windows 7?). >> >> >> >> Thanks for the tip David - microperi is now completely portable and >> >> requires 0 installation (plus very little effort). >> >> >> >> >> >> On Mon, 16 May 2016, 10:57 M.-A. Lemburg, wrote: >> >>> >> >>> On 16.05.2016 09:47, Nicholas H.Tollervey wrote: >> >>> > For the Mu editor Carlos did some amazing work in automatically >> >>> > building >> >>> > a stand-alone executable for Windows, OSX and Linux. >> >>> > >> >>> > Of course, Windows will complain if you try to run a stand-alone >> >>> > executable and warn you to the extent that you'll imagine the world >> >>> > is >> >>> > about to end, but there you go. >> >>> >> >>> Why is that ? Because you are accessing the serial port ? >> >>> I think you can get (at least partially) around this by signing >> >>> the executable. >> >>> >> >>> > Unfortunately, the real problem (the way schools organise their IT) >> >>> > is >> >>> > impossible for us to fix. Ergo all this faffing about. Nevertheless, >> >>> > it's worth it when teachers and kids get their hands on the good >> >>> > stuff. >> >>> >> >>> Am I right in assuming that most schools use Windows for their >> >>> (kids) PCs ? >> >>> >> >>> > Best wishes, >> >>> > >> >>> > N. >> >>> > >> >>> > On 15/05/16 16:13, David Whale wrote: >> >>> >> Hi Joe, >> >>> >> >> >>> >> Yes, but the way we typically do this is to unzip the package >> >>> >> directory >> >>> >> into the users project directory. That's how I do it with the anyio >> >>> >> library I wrote for my minecraft book, and that's ow the original >> >>> >> mb_remote works. >> >>> >> >> >>> >> i.e. if the user project directory is my_awesome_project >> >>> >> ...and if there is a file my_awesome_project/test1.py >> >>> >> ...and if there is a folder my_awesome_project/microbit >> >>> >> >> >>> >> ...then when you import microbit in test1.py, it all works. >> >>> >> >> >>> >> The embedded serial folder inside the microbit folder (with it's >> >>> >> magic >> >>> >> sys.path modifier) just makes it all work seamlessly. >> >>> >> >> >>> >> It really is very simple to use. >> >>> >> >> >>> >> Lines 28..33 >> >>> >> here: >> >>> >> >> >>> >> https://github.com/whaleygeek/mb_remote/blob/master/src/microbit.py#L28 >> >>> >> >> >>> >> >> >>> >> Teachers hate it when you have to run install scripts and need >> >>> >> admin >> >>> >> access, because (a) it means you have to beg to the IT technician >> >>> >> which >> >>> >> sometimes takes months (literally), and (b) it means that they have >> >>> >> to >> >>> >> consider which machines are configured correctly and which are not. >> >>> >> >> >>> >> If all you have to do is unzip a folder and start coding, it's >> >>> >> *really* >> >>> >> simple. They can even give the instructions to the kids and they >> >>> >> can >> >>> >> just unzip the file into their user directory and it all works >> >>> >> seamlessly. >> >>> >> >> >>> >> In one school, it took the technician 3 months (of continuous >> >>> >> teacher >> >>> >> begging) to get python installed, just so they could run the GCSE >> >>> >> controlled assessments. >> >>> >> >> >>> >> David >> >>> >> >> >>> >> >> >>> >> ___________________________________________________________ >> >>> >> David Whale, B.Sc (Hons), MIET >> >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >>> >> >> >>> >> >> >>> >> On 15 May 2016 at 13:21, Joe Glancy > >>> >> > wrote: >> >>> >> >> >>> >> That's a good point - embedding pyserial would certainly make >> >>> >> it >> >>> >> more portable, as it doesn't depend on anything else except >> >>> >> standard >> >>> >> modules then. The only (small) limitation with a zero install >> >>> >> is >> >>> >> that scripts would have to be in the same location as the >> >>> >> module's >> >>> >> directory, but that's hardly an issue. >> >>> >> >> >>> >> >> >>> >> On Sun, 15 May 2016, 10:42 David Whale, >> >>> >> > >>> >> > wrote: >> >>> >> >> >>> >> Joe and Andrew, >> >>> >> >> >>> >> Just a comment about this, please read this article, and >> >>> >> consider *changing* how you package this, especially for >> >>> >> teachers: >> >>> >> >> >>> >> >> >>> >> >> >>> >> https://codeboom.wordpress.com/2016/05/11/scratch-is-the-new-powerpoint/ >> >>> >> >> >>> >> The version that I wrote back in August 2015 is zero >> >>> >> install - >> >>> >> yes, ZERO install. All a teacher has to do is to press the >> >>> >> DownloadZip button, unzip it, and run it. This is VITAL for >> >>> >> teachers to use these resources, especially on a Raspberry >> >>> >> Pi >> >>> >> where mostly they are not connected to the internet most of >> >>> >> the >> >>> >> time. Most of the time they want to just grab a file on a >> >>> >> USB >> >>> >> memory stick, and copy it over. sudo pip install is >> >>> >> *useless* >> >>> >> in >> >>> >> this situation. >> >>> >> >> >>> >> Raspberry Pi's are mostly not connected to the internet in >> >>> >> schools, because it stores the wifi password in plain text >> >>> >> in >> >>> >> the config file, and school IT technicians ban the teachers >> >>> >> from >> >>> >> using them for this reason (as it exposes the password to >> >>> >> the >> >>> >> kids, and then all their phones start connecting to the >> >>> >> wifi >> >>> >> and >> >>> >> makes it crash). Really, this is a big problem, believe me! >> >>> >> >> >>> >> The way I did this was to *embed* pyserial into the package >> >>> >> (and >> >>> >> the licence allows for this providing you are clear about >> >>> >> the >> >>> >> containing licence). Please see my original >> >>> >> here: https://github.com/whaleygeek/mb_remote and you will >> >>> >> see >> >>> >> this works really great. There is also a little bit of >> >>> >> python >> >>> >> magic in the file (it modifies the sys.path inplace) to >> >>> >> make >> >>> >> sure that this happens automatically. (you need to make >> >>> >> this >> >>> >> Python 3 safe still, of course). >> >>> >> >> >>> >> Can I strongly urge you to make it zero install? It'll get >> >>> >> adopted really quickly that way. >> >>> >> >> >>> >> I've had a number of chats with teachers already about this >> >>> >> and >> >>> >> they are really excited about it, but they said to me 'ah, >> >>> >> it's >> >>> >> all that sudo pip stuff, that never works for us'. Lots of >> >>> >> teachers I speak to gave in with PyGameZero because they >> >>> >> couldn't get it to install. >> >>> >> >> >>> >> Thanks >> >>> >> >> >>> >> David >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> ___________________________________________________________ >> >>> >> David Whale, B.Sc (Hons), MIET >> >>> >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >>> >> >> >>> >> >> >>> >> On 14 May 2016 at 22:54, Joe Glancy > >>> >> > wrote: >> >>> >> >> >>> >> Thanks David :) >> >>> >> >> >>> >> I'll see if I can find that demo and get it up and >> >>> >> working >> >>> >> with this module - would be nice to have some examples >> >>> >> with >> >>> >> it where it can interact with things such as MCPI >> >>> >> straight >> >>> >> out of the box. >> >>> >> >> >>> >> And indeed it does make an excellent addon, mostly >> >>> >> thanks >> >>> >> to >> >>> >> the pretty much universal serial interface it uses to >> >>> >> communicate (which allows it to be easily interfaced on >> >>> >> many >> >>> >> platforms with minimal (or even none) setup required). >> >>> >> >> >>> >> As a matter of fact, I thought up of something very >> >>> >> similar >> >>> >> to this but which communicated over Bluetooth instead a >> >>> >> while ago (using a stock micro:bit image), with a >> >>> >> Raspberry >> >>> >> Pi 3 and micro:bit as use case. Unfortunately, I found >> >>> >> it >> >>> >> impossible to get the micro:bit to work properly with >> >>> >> BlueZ, >> >>> >> despite some help from the BlueZ IRC and Linux >> >>> >> Bluetooth >> >>> >> mailing list.This kind of lead to the wired approach >> >>> >> you >> >>> >> see >> >>> >> now. Maybe the recent BlueZ updates will fix this, so >> >>> >> that >> >>> >> a >> >>> >> wireless alternative to this module exists too. >> >>> >> >> >>> >> >> >>> >> On Sat, 14 May 2016, 22:25 David Whale, >> >>> >> > >>> >> > wrote: >> >>> >> >> >>> >> Looks great, Joe and Andrew! >> >>> >> >> >>> >> Yes, I wrote this original mb_remote version back >> >>> >> in >> >>> >> August 2015, but the Python API on the micro:bit >> >>> >> changed >> >>> >> many times since then and I've been too busy to >> >>> >> maintain >> >>> >> it. However, it's great to see this moving forward. >> >>> >> There are some really nice use cases (especially >> >>> >> micro:bit + Raspberry Pi) where this sort of >> >>> >> approach >> >>> >> is >> >>> >> both really useful and great fun, as I discovered >> >>> >> with >> >>> >> my early tests. >> >>> >> >> >>> >> The 'flying xwing in minecraft with a micro:bit' >> >>> >> that >> >>> >> Martin and I did, was really the inspiration for me >> >>> >> writing the mb_remote, more to get a feel for what >> >>> >> it >> >>> >> would look like than anything else. I had come to >> >>> >> the >> >>> >> conclusion that the micro:bit makes a great >> >>> >> peripheral >> >>> >> for other computers, what with it's onboard sensors >> >>> >> and >> >>> >> I/O pins, and having a really quick way to extend >> >>> >> your >> >>> >> python from the host PC onto the micro:bit is >> >>> >> really >> >>> >> fun. >> >>> >> >> >>> >> I'm also glad to see you take forward the idea of >> >>> >> poking >> >>> >> commands into the REPL and getting responses >> >>> >> (that's >> >>> >> much better than having to load custom firmware >> >>> >> onto >> >>> >> the >> >>> >> micro:bit, as other solutions tend to go for). >> >>> >> >> >>> >> David >> >>> >> >> >>> >> >> >>> >> >> >>> >> ___________________________________________________________ >> >>> >> David Whale, B.Sc (Hons), MIET >> >>> >> *Software Engineer and IET Schools Liaison Officer, >> >>> >> Essex* >> >>> >> >> >>> >> >> >>> >> On 14 May 2016 at 20:58, Joe Glancy >> >>> >> > >>> >> > >> >>> >> wrote: >> >>> >> >> >>> >> Myself and Andrew (Mulholland, @gbaman on >> >>> >> GitHub - >> >>> >> credit to him for first starting this) have >> >>> >> been >> >>> >> working on something similar to David's >> >>> >> mb_remote >> >>> >> module for Python, called microperi >> >>> >> (micro-peripheral, as that is what the >> >>> >> micro:bit >> >>> >> becomes :). It is currently (and very much) an >> >>> >> alpha >> >>> >> work-in-progress, and I'm only informing >> >>> >> everyone >> >>> >> here about it because we need testers and, more >> >>> >> importantly, feedback. >> >>> >> >> >>> >> It lives at >> >>> >> https://github.com/JoeGlancy/microperi, >> >>> >> and because none of the install methods >> >>> >> (pip3/python3 setup.py install) work properly >> >>> >> as >> >>> >> of >> >>> >> now, the best way to try it is just create your >> >>> >> scripts in the same directory where the docs >> >>> >> (README, CONTRIBUTING etc) are and use `import >> >>> >> microperi` (check out the example in the README >> >>> >> for >> >>> >> a bit of a better howto). >> >>> >> >> >>> >> It exposes almost all of the micro:bit's >> >>> >> MicroPython >> >>> >> `microbit` module, which is completely >> >>> >> available >> >>> >> through a microperi.Microbit object. This is >> >>> >> actually one of the things that I'd like >> >>> >> feedback >> >>> >> about; see below for more information (I don't >> >>> >> think >> >>> >> I've explained this too well, but it's the best >> >>> >> I >> >>> >> could think of and word). If you just want to >> >>> >> try >> >>> >> it >> >>> >> out, get cloning and give it a whirl. Anything >> >>> >> you >> >>> >> spot as a bug or something you feel needs to be >> >>> >> improved/implemented, just create an issue or >> >>> >> submit >> >>> >> a PR (check CONTRIBUTING.rst first though). >> >>> >> >> >>> >> We decided on the Microbit object (instead of >> >>> >> one >> >>> >> pre-set object called `microperi.microbit`, >> >>> >> which >> >>> >> it >> >>> >> actually was originally) so that multiple >> >>> >> micro:bits >> >>> >> can be used at the same time. The constructor >> >>> >> is: >> >>> >> >> >>> >> microperi.Microbit(port=None) >> >>> >> >> >>> >> If port is not specified, the module will >> >>> >> automatically detect the first available >> >>> >> micro:bit >> >>> >> and use that one (Nick, the finding code is >> >>> >> from >> >>> >> microrepl - could you comment on licensing >> >>> >> please?). >> >>> >> Otherwise, `port` must be a string determining >> >>> >> the >> >>> >> serial port which the micro:bit is connected to >> >>> >> (e.g: /dev/ttyACM0, COM1, etc). >> >>> >> >> >>> >> Usual usage of the object is along the >> >>> >> following >> >>> >> lines (or, more literal, line): >> >>> >> >> >>> >> microbit = microperi.Microbit() >> >>> >> >> >>> >> and then things like the microbit.Image class >> >>> >> are >> >>> >> available through `microbit.Image`. However, if >> >>> >> I >> >>> >> were to call the micro:bit object a different >> >>> >> name >> >>> >> in my script (such as "uBit"), the Image class >> >>> >> would >> >>> >> be accessible as uBit.Image, which deviates >> >>> >> from >> >>> >> the >> >>> >> MicroPython API. However, we did not want to >> >>> >> place >> >>> >> things like the Image & pin classes in >> >>> >> somewhere >> >>> >> like `microperi.microbit.Class_name` because >> >>> >> then >> >>> >> you'd have a bit of a mess like so: >> >>> >> >> >>> >> from microperi import * >> >>> >> uBit = Microbit() >> >>> >> solid = microbit.Image.SNAKE >> >>> >> uBit.display.show(solid) >> >>> >> >> >>> >> because some things (e.g: microbit.i2c.read) >> >>> >> would >> >>> >> be accessible through `uBit.i2c.read`, and >> >>> >> others >> >>> >> (e.g: microbit.Image) would be accessible >> >>> >> through >> >>> >> `microbit.Image`, when they both should be >> >>> >> under >> >>> >> `microbit.X`, if you understand what I mean. >> >>> >> >> >>> >> The best solution for this currently is just >> >>> >> calling >> >>> >> the object `microbit`, and then everything will >> >>> >> be >> >>> >> as it should, but if you don't some things will >> >>> >> be >> >>> >> in different places. >> >>> >> >> >>> >> Anyway, I hope that this module will prove >> >>> >> itself >> >>> >> useful for people and perhaps even in the >> >>> >> classroom, >> >>> >> as it notably allows not only use of the >> >>> >> microbit >> >>> >> module but also every other Python 3 module out >> >>> >> there, allowing much more powerful (possibly >> >>> >> IoT >> >>> >> integrated?) scripts to be created on a much >> >>> >> more >> >>> >> powerful machine. I look forward to any >> >>> >> feedback, >> >>> >> and hope for a proper, stable release (with >> >>> >> documentation of some sort) sometime soon. >> >>> >> >> >>> >> _______________________________________________ >> >>> >> 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 >> >>> >> >> >>> >> >> >>> >> _______________________________________________ >> >>> >> 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 >> >>> > >> >>> >> >>> -- >> >>> Marc-Andre Lemburg >> >>> eGenix.com >> >>> >> >>> Professional Python Services directly from the Experts (#1, May 16 >> >>> 2016) >> >>> >>> Python Projects, Coaching and Consulting ... >> >>> >>> http://www.egenix.com/ >> >>> >>> Python Database Interfaces ... >> >>> >>> http://products.egenix.com/ >> >>> >>> Plone/Zope Database Interfaces ... >> >>> >>> http://zope.egenix.com/ >> >>> >> >>> ________________________________________________________________________ >> >>> >> >>> ::: We implement business ideas - efficiently in both time and costs >> >>> ::: >> >>> >> >>> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 >> >>> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg >> >>> Registered at Amtsgericht Duesseldorf: HRB 46611 >> >>> http://www.egenix.com/company/contact/ >> >>> http://www.malemburg.com/ >> >>> >> >>> _______________________________________________ >> >>> 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 > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From david at thinkingbinaries.com Mon May 16 08:14:24 2016 From: david at thinkingbinaries.com (David Whale) Date: Mon, 16 May 2016 13:14:24 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: Joe/Andrew, just one point of style. Is there a reason you called it microperi, rather than just calling it microbit? Really it is a microbit, isn't it, because you are talking to the microbit. It seems a shame to introduce another name, when the existing name will do fine? The reason I called my original August 2015 proof of concept 'microbit' is so that the same code you would run on the micro:bit itself could be copied and run on a Pi/PC/Mac *unmodified*, and it would essentially function the same, but the actual sensing and output would happen on the micro:bit rather than on the Pi/PC/Mac. You can then start to enhance the code on the Pi/PC/Mac to use additional non microbit libraries. I particularly thought that this mode of use would be a really good progression, to transition children up from the micro:bit to bigger platforms and give them more power (while bringing forward all their existing understanding about learning MicroPython on the micro:bit and allowing them a period of using both devices together in harmony. A couple of other thoughts: Raw REPL sounds good, it'll save mucking about with filtering out the echoback, which will simplify the link manager somewhat. Also it means (as Damien points out) you can send multiple lines, which could be useful in some cases to synthesise things that are harder to write with a single line of MicroPython code, e.g. such as if you want to wrap exception handlers around the code on the micro:bit end to improve the error handling. Don't forget that you could get your host code to dynamically define some functions inside MicroPython on the micro:bit to improve the handling of certain error cases, and this would still mean that you flash a vanilla MicroPython into it and all the intelligence is still in the host code (making it very easy to deploy to any micro:bit). Have you spoken to the Raspberry Pi foundation about this, I spoke to them months ago and they were interested in this idea, but you should raise it with them again, as they might consider including the code in the standard distribution once it has stabilised. RaspberryPi + micro:bit is a really good combination (especially if you run Python on both!) You could consider doing a file copy from the host code, to actually upload the MicroPython.hex file into the micro:bit for you (the .hex could be embedded inside your host module) so that you can just 'run and go' - I use this technique in some of my arduino/pi projects, where the python on the Raspberry Pi loads the firmware into the arduino first and then talks to it over serial, making the whole setup seamless for the user and single step. You could always have an option in the host code to urlfetch the .hex from the web if you don't want to always distribute it inside your package. P.S. for completeness, here is the work that Martin and I did on the Minecraft xwing - recoding this using this new technique will be great fun! http://www.stuffaboutcode.com/2015/12/minecraft-microbit-and-x-wing.html David -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.t.glancy at gmail.com Mon May 16 08:54:08 2016 From: joe.t.glancy at gmail.com (Joe Glancy) Date: Mon, 16 May 2016 12:54:08 +0000 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: The name is a combination of "micro" and "peripheral", because that's essentially what the micro:bit becomes. Yeah, raw REPL will be the next thing to implement - the current exception handler looks for the string "Traceback" in every line of output, and then grabs the name and message of the exception and re-throws it. This means you get the same exception that the micro:bit throws, but you don't get the original stack trace. Adding exception handlers could help, but the exceptions will still just be processed and the user will get to same outcome. I have not, might be something to tweet to them about - they certainly do make a great combo, especially for schools. That would add ~0.5MB to the module, quite a sizeable amount - it would probably be easier for the teachers to download an empty script from the online IDE and copy + paste it into the micro:bit's virtual drive. Downloading it from online would require an internet connection, which they might not have (zero install). It'll also take a while to flash it every time you want to use the device. On Mon, 16 May 2016, 13:14 David Whale, wrote: > Joe/Andrew, just one point of style. > > Is there a reason you called it microperi, rather than just calling it > microbit? Really it is a microbit, isn't it, because you are talking to the > microbit. It seems a shame to introduce another name, when the existing > name will do fine? > > The reason I called my original August 2015 proof of concept 'microbit' is > so that the same code you would run on the micro:bit itself could be copied > and run on a Pi/PC/Mac *unmodified*, and it would essentially function the > same, but the actual sensing and output would happen on the micro:bit > rather than on the Pi/PC/Mac. You can then start to enhance the code on the > Pi/PC/Mac to use additional non microbit libraries. > > I particularly thought that this mode of use would be a really good > progression, to transition children up from the micro:bit to bigger > platforms and give them more power (while bringing forward all their > existing understanding about learning MicroPython on the micro:bit and > allowing them a period of using both devices together in harmony. > > > A couple of other thoughts: > > Raw REPL sounds good, it'll save mucking about with filtering out the > echoback, which will simplify the link manager somewhat. Also it means (as > Damien points out) you can send multiple lines, which could be useful in > some cases to synthesise things that are harder to write with a single line > of MicroPython code, e.g. such as if you want to wrap exception handlers > around the code on the micro:bit end to improve the error handling. > > Don't forget that you could get your host code to dynamically define some > functions inside MicroPython on the micro:bit to improve the handling of > certain error cases, and this would still mean that you flash a vanilla > MicroPython into it and all the intelligence is still in the host code > (making it very easy to deploy to any micro:bit). > > Have you spoken to the Raspberry Pi foundation about this, I spoke to them > months ago and they were interested in this idea, but you should raise it > with them again, as they might consider including the code in the standard > distribution once it has stabilised. RaspberryPi + micro:bit is a really > good combination (especially if you run Python on both!) > > You could consider doing a file copy from the host code, to actually > upload the MicroPython.hex file into the micro:bit for you (the .hex could > be embedded inside your host module) so that you can just 'run and go' - I > use this technique in some of my arduino/pi projects, where the python on > the Raspberry Pi loads the firmware into the arduino first and then talks > to it over serial, making the whole setup seamless for the user and single > step. You could always have an option in the host code to urlfetch the .hex > from the web if you don't want to always distribute it inside your package. > > P.S. for completeness, here is the work that Martin and I did on the > Minecraft xwing - recoding this using this new technique will be great fun! > > http://www.stuffaboutcode.com/2015/12/minecraft-microbit-and-x-wing.html > > David > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Mon May 16 09:06:45 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 16 May 2016 14:06:45 +0100 Subject: [Microbit-Python] Say hola to microperi [WIP] In-Reply-To: References: <7437ab21-267a-d2f9-83dd-c61a4c0073a8@ntoll.org> <57399985.1040407@egenix.com> Message-ID: <3e37d6df-7fe9-056f-a113-c5906f47921a@ntoll.org> On 16/05/16 13:14, David Whale wrote: > Is there a reason you called it microperi, rather than just calling it > microbit? Really it is a microbit, isn't it, because you are talking to > the microbit. It seems a shame to introduce another name, when the > existing name will do fine? I think this would be a bad idea. I believe they've done the right thing with the following: from microperi import Microbit If they'd called the module "microbit" then it doesn't tell me what aspect of the micro:bit their module addresses. It's too broaf a name, if that makes sense. Having a Microbit class that you instantiate to talk to the device feels natural to me. Also the import statement is sort-of saying "from the micro:bit peripheral library import something that'll represent my device" which makes sense. If it were "from microbit import Microbit" it feels like there's too much "microbit" (we've achieved "peak microbit"). ;-) FWIW the BBC told me they don't like people using "micro*" for things, which is why I called all my libs uflash etc... (where "u" is, obviously, shorthand for "micro"). However, I pushed back and they appear to be a lot more friendly about this sort of thing (if you read their community guidelines). Hope this helps! N. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From dwight.hubbard at gmail.com Fri May 20 18:53:20 2016 From: dwight.hubbard at gmail.com (Dwight Hubbard) Date: Fri, 20 May 2016 15:53:20 -0700 Subject: [Microbit-Python] Pycon Sprints In-Reply-To: <551249e5-a8d5-07ce-8502-0a98d3f14df2@ntoll.org> References: <551249e5-a8d5-07ce-8502-0a98d3f14df2@ntoll.org> Message-ID: I did a post about sprints on the micropython forum. Which lists some of the things I'm interested in sprinting on. http://forum.micropython.org/viewtopic.php?f=2&t=1934 I have debated changing the sprint page but I don't want the micropython sprint information to take up to much space either. On Fri, May 13, 2016 at 12:45 AM, Nicholas H.Tollervey wrote: > On 12/05/16 17:55, Dwight Hubbard wrote: > > If possible it would be useful to have a sprint IRC channel or hangout > > running before pycon so people can coordinate more easily (anyone have a > > perfernce??). I personally like IRC but find hangouts works a lot > > better when I'm not on my computer. > > > > There's already the #micropython and #microbit channels on Freenode IRC. > > > It would also be good to know when people can attend the BOF ahead of > > time since the best times on the BOF board tend to fill up pretty > > quickly so we probably want to put our bof info on the board at badge > > pickup or the first morning. > > > > +1 Early evening is perhaps the best time because people can follow up > with a drink / meal. > > N. > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseph.mwangi01 at gmail.com Sun May 22 17:40:49 2016 From: joseph.mwangi01 at gmail.com (mwa_joe) Date: Mon, 23 May 2016 00:40:49 +0300 Subject: [Microbit-Python] How can I get MicroBit? Message-ID: <1463953249.11336.5.camel@gmail.com> Hi, I'm a university student in Kenya. I've been learning how to use python for some time now and I really like what I see. About this device, how can i access it? It looks like something I'd like to try our for a bit, and a bit, and a bit, and a bit.? From sparks.m at gmail.com Mon May 23 08:58:35 2016 From: sparks.m at gmail.com (Michael) Date: Mon, 23 May 2016 13:58:35 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <1463953249.11336.5.camel@gmail.com> References: <1463953249.11336.5.camel@gmail.com> Message-ID: At present they're only being shipped to school year 7 age children in the UK. (Which is 11/12 year olds) A limited number are appearing on ebay so that's one (overpriced generally) option, but at some point soon (after the Y7 shipments stop) they should go on sale through more normal channels - my impression is that this will be soon - if you can wait. For reference, there's also the Pyboard - which you can get hold of here: https://micropython.org/store/#/store Hope that's useful. Michael. On 22 May 2016 at 22:40, mwa_joe wrote: > Hi, I'm a university student in Kenya. I've been learning how to use > python for some time now and I really like what I see. About this > device, how can i access it? It looks like something I'd like to try > our for a bit, and a bit, and a bit, and a bit. > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From coryanws at gmail.com Thu May 26 07:55:24 2016 From: coryanws at gmail.com (Coryan) Date: Thu, 26 May 2016 12:55:24 +0100 Subject: [Microbit-Python] Nordic Memory Access In-Reply-To: References: Message-ID: <4e10b372-e8a0-f900-9577-df63aad35047@gmail.com> Hello folks, I've been having a pretty fun time adding inline assembler to my MicroPython scripts. As much fun as it is, it does also make debugging my code a bit tricky, and I'm not entirely sure that my read operations are working correctly. I was wondering anyone knows whether there are any areas in the Nordic chip's memory that have a fixed value, like a cpuid or something? If so, would you be able to tell me what their values ought to be on my device, or else where I'd be able to look those values up? I can then try reading this location and verify that my reads are working as intended. Thankyou once again for you help! Best Wishes, Coryan From damien.p.george at gmail.com Thu May 26 08:01:46 2016 From: damien.p.george at gmail.com (Damien George) Date: Thu, 26 May 2016 13:01:46 +0100 Subject: [Microbit-Python] Nordic Memory Access In-Reply-To: <4e10b372-e8a0-f900-9577-df63aad35047@gmail.com> References: <4e10b372-e8a0-f900-9577-df63aad35047@gmail.com> Message-ID: 0x10000060 and 0x10000064 hold the 64-bit unique ID of the device. 0x10000010 holds the code page size which should be 1024. Did you look at the examples/asmleds.py example script that shows how to use the inline assembler? On Thu, May 26, 2016 at 12:55 PM, Coryan wrote: > Hello folks, > > I've been having a pretty fun time adding inline assembler to my MicroPython > scripts. As much fun as it is, it does also make debugging my code a bit > tricky, and I'm not entirely sure that my read operations are working > correctly. > > I was wondering anyone knows whether there are any areas in the Nordic > chip's memory that have a fixed value, like a cpuid or something? If so, > would you be able to tell me what their values ought to be on my device, or > else where I'd be able to look those values up? I can then try reading this > location and verify that my reads are working as intended. > > Thankyou once again for you help! > > Best Wishes, > Coryan > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit From joseph.mwangi01 at gmail.com Tue May 24 07:43:37 2016 From: joseph.mwangi01 at gmail.com (mwa_joe) Date: Tue, 24 May 2016 14:43:37 +0300 Subject: [Microbit-Python] How can I get MicroBit? Message-ID: <1464090217.2230.1.camel@gmail.com> Hi, I'm a university student in Kenya. I've been learning how to use python for some time now and I really like what I see. About this device, how can i access it? It looks like something I'd like to try our for a bit, and a bit, and a bit, and a bit.? From a.grandi at gmail.com Thu May 26 09:23:19 2016 From: a.grandi at gmail.com (a.grandi at gmail.com) Date: Thu, 26 May 2016 14:23:19 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <1464090217.2230.1.camel@gmail.com> References: <1464090217.2230.1.camel@gmail.com> Message-ID: Hi, didn't you send exactly the same message 4 days ago and someone else already replied? Cheers On 24 May 2016 at 12:43, mwa_joe wrote: > Hi, I'm a university student in Kenya. I've been learning how to use > python for some time now and I really like what I see. About this > device, how can i access it? It looks like something I'd like to try > our for a bit, and a bit, and a bit, and a bit. > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit -- Andrea Grandi - Software Engineer Website: https://www.andreagrandi.it Twitter: https://twitter.com/andreagrandi GitHub: https://github.com/andreagrandi PGP: 7238 74F6 886D 5994 323F 1781 8CFB 47AD C384 F0CC From sparks.m at gmail.com Thu May 26 10:16:56 2016 From: sparks.m at gmail.com (Michael) Date: Thu, 26 May 2016 15:16:56 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: References: <1464090217.2230.1.camel@gmail.com> Message-ID: On 24 May 2016 at 12:43, mwa_joe wrote: > Hi, I'm a university student in Kenya. I've been learning how to use > python for some time now and I really like what I see. About this > device, how can i access it? It looks like something I'd like to try > our for a bit, and a bit, and a bit, and a bit. On 26 May 2016 at 14:23, a.grandi at gmail.com wrote: > Hi, > > didn't you send exactly the same message 4 days ago and someone else > already replied? > Things do change though :-) I just did my usual double check, and things appear to have moved on slightly: http://uk.farnell.com/bbc-microbit Contains content. They're not selling them yet though this looks like an interesting placeholder. Done a bit more rummaging and I suspect when they go on sale, this page will be updated: http://cpc.farnell.com/mksp1-bbc-micro-bit Michael. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stewart at penguintutor.com Thu May 26 16:48:28 2016 From: stewart at penguintutor.com (Stewart Watkiss) Date: Thu, 26 May 2016 21:48:28 +0100 Subject: [Microbit-Python] How can I get MicroBit? Message-ID: <5747611C.108@penguintutor.com> If you are interested in buying a micro:bit then you may want to follow @BBCMIDigital on Twitter. According to a tweet earlier this week: "Watch this space: If you're interested in purchasing a #*microbit* - information on price and suppliers will be released soon." I will also try and post something up here once they are on sale (although I'm planning a camping trip so if the announcement is soon Twitter may be more reliable). Stewart -- Stewart Watkiss @stewartwatkiss / @penguintutor -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.p.a.87 at gmail.com Thu May 26 17:56:06 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Thu, 26 May 2016 21:56:06 +0000 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <5747611C.108@penguintutor.com> References: <5747611C.108@penguintutor.com> Message-ID: Have a look at https://www.kitronik.co.uk/5614-bbc-microbit-board-only-retail-pack.html looks like at least the price has made it's way out. On Thu, 26 May 2016 22:50 Stewart Watkiss, wrote: > If you are interested in buying a micro:bit then you may want to follow > @BBCMIDigital on Twitter. > > According to a tweet earlier this week: > > "Watch this space: If you're interested in purchasing a #*microbit* > - information on price > and suppliers will be released soon." > > I will also try and post something up here once they are on sale (although > I'm planning a camping trip so if the announcement is soon Twitter may be > more reliable). > > > Stewart > -- > Stewart Watkiss > @stewartwatkiss / @penguintutor > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Thu May 26 18:26:42 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 26 May 2016 23:26:42 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: References: <5747611C.108@penguintutor.com> Message-ID: <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> Two things: 1) That's not the price I was told it was going to be for that sort of thing (it's a bit more expensive). 2) I am not allowed to reveal the price until I've been told I'm allowed to reveal the price. Perhaps someone at Kitronik didn't get the note (or I'm out of the loop). N. On 26/05/16 22:56, Carlos P.A. wrote: > Have a look at > https://www.kitronik.co.uk/5614-bbc-microbit-board-only-retail-pack.html > looks like at least the price has made it's way out. > > > > On Thu, 26 May 2016 22:50 Stewart Watkiss, > wrote: > > If you are interested in buying a micro:bit then you may want to > follow @BBCMIDigital on Twitter. > > According to a tweet earlier this week: > > "Watch this space: If you're interested in purchasing a #*microbit* > - information on > price and suppliers will be released soon." > > I will also try and post something up here once they are on sale > (although I'm planning a camping trip so if the announcement is soon > Twitter may be more reliable). > > > Stewart > -- > Stewart Watkiss > @stewartwatkiss / @penguintutor > _______________________________________________ > 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From carlos.p.a.87 at gmail.com Fri May 27 04:35:20 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Fri, 27 May 2016 09:35:20 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> References: <5747611C.108@penguintutor.com> <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> Message-ID: Taking in consideration they just removed the listing, it sounds like they might have jumped the gun on this one... (they listed the price and approximate release date) On 26 May 2016 at 23:26, Nicholas H.Tollervey wrote: > Two things: > > 1) That's not the price I was told it was going to be for that sort of > thing (it's a bit more expensive). > 2) I am not allowed to reveal the price until I've been told I'm allowed > to reveal the price. Perhaps someone at Kitronik didn't get the note (or > I'm out of the loop). > > N. > > On 26/05/16 22:56, Carlos P.A. wrote: > > Have a look at > > https://www.kitronik.co.uk/5614-bbc-microbit-board-only-retail-pack.html > > looks like at least the price has made it's way out. > > > > > > > > On Thu, 26 May 2016 22:50 Stewart Watkiss, > > wrote: > > > > If you are interested in buying a micro:bit then you may want to > > follow @BBCMIDigital on Twitter. > > > > According to a tweet earlier this week: > > > > "Watch this space: If you're interested in purchasing a #*microbit* > > - information on > > price and suppliers will be released soon." > > > > I will also try and post something up here once they are on sale > > (although I'm planning a camping trip so if the announcement is soon > > Twitter may be more reliable). > > > > > > Stewart > > -- > > Stewart Watkiss > > @stewartwatkiss / @penguintutor > > _______________________________________________ > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sparks.m at gmail.com Fri May 27 07:04:46 2016 From: sparks.m at gmail.com (Michael) Date: Fri, 27 May 2016 12:04:46 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: References: <5747611C.108@penguintutor.com> <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> Message-ID: On 27 May 2016 at 09:35, Carlos P.A. wrote: > Taking in consideration they just removed the listing, it sounds like they > might have jumped the gun on this one... (they listed the price and > approximate release date) > > On 26 May 2016 at 23:26, Nicholas H.Tollervey wrote: > >> Two things: >> >> 1) That's not the price I was told it was going to be for that sort of >> thing (it's a bit more expensive). >> 2) I am not allowed to reveal the price until I've been told I'm allowed >> to reveal the price. Perhaps someone at Kitronik didn't get the note (or >> I'm out of the loop). >> > For reference, information on this will be officially released real soon. I can't say when, but I do know most announcements happen on the first working day of the week to avoid being buried in inboxes when people are away. :) Michael. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Fri May 27 07:28:15 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Fri, 27 May 2016 12:28:15 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> References: <5747611C.108@penguintutor.com> <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> Message-ID: > it's a bit more expensive Does that mean the price shown (briefly) was lower or higher than you expected? On 26 May 2016 at 23:26, Nicholas H.Tollervey wrote: > Two things: > > 1) That's not the price I was told it was going to be for that sort of > thing (it's a bit more expensive). > 2) I am not allowed to reveal the price until I've been told I'm allowed > to reveal the price. Perhaps someone at Kitronik didn't get the note (or > I'm out of the loop). > > N. > > On 26/05/16 22:56, Carlos P.A. wrote: > > Have a look at > > https://www.kitronik.co.uk/5614-bbc-microbit-board-only-retail-pack.html > > looks like at least the price has made it's way out. > > > > > > > > On Thu, 26 May 2016 22:50 Stewart Watkiss, > > wrote: > > > > If you are interested in buying a micro:bit then you may want to > > follow @BBCMIDigital on Twitter. > > > > According to a tweet earlier this week: > > > > "Watch this space: If you're interested in purchasing a #*microbit* > > - information on > > price and suppliers will be released soon." > > > > I will also try and post something up here once they are on sale > > (although I'm planning a camping trip so if the announcement is soon > > Twitter may be more reliable). > > > > > > Stewart > > -- > > Stewart Watkiss > > @stewartwatkiss / @penguintutor > > _______________________________________________ > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sparks.m at gmail.com Fri May 27 08:03:11 2016 From: sparks.m at gmail.com (Michael) Date: Fri, 27 May 2016 13:03:11 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: References: <5747611C.108@penguintutor.com> <27d4750d-d3c9-f72c-7af9-aafaa599d3bd@ntoll.org> Message-ID: That's confidential information at the moment. That's usually to avoid favouring any one particular group. Michael. On 27 May 2016 at 12:28, Nigel Kendrick wrote: > > it's a bit more expensive > > Does that mean the price shown (briefly) was lower or higher than you > expected? > > On 26 May 2016 at 23:26, Nicholas H.Tollervey wrote: > >> Two things: >> >> 1) That's not the price I was told it was going to be for that sort of >> thing (it's a bit more expensive). >> 2) I am not allowed to reveal the price until I've been told I'm allowed >> to reveal the price. Perhaps someone at Kitronik didn't get the note (or >> I'm out of the loop). >> >> N. >> >> On 26/05/16 22:56, Carlos P.A. wrote: >> > Have a look at >> > >> https://www.kitronik.co.uk/5614-bbc-microbit-board-only-retail-pack.html >> > looks like at least the price has made it's way out. >> > >> > >> > >> > On Thu, 26 May 2016 22:50 Stewart Watkiss, > > > wrote: >> > >> > If you are interested in buying a micro:bit then you may want to >> > follow @BBCMIDigital on Twitter. >> > >> > According to a tweet earlier this week: >> > >> > "Watch this space: If you're interested in purchasing a #*microbit* >> > - information on >> > price and suppliers will be released soon." >> > >> > I will also try and post something up here once they are on sale >> > (although I'm planning a camping trip so if the announcement is soon >> > Twitter may be more reliable). >> > >> > >> > Stewart >> > -- >> > Stewart Watkiss >> > @stewartwatkiss / @penguintutor >> > _______________________________________________ >> > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Mon May 30 12:30:08 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson) Date: Mon, 30 May 2016 17:30:08 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor Message-ID: <574C6A90.1070404@gmail.com> Not a python-related question but... Is there a way to access the JavaScript generated by TouchDevelop / Block Editor when it is run in the online simulator? Writing a converter would be possible, but I'm fairly sure that somewhere in the TouchDevelop code it is translated to JavaScript, and I don't want to reinvent the wheel. From carlos.p.a.87 at gmail.com Mon May 30 12:33:50 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Mon, 30 May 2016 17:33:50 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor In-Reply-To: <574C6A90.1070404@gmail.com> References: <574C6A90.1070404@gmail.com> Message-ID: Not exactly a small repository to explore, but I would assume all the front end code will be contained here: https://github.com/Microsoft/TouchDevelop On 30 May 2016 at 17:30, Andrew Ferguson wrote: > Not a python-related question but... > > Is there a way to access the JavaScript generated by TouchDevelop / Block > Editor when it is run in the online simulator? Writing a converter would be > possible, but I'm fairly sure that somewhere in the TouchDevelop code it is > translated to JavaScript, and I don't want to reinvent the wheel. > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Mon May 30 12:37:37 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson) Date: Mon, 30 May 2016 17:37:37 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor In-Reply-To: References: <574C6A90.1070404@gmail.com> Message-ID: <574C6C51.5030101@gmail.com> I did have a look in there, but I couldn't see anything obvious that does the translation. There's some docs on the TouchDevelop website that talk about exporting regular (non microbit) scripts to NodeJS, but I couldn't seem to find the 'export' feature that was mentioned. On 30/05/16 17:33, Carlos P.A. wrote: > Not exactly a small repository to explore, but I would assume all the > front end code will be contained here: > https://github.com/Microsoft/TouchDevelop > > > > On 30 May 2016 at 17:30, Andrew Ferguson > wrote: > > Not a python-related question but... > > Is there a way to access the JavaScript generated by TouchDevelop > / Block Editor when it is run in the online simulator? Writing a > converter would be possible, but I'm fairly sure that somewhere in > the TouchDevelop code it is translated to JavaScript, and I don't > want to reinvent the wheel. > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.p.a.87 at gmail.com Mon May 30 12:58:16 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Mon, 30 May 2016 17:58:16 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor In-Reply-To: <574C6C51.5030101@gmail.com> References: <574C6A90.1070404@gmail.com> <574C6C51.5030101@gmail.com> Message-ID: I guess it depends on what you'd like to do exactly, having a very crude look at the code it seems that it goes through the following calls: https://github.com/Microsoft/TouchDevelop/blob/c810e73f6b11fc256b5f16719e97bdef86f2ff83/www/blockly/blockly-main.ts#L637 https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L633 https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L307 So you can have a look at how the AST.compiler works, but I'm not quite sure what you are planning to do with that, so kind of hard to find out if you can "access"/extract it for your purposes. On 30 May 2016 at 17:37, Andrew Ferguson wrote: > I did have a look in there, but I couldn't see anything obvious that does > the translation. There's some docs on the TouchDevelop website that talk > about exporting regular (non microbit) scripts to NodeJS, but I couldn't > seem to find the 'export' feature that was mentioned. > > > On 30/05/16 17:33, Carlos P.A. wrote: > > Not exactly a small repository to explore, but I would assume all the > front end code will be contained here: > > https://github.com/Microsoft/TouchDevelop > > > > On 30 May 2016 at 17:30, Andrew Ferguson > wrote: > >> Not a python-related question but... >> >> Is there a way to access the JavaScript generated by TouchDevelop / Block >> Editor when it is run in the online simulator? Writing a converter would be >> possible, but I'm fairly sure that somewhere in the TouchDevelop code it is >> translated to JavaScript, and I don't want to reinvent the wheel. >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit >> > > > > _______________________________________________ > Microbit mailing listMicrobit at python.orghttps://mail.python.org/mailman/listinfo/microbit > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewferguson500 at gmail.com Mon May 30 14:12:14 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson) Date: Mon, 30 May 2016 19:12:14 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor In-Reply-To: References: <574C6A90.1070404@gmail.com> <574C6C51.5030101@gmail.com> Message-ID: <574C827E.3060204@gmail.com> I was hoping that there would be a simple 'translateToJavascript();' function to generate the code necessary to run in the simulator from the code contained in the JSZ file that can be downloaded. Evidently it's more complicated than that! I also looked at your microbit-blocks-python repo, and tried to make that generate Python, with the view of 'if this works then I'll see if it can export JS'. However, I keep getting 'TypeError: b is undefined'. Did you ever get that to work? Thanks, Andrew On 30/05/16 17:58, Carlos P.A. wrote: > I guess it depends on what you'd like to do exactly, having a very > crude look at the code it seems that it goes through the following calls: > > https://github.com/Microsoft/TouchDevelop/blob/c810e73f6b11fc256b5f16719e97bdef86f2ff83/www/blockly/blockly-main.ts#L637 > https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L633 > https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L307 > > So you can have a look at how the AST.compiler works, but I'm not > quite sure what you are planning to do with that, so kind of hard to > find out if you can "access"/extract it for your purposes. > > > > On 30 May 2016 at 17:37, Andrew Ferguson > wrote: > > I did have a look in there, but I couldn't see anything obvious > that does the translation. There's some docs on the TouchDevelop > website that talk about exporting regular (non microbit) scripts > to NodeJS, but I couldn't seem to find the 'export' feature that > was mentioned. > > > On 30/05/16 17:33, Carlos P.A. wrote: >> Not exactly a small repository to explore, but I would assume all >> the front end code will be contained here: >> https://github.com/Microsoft/TouchDevelop >> >> >> >> On 30 May 2016 at 17:30, Andrew Ferguson >> > > wrote: >> >> Not a python-related question but... >> >> Is there a way to access the JavaScript generated by >> TouchDevelop / Block Editor when it is run in the online >> simulator? Writing a converter would be possible, but I'm >> fairly sure that somewhere in the TouchDevelop code it is >> translated to JavaScript, and I don't want to reinvent the wheel. >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.p.a.87 at gmail.com Mon May 30 14:37:29 2016 From: carlos.p.a.87 at gmail.com (Carlos P.A.) Date: Mon, 30 May 2016 19:37:29 +0100 Subject: [Microbit-Python] Exporting JavaScript from TouchDevelop / Block Editor In-Reply-To: <574C827E.3060204@gmail.com> References: <574C6A90.1070404@gmail.com> <574C6C51.5030101@gmail.com> <574C827E.3060204@gmail.com> Message-ID: I only spent a couple of nights (basically just cutting down the microsoft stuff around blockly and adding the general python generator), so I didn't really get far at all. It will generate Python code as long as you don't add any of the microbit-specific blocks, as I have not worked on any of the new block generators. In my original conception I wanted to be able to export the blocks from the microsoft touch develop version and import them to generate python from the same program, but I quickly realised there was some block incompatibilities with the micropython microbit api and kind of lost interested and worked on other stuff instead. You should be able to generate some javascript as easily as python though, but you would have to create generator for all the microbit-specific blocks. On 30 May 2016 at 19:12, Andrew Ferguson wrote: > I was hoping that there would be a simple 'translateToJavascript();' > function to generate the code necessary to run in the simulator from the > code contained in the JSZ file that can be downloaded. Evidently it's more > complicated than that! > > I also looked at your microbit-blocks-python repo, and tried to make that > generate Python, with the view of 'if this works then I'll see if it can > export JS'. However, I keep getting 'TypeError: b is undefined'. Did you > ever get that to work? > > Thanks, > Andrew > > > On 30/05/16 17:58, Carlos P.A. wrote: > > I guess it depends on what you'd like to do exactly, having a very crude > look at the code it seems that it goes through the following calls: > > > https://github.com/Microsoft/TouchDevelop/blob/c810e73f6b11fc256b5f16719e97bdef86f2ff83/www/blockly/blockly-main.ts#L637 > > https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L633 > > https://github.com/Microsoft/TouchDevelop/blob/89b1653b4ccfe5d4bca9c7f3511d28c6a0eda3df/editor/external.ts#L307 > > So you can have a look at how the AST.compiler works, but I'm not quite > sure what you are planning to do with that, so kind of hard to find out if > you can "access"/extract it for your purposes. > > > > On 30 May 2016 at 17:37, Andrew Ferguson > wrote: > >> I did have a look in there, but I couldn't see anything obvious that does >> the translation. There's some docs on the TouchDevelop website that talk >> about exporting regular (non microbit) scripts to NodeJS, but I couldn't >> seem to find the 'export' feature that was mentioned. >> >> >> On 30/05/16 17:33, Carlos P.A. wrote: >> >> Not exactly a small repository to explore, but I would assume all the >> front end code will be contained here: >> https://github.com/Microsoft/TouchDevelop >> >> >> >> On 30 May 2016 at 17:30, Andrew Ferguson < >> andrewferguson500 at gmail.com> wrote: >> >>> Not a python-related question but... >>> >>> Is there a way to access the JavaScript generated by TouchDevelop / >>> Block Editor when it is run in the online simulator? Writing a converter >>> would be possible, but I'm fairly sure that somewhere in the TouchDevelop >>> code it is translated to JavaScript, and I don't want to reinvent the wheel. >>> _______________________________________________ >>> Microbit mailing list >>> Microbit at python.org >>> https://mail.python.org/mailman/listinfo/microbit >>> >> >> >> >> _______________________________________________ >> Microbit mailing listMicrobit at python.orghttps://mail.python.org/mailman/listinfo/microbit >> >> >> >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit >> >> > > > _______________________________________________ > Microbit mailing listMicrobit at python.orghttps://mail.python.org/mailman/listinfo/microbit > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob at rwilson.org.uk Mon May 30 16:50:31 2016 From: rob at rwilson.org.uk (Rob Wilson) Date: Mon, 30 May 2016 21:50:31 +0100 Subject: [Microbit-Python] Microbit in STEM Message-ID: <9EC6DBDC-B66F-4450-BF8A-BBF7D1C036D3@rwilson.org.uk> Hi all, I've just joined up, having been to a STEM event in Glos, introducing the microbit. Having retired last year I am now a STEM ambassador, helping out at a number of schools in this county. I did look at the microbit (on the web) last year but now it is real and I have got one to play with. I am impressed with what it packs into a tiny space; a bigger display might have been good perhaps. Less impressed with the MS Touch Script environment; will it be popular? But best of all is the great documentation on the Micro Python site! Far better (and better written!!!) than elsewhere. Thank you for that, very heartening. For what it's worth my first computing experience was with Fortran in 1969; first micro was an AIM65 (6502 with 20 character display and a PRINTER!) I worked most of my life as an IC designer, at first in telecoms and latterly in mobile phone stuff. I did a lot of scripting, mainly for data reduction and graphing, for which Python has heaven-sent! It would be great to hear from other STEM ambassadors or anyone involved with the microbit in schools. Rob From nigel.kendrick at gmail.com Mon May 30 18:17:40 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Mon, 30 May 2016 23:17:40 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: <9EC6DBDC-B66F-4450-BF8A-BBF7D1C036D3@rwilson.org.uk> References: <9EC6DBDC-B66F-4450-BF8A-BBF7D1C036D3@rwilson.org.uk> Message-ID: Hi Rob, I am a STEM ambassador with micro:bit too. I'm hoping that the ambassador community can team up to share knowledge etc. but at the moment things are a bit fragmented. I have a few things in the pipeline - there's a few pics below and a video... https://imgur.com/a/Rn6Cr https://www.youtube.com/watch?app=desktop&persist_app=1&v=SE4Bb1NHyU4 Nigel Kendrick aka Linker3000 Hi all, I've just joined up, having been to a STEM event in Glos, introducing the microbit. Having retired last year I am now a STEM ambassador, helping out at a number of schools in this county. I did look at the microbit (on the web) last year but now it is real and I have got one to play with. I am impressed with what it packs into a tiny space; a bigger display might have been good perhaps. Less impressed with the MS Touch Script environment; will it be popular? But best of all is the great documentation on the Micro Python site! Far better (and better written!!!) than elsewhere. Thank you for that, very heartening. For what it's worth my first computing experience was with Fortran in 1969; first micro was an AIM65 (6502 with 20 character display and a PRINTER!) I worked most of my life as an IC designer, at first in telecoms and latterly in mobile phone stuff. I did a lot of scripting, mainly for data reduction and graphing, for which Python has heaven-sent! It would be great to hear from other STEM ambassadors or anyone involved with the microbit in schools. Rob _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From sparks.m at gmail.com Tue May 31 06:27:56 2016 From: sparks.m at gmail.com (Michael) Date: Tue, 31 May 2016 11:27:56 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: <1464090217.2230.1.camel@gmail.com> References: <1464090217.2230.1.camel@gmail.com> Message-ID: Microbit is now availabe for pre-order. Bulk quanties (10, 90, 300) from CPC Farnell: http://cpc.farnell.com/bbc-microbit Smaller scale/individual quanties via resellers: http://cpc.farnell.com/bbc-microbit-reseller (Includes Pimoroni, Pi Hut, Tech Will Save Us, Kitronik, ScienceScope) Individually, they're about ?13-?15 depending on who you get them from, and what you want (bare board vs retail boxed) The bulk quantities are a sliding scale cheaper *per unit*. (unsuprisingly) Michael. On 24 May 2016 at 12:43, mwa_joe wrote: > Hi, I'm a university student in Kenya. I've been learning how to use > python for some time now and I really like what I see. About this > device, how can i access it? It looks like something I'd like to try > our for a bit, and a bit, and a bit, and a bit. > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sparks.m at gmail.com Tue May 31 06:30:15 2016 From: sparks.m at gmail.com (Michael) Date: Tue, 31 May 2016 11:30:15 +0100 Subject: [Microbit-Python] How can I get MicroBit? In-Reply-To: References: <1464090217.2230.1.camel@gmail.com> Message-ID: Oh, for the avoidance of doubt, I'm only posting that because people were asking. Michael. On 31 May 2016 at 11:27, Michael wrote: > Microbit is now availabe for pre-order. > > > Bulk quanties (10, 90, 300) from CPC Farnell: > http://cpc.farnell.com/bbc-microbit > > > Smaller scale/individual quanties via resellers: > http://cpc.farnell.com/bbc-microbit-reseller (Includes Pimoroni, Pi Hut, > Tech Will Save Us, Kitronik, ScienceScope) > > > Individually, they're about ?13-?15 depending on who you get them from, > and what you want (bare board vs retail boxed) > > > The bulk quantities are a sliding scale cheaper *per unit*. (unsuprisingly) > > > Michael. > > > On 24 May 2016 at 12:43, mwa_joe wrote: > >> Hi, I'm a university student in Kenya. I've been learning how to use >> python for some time now and I really like what I see. About this >> device, how can i access it? It looks like something I'd like to try >> our for a bit, and a bit, and a bit, and a bit. >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob at rwilson.org.uk Tue May 31 07:08:20 2016 From: rob at rwilson.org.uk (Rob Wilson) Date: Tue, 31 May 2016 12:08:20 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: Message-ID: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Hi Nigel I like the idea of ?sharing knowledge etc?. Maybe a STEM microbit wiki or something? I like the spectrum analyser! I?ve had a vague idea to write a singing coach (analyse voice pitch and display difference to played tone) which would need a Fourier Transform like that. Not done anything about it yet ?. > Hi Rob, > > I am a STEM ambassador with micro:bit too. I'm hoping that the > ambassador > community can team up to share knowledge etc. but at the moment things > are > a bit fragmented. I have a few things in the pipeline - there's a few > pics > below and a video... > > https://imgur.com/a/Rn6Cr > > https://www.youtube.com/watch?app=desktop&persist_app=1&v=SE4Bb1NHyU4 > > Nigel Kendrick > aka Linker3000 From nigel.kendrick at gmail.com Tue May 31 08:09:56 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Tue, 31 May 2016 13:09:56 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: Hi Rob, We'd just need a home for the wiki - do you have any good connections at STEM HQ that could help make it official, as opposed to just setting up a site somewhere? My contacts are all in the regional office and they seem to struggle to get traction back up the chain for anything. I have also considered 'partnering' with the BBC for a knowledge sharing section within their micro:bit site, but I am making no headway there. Also, I am a new Ambassador so I haven't made many regional or national contacts yet - I'd love to find out 'where the action is' with regards to other STEM ambassadors working in IT/electronics. Basic FFT on the micro:bit would be doable (a la Arduino etc.), but my configuration samples the audio in 5 fixed frequency bands on a external chip and sends a representative analogue voltage for each band to the micro:bit. The end-game is to have a board with the spectrum analyser chip, an electret mic with amplifier, a sound triggered logic signal and a class D bridge amp (it's quite loud, considering it's runnign from 3V!) all powered from the micro:bit. All the best --Nigel Kendrick On 31 May 2016 at 12:08, Rob Wilson wrote: > Hi Nigel > I like the idea of ?sharing knowledge etc?. Maybe a STEM microbit wiki or > something? > > I like the spectrum analyser! I?ve had a vague idea to write a singing > coach (analyse voice pitch and display difference to played tone) which > would need a Fourier Transform like that. Not done anything about it yet ?. > > Hi Rob, >> >> I am a STEM ambassador with micro:bit too. I'm hoping that the ambassador >> community can team up to share knowledge etc. but at the moment things are >> a bit fragmented. I have a few things in the pipeline - there's a few pics >> below and a video... >> >> https://imgur.com/a/Rn6Cr >> >> https://www.youtube.com/watch?app=desktop&persist_app=1&v=SE4Bb1NHyU4 >> >> Nigel Kendrick >> aka Linker3000 >> > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at thinkingbinaries.com Tue May 31 08:25:32 2016 From: david at thinkingbinaries.com (David Whale) Date: Tue, 31 May 2016 13:25:32 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: Rob/Nigel, There is a wiki already set up by a STEM ambassador, but it needs some energy behind it: microbit.wiki Also, we're all trying to get enough energy behind this Stack Overflow site, to build a self sustaining community, please join in! Only 10 more questions above a score of 10 and we can move to the next stage. There must be more than 10 people on this mailing list that haven't registered yet, that could do, and upvote a few questions (and also raise some Python questions for consideration too) http://area51.stackexchange.com/proposals/96237/microbit David. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Tue May 31 09:09:06 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Tue, 31 May 2016 14:09:06 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: Hello from Portland (I'm at PyCon in the US at the moment). I hope to be able to have some good news in the coming weeks about Python Software Foundation support for web based resources and community development around not just the micro:bit, but Pythonic education in general. Yours hopefully, N. On 31/05/16 13:25, David Whale wrote: > Rob/Nigel, > > There is a wiki already set up by a STEM ambassador, but it needs some > energy behind it: > > microbit.wiki > > Also, we're all trying to get enough energy behind this Stack Overflow > site, to build a self sustaining community, please join in! Only 10 more > questions above a score of 10 and we can move to the next stage. There > must be more than 10 people on this mailing list that haven't registered > yet, that could do, and upvote a few questions (and also raise some > Python questions for consideration too) > > http://area51.stackexchange.com/proposals/96237/microbit > > David. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From loopspace at mathforge.org Tue May 31 09:12:45 2016 From: loopspace at mathforge.org (Loop Space) Date: Tue, 31 May 2016 14:12:45 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: RE the SE site, note that it's better to vote strategically in this stage. The proposal needs questions with 10 or more votes, so if a question already has 10 or more votes then it is a somewhat wasted vote to vote on it given that people have limited number of votes at this point. Andrew On 31/05/2016 13:25, David Whale wrote: > Rob/Nigel, > > There is a wiki already set up by a STEM ambassador, but it needs some > energy behind it: > > microbit.wiki > > Also, we're all trying to get enough energy behind this Stack Overflow > site, to build a self sustaining community, please join in! Only 10 more > questions above a score of 10 and we can move to the next stage. There > must be more than 10 people on this mailing list that haven't registered > yet, that could do, and upvote a few questions (and also raise some > Python questions for consideration too) > > http://area51.stackexchange.com/proposals/96237/microbit > > David. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From nigel.kendrick at gmail.com Tue May 31 09:13:36 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Tue, 31 May 2016 14:13:36 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: I've already exhausted all my votes at stackexchange! Will check out the wiki. Thanks. -- Nigel On 31 May 2016 13:25:32 BST, David Whale wrote: >Rob/Nigel, > >There is a wiki already set up by a STEM ambassador, but it needs some >energy behind it: > >microbit.wiki > >Also, we're all trying to get enough energy behind this Stack Overflow >site, to build a self sustaining community, please join in! Only 10 >more >questions above a score of 10 and we can move to the next stage. There >must >be more than 10 people on this mailing list that haven't registered >yet, >that could do, and upvote a few questions (and also raise some Python >questions for consideration too) > >http://area51.stackexchange.com/proposals/96237/microbit > >David. > > >------------------------------------------------------------------------ > >_______________________________________________ >Microbit mailing list >Microbit at python.org >https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob at rwilson.org.uk Tue May 31 14:37:21 2016 From: rob at rwilson.org.uk (Rob Wilson) Date: Tue, 31 May 2016 19:37:21 +0100 Subject: [Microbit-Python] Microbit in STEM In-Reply-To: References: <1021B079-C7AB-4EC4-B205-39734872CDC9@rwilson.org.uk> Message-ID: <0559AED2-A6A7-4DB7-9435-EAF975E5D774@rwilson.org.uk> I've joined the Stack site and done some voting! It looks like a better candidate for sharing than the wiki right now, but it could work. Nigel, I'm fairly new in the STEM ambassador organisation but I'll see what I can do. Thanks for the feedback on the spectrum analyser. Rob > On 31 May 2016, at 14:13, Nigel Kendrick wrote: > > I've already exhausted all my votes at stackexchange! Will check out the wiki. > > Thanks. > > -- Nigel > >> On 31 May 2016 13:25:32 BST, David Whale wrote: >> Rob/Nigel, >> >> There is a wiki already set up by a STEM ambassador, but it needs some energy behind it: >> >> microbit.wiki >> >> Also, we're all trying to get enough energy behind this Stack Overflow site, to build a self sustaining community, please join in! Only 10 more questions above a score of 10 and we can move to the next stage. There must be more than 10 people on this mailing list that haven't registered yet, that could do, and upvote a few questions (and also raise some Python questions for consideration too) >> >> http://area51.stackexchange.com/proposals/96237/microbit >> >> David. >> >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From D.Gibbs at stem.org.uk Tue May 31 09:19:29 2016 From: D.Gibbs at stem.org.uk (Dave Gibbs) Date: Tue, 31 May 2016 13:19:29 +0000 Subject: [Microbit-Python] Microbit in STEM Message-ID: I'd be happy to host something in the National STEM Learning Centre online groups. We have micro:bit threads running in a couple: https://www.stem.org.uk/community/groups/37459/physical-computing-and-robotics would be the ideal place. Regards, Dave Dave Gibbs STEM Computing & Technology Specialist National STEM Learning Centre & Network / UK Space Education Office (ESERO-UK) STEM Learning Ltd Tel: 0044 (0)1904 328 362 Mob: 0044 (0) 7772 306 228 Email: d.gibbs at stem.org.uk Twitter: @adgibbs @STEMLearningLtd Web: www.stem.org.uk and www.esero.org.uk -----Original Message----- From: Microbit [mailto:microbit-bounces+d.gibbs=nationalstemcentre.org.uk at python.org] On Behalf Of microbit-request at python.org Sent: 31 May 2016 14:13 To: microbit at python.org Subject: Microbit Digest, Vol 12, Issue 35 Send Microbit mailing list submissions to microbit at python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/microbit or, via email, send a message with subject or body 'help' to microbit-request at python.org You can reach the person managing the list at microbit-owner at python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Microbit digest..." Today's Topics: 1. Microbit in STEM (Rob Wilson) 2. Re: Microbit in STEM (Nigel Kendrick) 3. Re: Microbit in STEM (David Whale) 4. Re: Microbit in STEM (Nicholas H.Tollervey) 5. Re: Microbit in STEM (Loop Space) ---------------------------------------------------------------------- Message: 1 Date: Tue, 31 May 2016 12:08:20 +0100 From: "Rob Wilson" To: microbit at python.org Subject: [Microbit-Python] Microbit in STEM Message-ID: <1021B079-C7AB-4EC4-B205-39734872CDC9 at rwilson.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Hi Nigel I like the idea of ?sharing knowledge etc?. Maybe a STEM microbit wiki or something? I like the spectrum analyser! I?ve had a vague idea to write a singing coach (analyse voice pitch and display difference to played tone) which would need a Fourier Transform like that. Not done anything about it yet ?. > Hi Rob, > > I am a STEM ambassador with micro:bit too. I'm hoping that the > ambassador community can team up to share knowledge etc. but at the > moment things are a bit fragmented. I have a few things in the > pipeline - there's a few pics below and a video... > > https://imgur.com/a/Rn6Cr > > https://www.youtube.com/watch?app=desktop&persist_app=1&v=SE4Bb1NHyU4 > > Nigel Kendrick > aka Linker3000 ------------------------------ Message: 2 Date: Tue, 31 May 2016 13:09:56 +0100 From: Nigel Kendrick To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] Microbit in STEM Message-ID: Content-Type: text/plain; charset="utf-8" Hi Rob, We'd just need a home for the wiki - do you have any good connections at STEM HQ that could help make it official, as opposed to just setting up a site somewhere? My contacts are all in the regional office and they seem to struggle to get traction back up the chain for anything. I have also considered 'partnering' with the BBC for a knowledge sharing section within their micro:bit site, but I am making no headway there. Also, I am a new Ambassador so I haven't made many regional or national contacts yet - I'd love to find out 'where the action is' with regards to other STEM ambassadors working in IT/electronics. Basic FFT on the micro:bit would be doable (a la Arduino etc.), but my configuration samples the audio in 5 fixed frequency bands on a external chip and sends a representative analogue voltage for each band to the micro:bit. The end-game is to have a board with the spectrum analyser chip, an electret mic with amplifier, a sound triggered logic signal and a class D bridge amp (it's quite loud, considering it's runnign from 3V!) all powered from the micro:bit. All the best --Nigel Kendrick On 31 May 2016 at 12:08, Rob Wilson wrote: > Hi Nigel > I like the idea of ?sharing knowledge etc?. Maybe a STEM microbit wiki > or something? > > I like the spectrum analyser! I?ve had a vague idea to write a singing > coach (analyse voice pitch and display difference to played tone) > which would need a Fourier Transform like that. Not done anything about it yet ?. > > Hi Rob, >> >> I am a STEM ambassador with micro:bit too. I'm hoping that the >> ambassador community can team up to share knowledge etc. but at the >> moment things are a bit fragmented. I have a few things in the >> pipeline - there's a few pics below and a video... >> >> https://imgur.com/a/Rn6Cr >> >> https://www.youtube.com/watch?app=desktop&persist_app=1&v=SE4Bb1NHyU4 >> >> Nigel Kendrick >> aka Linker3000 >> > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Tue, 31 May 2016 13:25:32 +0100 From: David Whale To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] Microbit in STEM Message-ID: Content-Type: text/plain; charset="utf-8" Rob/Nigel, There is a wiki already set up by a STEM ambassador, but it needs some energy behind it: microbit.wiki Also, we're all trying to get enough energy behind this Stack Overflow site, to build a self sustaining community, please join in! Only 10 more questions above a score of 10 and we can move to the next stage. There must be more than 10 people on this mailing list that haven't registered yet, that could do, and upvote a few questions (and also raise some Python questions for consideration too) http://area51.stackexchange.com/proposals/96237/microbit David. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 4 Date: Tue, 31 May 2016 14:09:06 +0100 From: "Nicholas H.Tollervey" To: microbit at python.org Subject: Re: [Microbit-Python] Microbit in STEM Message-ID: Content-Type: text/plain; charset="windows-1252" Hello from Portland (I'm at PyCon in the US at the moment). I hope to be able to have some good news in the coming weeks about Python Software Foundation support for web based resources and community development around not just the micro:bit, but Pythonic education in general. Yours hopefully, N. On 31/05/16 13:25, David Whale wrote: > Rob/Nigel, > > There is a wiki already set up by a STEM ambassador, but it needs some > energy behind it: > > microbit.wiki > > Also, we're all trying to get enough energy behind this Stack Overflow > site, to build a self sustaining community, please join in! Only 10 > more questions above a score of 10 and we can move to the next stage. > There must be more than 10 people on this mailing list that haven't > registered yet, that could do, and upvote a few questions (and also > raise some Python questions for consideration too) > > http://area51.stackexchange.com/proposals/96237/microbit > > David. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: ------------------------------ Message: 5 Date: Tue, 31 May 2016 14:12:45 +0100 From: Loop Space To: microbit at python.org Subject: Re: [Microbit-Python] Microbit in STEM Message-ID: Content-Type: text/plain; charset=windows-1252; format=flowed RE the SE site, note that it's better to vote strategically in this stage. The proposal needs questions with 10 or more votes, so if a question already has 10 or more votes then it is a somewhat wasted vote to vote on it given that people have limited number of votes at this point. Andrew On 31/05/2016 13:25, David Whale wrote: > Rob/Nigel, > > There is a wiki already set up by a STEM ambassador, but it needs some > energy behind it: > > microbit.wiki > > Also, we're all trying to get enough energy behind this Stack Overflow > site, to build a self sustaining community, please join in! Only 10 > more questions above a score of 10 and we can move to the next stage. > There must be more than 10 people on this mailing list that haven't > registered yet, that could do, and upvote a few questions (and also > raise some Python questions for consideration too) > > http://area51.stackexchange.com/proposals/96237/microbit > > David. > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > ------------------------------ Subject: Digest Footer _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit ------------------------------ End of Microbit Digest, Vol 12, Issue 35 **************************************** ________________________________ STEM Learning Limited registered in England and Wales, Company Number 05081097. Registered Office: National Science Learning Centre, University of York, Heslington, York, North Yorkshire, YO10 5DD This e-mail is intended only for the named recipient, may be confidential and may also be privileged. Please notify us immediately if you are not the intended recipient. You should not copy it, forward it or use it for any purpose or disclose the contents to any person. If you have received this e-mail in error, please notify us as soon as possible on +44 (0)1904328300 and destroy your copy. Unless otherwise expressly stated, this e-mail is not intended to constitute a business letter, order form or other offer or invitation to you, nor does this e-mail form the basis of any contract. Contracts may not be concluded by e-mail and any contract or agreement attached is subject to contract and shall not and is not intended to create a legally binding relationship. STEM Learning Limited has taken reasonable precautions to ensure no viruses are present in this email and does not accept responsibility for any loss or damage arising from the use of this email or attachments. This email has been scanned by the Websense Email Security System. For more information please visit: http://www.websense.com/content/websense-email-security-products.aspx