From david at thinkingbinaries.com Thu Sep 1 06:19:35 2016 From: david at thinkingbinaries.com (David Whale) Date: Thu, 1 Sep 2016 11:19:35 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> Message-ID: That is true, but unfortunately it is only part of the story. It's not the pin drive current that could be the problem, it's the opportunity for an inductive load (a speaker) to cause back-emf that is above the specified pin voltage of the GPIO pins. Although I haven't done the maths or looked at a scope trace to see how high in voltage the back-emf peaks are at given frequencies, it might still be ok in practice without any coupling or protection given the range of frequencies in use.. However, I spoke to Nicholas Tolervy about this resource, and he uses a powered speaker such as this: https://www.amazon.co.uk/gp/product/B0039YP37E/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1 connected with one of these: https://sciencescope.uk/product/bbc-microbit-sound-cable-2/ I also use one of these... http://www.maplin.co.uk/p/kitsound-pocketboom-portable-bluetooth-speaker-green-n54dc Which, incidently, has a nice bass response that works really well with this fab Python resource!! https://www.microbit.co.uk/musicfest/that-bass It's very loud with some powered speakers, in my experience, so in some environments you should consider a volume control of some sort! Hope this helps. David. ___________________________________________________________ David Whale, B.Sc (Hons), MIET *Software Engineer and IET Schools Liaison Officer, Essex* On 31 August 2016 at 07:23, Damien George wrote: > There are no additional buffers on the pins. The microcontroller will > source/sink its maximum current and then the output voltage will begin > to drop to keep the current at that maximum (and so act like a current > regulator/limiter). > > On 31 August 2016 at 15:48, fresh.bread via Microbit > wrote: > > I'm a bit worried by the diagram on the documentation for the micropython > > speech module showing a loudspeaker connected directly to pins 0 and 1 > (see > > http://microbit-micropython.readthedocs.io/en/latest/ > tutorials/speech.html) > > > > What is the maximum drive current for the pins. The processor chip only > > seems to be able to sink/source 0.5ma (or 5ma in high current drive mode) > > .Are there additional buffers connected to pins 0,1,2 that allow a higher > > current? > > > > Jim > > > > _______________________________________________ > > 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 Thu Sep 1 07:36:14 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Thu, 1 Sep 2016 12:36:14 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> Message-ID: I use a 3v class D bridge amp chip from JRC (NJM2113D - RS Components sell them) that works well with the micro:bit. -- Nigel On 1 Sep 2016 11:26, "David Whale" wrote: > That is true, but unfortunately it is only part of the story. > > It's not the pin drive current that could be the problem, it's the > opportunity for an inductive load (a speaker) to cause back-emf that is > above the specified pin voltage of the GPIO pins. Although I haven't done > the maths or looked at a scope trace to see how high in voltage the > back-emf peaks are at given frequencies, it might still be ok in practice > without any coupling or protection given the range of frequencies in use.. > > However, I spoke to Nicholas Tolervy about this resource, and he uses a > powered speaker such as this: > > https://www.amazon.co.uk/gp/product/B0039YP37E/ref=oh_aui_ > detailpage_o09_s00?ie=UTF8&psc=1 > > connected with one of these: > > https://sciencescope.uk/product/bbc-microbit-sound-cable-2/ > > > I also use one of these... > > http://www.maplin.co.uk/p/kitsound-pocketboom-portable- > bluetooth-speaker-green-n54dc > > Which, incidently, has a nice bass response that works really well with > this fab Python resource!! > > https://www.microbit.co.uk/musicfest/that-bass > > It's very loud with some powered speakers, in my experience, so in some > environments you should consider a volume control of some sort! > > Hope this helps. > > David. > > > > > ___________________________________________________________ > David Whale, B.Sc (Hons), MIET > *Software Engineer and IET Schools Liaison Officer, Essex* > > > On 31 August 2016 at 07:23, Damien George > wrote: > >> There are no additional buffers on the pins. The microcontroller will >> source/sink its maximum current and then the output voltage will begin >> to drop to keep the current at that maximum (and so act like a current >> regulator/limiter). >> >> On 31 August 2016 at 15:48, fresh.bread via Microbit >> wrote: >> > I'm a bit worried by the diagram on the documentation for the >> micropython >> > speech module showing a loudspeaker connected directly to pins 0 and 1 >> (see >> > http://microbit-micropython.readthedocs.io/en/latest/tutoria >> ls/speech.html) >> > >> > What is the maximum drive current for the pins. The processor chip only >> > seems to be able to sink/source 0.5ma (or 5ma in high current drive >> mode) >> > .Are there additional buffers connected to pins 0,1,2 that allow a >> higher >> > current? >> > >> > Jim >> > >> > _______________________________________________ >> > 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 jim at groklearning.com Thu Sep 1 08:02:29 2016 From: jim at groklearning.com (Jim Mussared) Date: Thu, 1 Sep 2016 22:02:29 +1000 Subject: [Microbit-Python] micro:bit Starter Course from Grok Learning Message-ID: hi micro:bit enthusiasts! As I mentioned recently on this list, Grok Learning have been working on a micro:bit MicroPython course targeted at Grade 7 students. We're excited to announce that the starter version of this course, including the simulator, is now available for free on our website -- http://grok.gl/microbit-starter This course is the first week of what will become the micro:bit stream of the Grok Code Quest, starting October 31 -- http://grok.gl/codequest-microbit Please feel free to share the course with anyone you know who might be interested - whether they're developers, teachers or enthusiasts. Our goal is also to teach real programming concepts, instead of just a walkthrough style series of instructions, so students will be equipped with the skills to create their own programs. We also include a series of problems/challenges for the students to implement using the simulated micro:bit, with an automated marker to verify the solutions. We've got a lot more planned for the full course, including all of the onboard sensors, plus a bunch of external components right up to a simulator of the Kitronik line-following buggy. You can see some of this in action starting at 17:15 in this video from PyCon Australia -- https://youtu.be/oCEZyJqkMrE?t=17m15s We'd love to hear your feedback and suggestions! Jim Mussared Grok Learning From nigel.kendrick at gmail.com Thu Sep 1 08:12:43 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Thu, 1 Sep 2016 13:12:43 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> Message-ID: Minor correction - the NJM2113D is a class AB chip. I was also playing around with a class D chip from Texas Instruments, but used the JRC part in the end. -- Nigel On 1 Sep 2016 12:36, "Nigel Kendrick" wrote: > I use a 3v class D bridge amp chip from JRC (NJM2113D - RS Components sell > them) that works well with the micro:bit. > > -- Nigel > > On 1 Sep 2016 11:26, "David Whale" wrote: > >> That is true, but unfortunately it is only part of the story. >> >> It's not the pin drive current that could be the problem, it's the >> opportunity for an inductive load (a speaker) to cause back-emf that is >> above the specified pin voltage of the GPIO pins. Although I haven't done >> the maths or looked at a scope trace to see how high in voltage the >> back-emf peaks are at given frequencies, it might still be ok in practice >> without any coupling or protection given the range of frequencies in use.. >> >> However, I spoke to Nicholas Tolervy about this resource, and he uses a >> powered speaker such as this: >> >> https://www.amazon.co.uk/gp/product/B0039YP37E/ref=oh_aui_de >> tailpage_o09_s00?ie=UTF8&psc=1 >> >> connected with one of these: >> >> https://sciencescope.uk/product/bbc-microbit-sound-cable-2/ >> >> >> I also use one of these... >> >> http://www.maplin.co.uk/p/kitsound-pocketboom-portable-bluet >> ooth-speaker-green-n54dc >> >> Which, incidently, has a nice bass response that works really well with >> this fab Python resource!! >> >> https://www.microbit.co.uk/musicfest/that-bass >> >> It's very loud with some powered speakers, in my experience, so in some >> environments you should consider a volume control of some sort! >> >> Hope this helps. >> >> David. >> >> >> >> >> ___________________________________________________________ >> David Whale, B.Sc (Hons), MIET >> *Software Engineer and IET Schools Liaison Officer, Essex* >> >> >> On 31 August 2016 at 07:23, Damien George >> wrote: >> >>> There are no additional buffers on the pins. The microcontroller will >>> source/sink its maximum current and then the output voltage will begin >>> to drop to keep the current at that maximum (and so act like a current >>> regulator/limiter). >>> >>> On 31 August 2016 at 15:48, fresh.bread via Microbit >>> wrote: >>> > I'm a bit worried by the diagram on the documentation for the >>> micropython >>> > speech module showing a loudspeaker connected directly to pins 0 and 1 >>> (see >>> > http://microbit-micropython.readthedocs.io/en/latest/tutoria >>> ls/speech.html) >>> > >>> > What is the maximum drive current for the pins. The processor chip only >>> > seems to be able to sink/source 0.5ma (or 5ma in high current drive >>> mode) >>> > .Are there additional buffers connected to pins 0,1,2 that allow a >>> higher >>> > current? >>> > >>> > Jim >>> > >>> > _______________________________________________ >>> > 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 Thu Sep 1 08:31:07 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 1 Sep 2016 13:31:07 +0100 Subject: [Microbit-Python] micro:bit Starter Course from Grok Learning In-Reply-To: References: Message-ID: This is stonkingly good work! Can't wait to see what people make of it. It's also a healthy sign that MicroPython on the micro:bit is flourishing if non-officially BBC groups and organisations are creating things outside the BBC partnership fold. Many congratulations to the Grok team. :-) N. On 01/09/16 13:02, Jim Mussared via Microbit wrote: > hi micro:bit enthusiasts! > > As I mentioned recently on this list, Grok Learning have been working > on a micro:bit MicroPython course targeted at Grade 7 students. > > We're excited to announce that the starter version of this course, > including the simulator, is now available for free on our website -- > http://grok.gl/microbit-starter > > This course is the first week of what will become the micro:bit stream > of the Grok Code Quest, starting October 31 -- > http://grok.gl/codequest-microbit > > Please feel free to share the course with anyone you know who might be > interested - whether they're developers, teachers or enthusiasts. > > Our goal is also to teach real programming concepts, instead of just a > walkthrough style series of instructions, so students will be equipped > with the skills to create their own programs. We also include a series > of problems/challenges for the students to implement using the > simulated micro:bit, with an automated marker to verify the solutions. > > We've got a lot more planned for the full course, including all of the > onboard sensors, plus a bunch of external components right up to a > simulator of the Kitronik line-following buggy. You can see some of > this in action starting at 17:15 in this video from PyCon Australia -- > https://youtu.be/oCEZyJqkMrE?t=17m15s > > We'd love to hear your feedback and suggestions! > > Jim Mussared > Grok Learning > _______________________________________________ > 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 fresh.bread at yahoo.co.uk Fri Sep 2 16:17:30 2016 From: fresh.bread at yahoo.co.uk (fresh.bread) Date: Fri, 2 Sep 2016 21:17:30 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> Message-ID: <4334f134-e76c-feb4-620e-da6195dad09a@yahoo.co.uk> Interesting, slightly off topic but is the same true of the pyboard? > There are no additional buffers on the pins. The microcontroller will > source/sink its maximum current and then the output voltage will begin > to drop to keep the current at that maximum (and so act like a current > regulator/limiter). > > On 31 August 2016 at 15:48, fresh.bread via Microbit > wrote: >> I'm a bit worried by the diagram on the documentation for the micropython >> speech module showing a loudspeaker connected directly to pins 0 and 1 (see >> http://microbit-micropython.readthedocs.io/en/latest/tutorials/speech.html) >> >> What is the maximum drive current for the pins. The processor chip only >> seems to be able to sink/source 0.5ma (or 5ma in high current drive mode) >> .Are there additional buffers connected to pins 0,1,2 that allow a higher >> current? >> >> Jim >> >> _______________________________________________ >> 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 fresh.bread at yahoo.co.uk Fri Sep 2 16:28:05 2016 From: fresh.bread at yahoo.co.uk (fresh.bread) Date: Fri, 2 Sep 2016 21:28:05 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> Message-ID: <6407f522-c9dc-c6ea-2d5a-a5ac09e8c970@yahoo.co.uk> While I do appreciate that using a Class D amplifier is probably the bells and whistles solution, I can't help thinking that it is a bit over-the-top. For me anyway, the beauty of the microbit is its minimalism and wearablity. It is my initial thought that enough protection against inductive voltage spikes can be achieved by soldering a snubber diode across the terminals of the speaker. And if that causes distortion, too bad; it's a microbit, it's supposed to sound like a Dalek. > Minor correction - the NJM2113D is a class AB chip. I was also playing > around with a class D chip from Texas Instruments, but used the JRC part in > the end. > > -- Nigel > > On 1 Sep 2016 12:36, "Nigel Kendrick" wrote: > >> I use a 3v class D bridge amp chip from JRC (NJM2113D - RS Components sell >> them) that works well with the micro:bit. >> >> -- Nigel >> >> On 1 Sep 2016 11:26, "David Whale" wrote: >> >>> That is true, but unfortunately it is only part of the story. >>> >>> It's not the pin drive current that could be the problem, it's the >>> opportunity for an inductive load (a speaker) to cause back-emf that is >>> above the specified pin voltage of the GPIO pins. Although I haven't done >>> the maths or looked at a scope trace to see how high in voltage the >>> back-emf peaks are at given frequencies, it might still be ok in practice >>> without any coupling or protection given the range of frequencies in use.. >>> >>> However, I spoke to Nicholas Tolervy about this resource, and he uses a >>> powered speaker such as this: >>> >>> https://www.amazon.co.uk/gp/product/B0039YP37E/ref=oh_aui_de >>> tailpage_o09_s00?ie=UTF8&psc=1 >>> >>> connected with one of these: >>> >>> https://sciencescope.uk/product/bbc-microbit-sound-cable-2/ >>> >>> >>> I also use one of these... >>> >>> http://www.maplin.co.uk/p/kitsound-pocketboom-portable-bluet >>> ooth-speaker-green-n54dc >>> >>> Which, incidently, has a nice bass response that works really well with >>> this fab Python resource!! >>> >>> https://www.microbit.co.uk/musicfest/that-bass >>> >>> It's very loud with some powered speakers, in my experience, so in some >>> environments you should consider a volume control of some sort! >>> >>> Hope this helps. >>> >>> David. >>> >>> >>> >>> >>> ___________________________________________________________ >>> David Whale, B.Sc (Hons), MIET >>> *Software Engineer and IET Schools Liaison Officer, Essex* >>> >>> >>> On 31 August 2016 at 07:23, Damien George >>> wrote: >>> >>>> There are no additional buffers on the pins. The microcontroller will >>>> source/sink its maximum current and then the output voltage will begin >>>> to drop to keep the current at that maximum (and so act like a current >>>> regulator/limiter). >>>> >>>> On 31 August 2016 at 15:48, fresh.bread via Microbit >>>> wrote: >>>>> I'm a bit worried by the diagram on the documentation for the >>>> micropython >>>>> speech module showing a loudspeaker connected directly to pins 0 and 1 >>>> (see >>>>> http://microbit-micropython.readthedocs.io/en/latest/tutoria >>>> ls/speech.html) >>>>> What is the maximum drive current for the pins. The processor chip only >>>>> seems to be able to sink/source 0.5ma (or 5ma in high current drive >>>> mode) >>>>> .Are there additional buffers connected to pins 0,1,2 that allow a >>>> higher >>>>> current? >>>>> >>>>> Jim >>>>> >>>>> _______________________________________________ >>>>> 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 microbit at sheep.art.pl Fri Sep 2 16:27:09 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Fri, 2 Sep 2016 22:27:09 +0200 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: <4334f134-e76c-feb4-620e-da6195dad09a@yahoo.co.uk> References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> <4334f134-e76c-feb4-620e-da6195dad09a@yahoo.co.uk> Message-ID: <20160902222709.7cddb27e@ghostwheel> I'm not sure about the PyBoard, but the ESP8266 has a "snapback" circuit on every gpio pin, which basically shorts the pin to the ground when the voltage on it exceeds 6V. This is supposed to protect it from ESD, among other things. I suspect that both the micro:bit and the PyBoard may have similar circuits on them, as this is a rather standard practice. On Fri, 2 Sep 2016 21:17:30 +0100 "fresh.bread via Microbit" wrote: > Interesting, slightly off topic but is the same true of the pyboard? > > > There are no additional buffers on the pins. The microcontroller > > will source/sink its maximum current and then the output voltage > > will begin to drop to keep the current at that maximum (and so act > > like a current regulator/limiter). > > > > On 31 August 2016 at 15:48, fresh.bread via Microbit > > wrote: > >> I'm a bit worried by the diagram on the documentation for the > >> micropython speech module showing a loudspeaker connected directly > >> to pins 0 and 1 (see > >> http://microbit-micropython.readthedocs.io/en/latest/tutorials/speech.html) > >> > >> What is the maximum drive current for the pins. The processor chip > >> only seems to be able to sink/source 0.5ma (or 5ma in high current > >> drive mode) .Are there additional buffers connected to pins 0,1,2 > >> that allow a higher current? -- Radomir Dopieralski From david at thinkingbinaries.com Fri Sep 2 16:57:08 2016 From: david at thinkingbinaries.com (David Whale) Date: Fri, 2 Sep 2016 21:57:08 +0100 Subject: [Microbit-Python] micro bit pin drive current In-Reply-To: <20160902222709.7cddb27e@ghostwheel> References: <212d867d-7dfc-ba8f-41c4-5ea7a87580e7@yahoo.co.uk> <4334f134-e76c-feb4-620e-da6195dad09a@yahoo.co.uk> <20160902222709.7cddb27e@ghostwheel> Message-ID: There are 19 GPIO's on the micro:bit that make it to the edge connector, and I don't see 38 (19 pairs) of protection diodes on the back of my micro:bit. The NRF51 data-sheet on page 37 table 19 parameter VIO is specified as an absolute maximum of VDD+0.3V and -0.3V. So as long as any back-emf from any arbitrary speaker plugged in raw into the micro:bit doesn't exceed that range, the micro:bit will not be stressed outside of it's design parameters. However, when the schematics are released, we'll be able to turn that from a 'suspect' into a more authoritative answer. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nevil.hunt at hotmail.co.uk Sat Sep 3 11:32:20 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Sat, 3 Sep 2016 15:32:20 +0000 Subject: [Microbit-Python] PyCon UK zbit:connect proposal In-Reply-To: References: , Message-ID: Thanks to Peter and Nicholas for sorting out my PyCon proposal! This means I will be at PyCon on the Friday demoing various micro:bit add-ons so if there are any micro:bit Pythoners there that day please come over and say "hello!" Nevil ________________________________ From: Microbit on behalf of Peter Inglesby Sent: 31 August 2016 09:33 To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] PyCon UK zbit:connect proposal Hi Nevil, I'm the chair of PyCon UK this year, and I'm really sorry that there's been a lack of communication here. I'll look into this today. Thanks for being understanding, Peter. On 31 August 2016 at 08:43, Nevil Hunt > wrote: Hi, In June I put forward a proposal to demonstrate my prototype "zbit:connect" boards for the BBC micro:bit on the Friday at this years PyCon UK. At the time I got an email acknowledging receipt of the proposal but since then I've not heard anything. Last week I sent another email but I've still not heard anything. Does anyone know who else I could contact? The "zbit:connect" boards make it easier to attach more sophisticated electronics to the micro:bit such as boards using the I2C and/or SPI busses and the only one of the 4 main micro:bit languages which supports driving these busses is micro python, hence it would be good to demonstrate them at PyCon UK to showcase some of the things micro python can do! I was looking to have space for a couple of tables for people to drop by during the day for a demo. Cheers, Nevil _______________________________________________ Microbit mailing list Microbit at python.org https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonaso43 at googlemail.com Mon Sep 5 10:09:52 2016 From: leonaso43 at googlemail.com (Leona So) Date: Mon, 5 Sep 2016 15:09:52 +0100 Subject: [Microbit-Python] PyCon UK proposal - Enriching Maths and Physics teaching with Micro:bit motion sensors In-Reply-To: <5770716A.5090906@stevesimmons.com> References: <57706E55.5090605@stevesimmons.com> <5770716A.5090906@stevesimmons.com> Message-ID: Hi Stephen, Do you have any updated information regarding this? Thanks. Regards, Leona On Mon, Jun 27, 2016 at 1:20 AM, Stephen Simmons wrote: > Hi everyone, > > I mentioned on this list a couple of weeks ago an idea to run a session at > PyCon UK Teachers' Day on using the Micro:bit's motion sensors. > > A number of people - including Leona, Steve and Nigel (Cc-ed) - replied > wanting to get involved. > > Encouraged by this, I have just submitted the outline below. It hopefully > gives the conference organisers enough to say "Yup, go for it" while > leaving a lot of space for us to decide exactly what to present. > > I am on holiday next week so will finally have time to email everyone who > has expressed interest about working together sorting out the details. > > Thanks > Stephen > > > > *Title: * > Enriching Maths and Physics teaching with Micro:bit motion sensors > > *What are you proposing? * > A workshop for Teachers' Day > (duration/number of attendees are flexible. TBD with PyCon UK organisers) > > *Abstract: * > The BBC Micro:bit has powerful accelerometer and compass motion sensors. > While they are fun for kids to play with, we show how they can also be used > in class to bring some key Maths and Physics principles to life. > > This workshop session is intended for teachers who want to learn about > using micro:bit in their classes. No specific knowledge of micro:bit or > Python programming is assumed. People who already know Python and micro:bit > are also welcome to join in, especially if you can help the teachers get > started. > > Teachers and helpers are asked to send their ideas for teaching examples > to me at mail at stevesimmons.com well before the Teachers' Day. We will > write up several examples to present in full, with some others as group > exercises. > > *Why will people be interested: * > This is a practical session to help teachers integrate micro:bit into > their classes. It can accommodate all levels of experience and teachers and > non-teachers are welcome. > > *What level of audience: * > Novice > > *More information about you (public): * > Stephen has been a Python programmer since 2000. He trained as a > mathematician and electrical engineer, with a PhD in signal processing for > radar target detection. After a period as a management consultant, he > worked for credit card companies in Australia and The Netherlands, running > areas like marketing, risk, operations and strategy. Six years ago, he > moved back into technology and joined JPMorgan in London, where his team > uses Python to build trading, risk management and analytics systems. > > *More information about you (private): * > I presented the tutorial "Pandas from the Inside" at PyData London on 6 > May 2016. I have also submitted a separate proposal on motion sensors data > fusion for the main PyCon UK conference. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel.kendrick at gmail.com Mon Sep 5 10:26:24 2016 From: nigel.kendrick at gmail.com (Nigel Kendrick) Date: Mon, 05 Sep 2016 15:26:24 +0100 Subject: [Microbit-Python] PyCon UK proposal - Enriching Maths and Physics teaching with Micro:bit motion sensors In-Reply-To: References: <57706E55.5090605@stevesimmons.com> <5770716A.5090906@stevesimmons.com> Message-ID: <30A901C2-9FB4-4705-93B1-4D7A160251C6@gmail.com> Ditto. I'm still ready, willing and able to check out code and work on any material etc., but I'm not now going to attend PyCon due to a clash with a work commitment. Nigel Kendrick On 5 September 2016 15:09:52 BST, Leona So wrote: >Hi Stephen, > >Do you have any updated information regarding this? > >Thanks. > >Regards, > > >Leona > >On Mon, Jun 27, 2016 at 1:20 AM, Stephen Simmons > >wrote: > >> Hi everyone, >> >> I mentioned on this list a couple of weeks ago an idea to run a >session at >> PyCon UK Teachers' Day on using the Micro:bit's motion sensors. >> >> A number of people - including Leona, Steve and Nigel (Cc-ed) - >replied >> wanting to get involved. >> >> Encouraged by this, I have just submitted the outline below. It >hopefully >> gives the conference organisers enough to say "Yup, go for it" while >> leaving a lot of space for us to decide exactly what to present. >> >> I am on holiday next week so will finally have time to email everyone >who >> has expressed interest about working together sorting out the >details. >> >> Thanks >> Stephen >> >> >> >> *Title: * >> Enriching Maths and Physics teaching with Micro:bit motion sensors >> >> *What are you proposing? * >> A workshop for Teachers' Day >> (duration/number of attendees are flexible. TBD with PyCon UK >organisers) >> >> *Abstract: * >> The BBC Micro:bit has powerful accelerometer and compass motion >sensors. >> While they are fun for kids to play with, we show how they can also >be used >> in class to bring some key Maths and Physics principles to life. >> >> This workshop session is intended for teachers who want to learn >about >> using micro:bit in their classes. No specific knowledge of micro:bit >or >> Python programming is assumed. People who already know Python and >micro:bit >> are also welcome to join in, especially if you can help the teachers >get >> started. >> >> Teachers and helpers are asked to send their ideas for teaching >examples >> to me at mail at stevesimmons.com well before the Teachers' Day. We will >> write up several examples to present in full, with some others as >group >> exercises. >> >> *Why will people be interested: * >> This is a practical session to help teachers integrate micro:bit into >> their classes. It can accommodate all levels of experience and >teachers and >> non-teachers are welcome. >> >> *What level of audience: * >> Novice >> >> *More information about you (public): * >> Stephen has been a Python programmer since 2000. He trained as a >> mathematician and electrical engineer, with a PhD in signal >processing for >> radar target detection. After a period as a management consultant, he >> worked for credit card companies in Australia and The Netherlands, >running >> areas like marketing, risk, operations and strategy. Six years ago, >he >> moved back into technology and joined JPMorgan in London, where his >team >> uses Python to build trading, risk management and analytics systems. >> >> *More information about you (private): * >> I presented the tutorial "Pandas from the Inside" at PyData London on >6 >> May 2016. I have also submitted a separate proposal on motion sensors >data >> fusion for the main PyCon UK conference. >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonaso43 at googlemail.com Mon Sep 5 10:29:59 2016 From: leonaso43 at googlemail.com (Leona So) Date: Mon, 5 Sep 2016 15:29:59 +0100 Subject: [Microbit-Python] PyCon UK proposal - Enriching Maths and Physics teaching with Micro:bit motion sensors In-Reply-To: <30A901C2-9FB4-4705-93B1-4D7A160251C6@gmail.com> References: <57706E55.5090605@stevesimmons.com> <5770716A.5090906@stevesimmons.com> <30A901C2-9FB4-4705-93B1-4D7A160251C6@gmail.com> Message-ID: I won't be going either because of work commitment, one of my colleagues will though. But, I am still ready and can't wait to get it tested if this is going ahead! On Mon, Sep 5, 2016 at 3:26 PM, Nigel Kendrick wrote: > Ditto. I'm still ready, willing and able to check out code and work on any > material etc., but I'm not now going to attend PyCon due to a clash with a > work commitment. > > Nigel Kendrick > > > On 5 September 2016 15:09:52 BST, Leona So > wrote: >> >> Hi Stephen, >> >> Do you have any updated information regarding this? >> >> Thanks. >> >> Regards, >> >> >> Leona >> >> On Mon, Jun 27, 2016 at 1:20 AM, Stephen Simmons >> wrote: >> >>> Hi everyone, >>> >>> I mentioned on this list a couple of weeks ago an idea to run a session >>> at PyCon UK Teachers' Day on using the Micro:bit's motion sensors. >>> >>> A number of people - including Leona, Steve and Nigel (Cc-ed) - replied >>> wanting to get involved. >>> >>> Encouraged by this, I have just submitted the outline below. It >>> hopefully gives the conference organisers enough to say "Yup, go for it" >>> while leaving a lot of space for us to decide exactly what to present. >>> >>> I am on holiday next week so will finally have time to email everyone >>> who has expressed interest about working together sorting out the details. >>> >>> Thanks >>> Stephen >>> >>> >>> >>> *Title: * >>> Enriching Maths and Physics teaching with Micro:bit motion sensors >>> >>> *What are you proposing? * >>> A workshop for Teachers' Day >>> (duration/number of attendees are flexible. TBD with PyCon UK organisers) >>> >>> *Abstract: * >>> The BBC Micro:bit has powerful accelerometer and compass motion sensors. >>> While they are fun for kids to play with, we show how they can also be used >>> in class to bring some key Maths and Physics principles to life. >>> >>> This workshop session is intended for teachers who want to learn about >>> using micro:bit in their classes. No specific knowledge of micro:bit or >>> Python programming is assumed. People who already know Python and micro:bit >>> are also welcome to join in, especially if you can help the teachers get >>> started. >>> >>> Teachers and helpers are asked to send their ideas for teaching examples >>> to me at mail at stevesimmons.com well before the Teachers' Day. We will >>> write up several examples to present in full, with some others as group >>> exercises. >>> >>> *Why will people be interested: * >>> This is a practical session to help teachers integrate micro:bit into >>> their classes. It can accommodate all levels of experience and teachers and >>> non-teachers are welcome. >>> >>> *What level of audience: * >>> Novice >>> >>> *More information about you (public): * >>> Stephen has been a Python programmer since 2000. He trained as a >>> mathematician and electrical engineer, with a PhD in signal processing for >>> radar target detection. After a period as a management consultant, he >>> worked for credit card companies in Australia and The Netherlands, running >>> areas like marketing, risk, operations and strategy. Six years ago, he >>> moved back into technology and joined JPMorgan in London, where his team >>> uses Python to build trading, risk management and analytics systems. >>> >>> *More information about you (private): * >>> I presented the tutorial "Pandas from the Inside" at PyData London on 6 >>> May 2016. I have also submitted a separate proposal on motion sensors data >>> fusion for the main PyCon UK conference. >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at stevesimmons.com Mon Sep 5 12:21:08 2016 From: mail at stevesimmons.com (Stephen Simmons) Date: Mon, 05 Sep 2016 17:21:08 +0100 Subject: [Microbit-Python] PyCon UK proposal - Enriching Maths and Physics teaching with Micro:bit motion sensors In-Reply-To: References: <57706E55.5090605@stevesimmons.com> <5770716A.5090906@stevesimmons.com> <30A901C2-9FB4-4705-93B1-4D7A160251C6@gmail.com> Message-ID: <1E9514D8-5478-4879-8DB5-E57AF1437231@stevesimmons.com> Rather than a tutorial, I have a 30 minute presentation slot on Motion Sensors and Data Fusion on the Open Day on Thursday 15 September at 3:30. I wrote half the presentation over the weekend, including code for two microbits to do remote wireless sensor logging, with sample analysis in a Jupyter notebook. I'll finish it off this coming weekend with another couple of examples. Then if anyone is interested pushing it further, we could meet up in Cardiff and sketch out a plan. My big surprise from microbit coding this weekend is how much fun it is, with really very simple code. Absolutely brilliant! My in-progress code and presentation is on github at: https://github.com/stevesimmons/pyconuk-motion-sensor-data-fusion Stephen On 5 September 2016 15:29:59 BST, Leona So wrote: >I won't be going either because of work commitment, one of my >colleagues >will though. But, I am still ready and can't wait to get it tested if >this >is going ahead! > >On Mon, Sep 5, 2016 at 3:26 PM, Nigel Kendrick > >wrote: > >> Ditto. I'm still ready, willing and able to check out code and work >on any >> material etc., but I'm not now going to attend PyCon due to a clash >with a >> work commitment. >> >> Nigel Kendrick >> >> >> On 5 September 2016 15:09:52 BST, Leona So >> wrote: >>> >>> Hi Stephen, >>> >>> Do you have any updated information regarding this? >>> >>> Thanks. >>> >>> Regards, >>> >>> >>> Leona >>> >>> On Mon, Jun 27, 2016 at 1:20 AM, Stephen Simmons > >>> wrote: >>> >>>> Hi everyone, >>>> >>>> I mentioned on this list a couple of weeks ago an idea to run a >session >>>> at PyCon UK Teachers' Day on using the Micro:bit's motion sensors. >>>> >>>> A number of people - including Leona, Steve and Nigel (Cc-ed) - >replied >>>> wanting to get involved. >>>> >>>> Encouraged by this, I have just submitted the outline below. It >>>> hopefully gives the conference organisers enough to say "Yup, go >for it" >>>> while leaving a lot of space for us to decide exactly what to >present. >>>> >>>> I am on holiday next week so will finally have time to email >everyone >>>> who has expressed interest about working together sorting out the >details. >>>> >>>> Thanks >>>> Stephen >>>> >>>> >>>> >>>> *Title: * >>>> Enriching Maths and Physics teaching with Micro:bit motion sensors >>>> >>>> *What are you proposing? * >>>> A workshop for Teachers' Day >>>> (duration/number of attendees are flexible. TBD with PyCon UK >organisers) >>>> >>>> *Abstract: * >>>> The BBC Micro:bit has powerful accelerometer and compass motion >sensors. >>>> While they are fun for kids to play with, we show how they can also >be used >>>> in class to bring some key Maths and Physics principles to life. >>>> >>>> This workshop session is intended for teachers who want to learn >about >>>> using micro:bit in their classes. No specific knowledge of >micro:bit or >>>> Python programming is assumed. People who already know Python and >micro:bit >>>> are also welcome to join in, especially if you can help the >teachers get >>>> started. >>>> >>>> Teachers and helpers are asked to send their ideas for teaching >examples >>>> to me at mail at stevesimmons.com well before the Teachers' Day. We >will >>>> write up several examples to present in full, with some others as >group >>>> exercises. >>>> >>>> *Why will people be interested: * >>>> This is a practical session to help teachers integrate micro:bit >into >>>> their classes. It can accommodate all levels of experience and >teachers and >>>> non-teachers are welcome. >>>> >>>> *What level of audience: * >>>> Novice >>>> >>>> *More information about you (public): * >>>> Stephen has been a Python programmer since 2000. He trained as a >>>> mathematician and electrical engineer, with a PhD in signal >processing for >>>> radar target detection. After a period as a management consultant, >he >>>> worked for credit card companies in Australia and The Netherlands, >running >>>> areas like marketing, risk, operations and strategy. Six years ago, >he >>>> moved back into technology and joined JPMorgan in London, where his >team >>>> uses Python to build trading, risk management and analytics >systems. >>>> >>>> *More information about you (private): * >>>> I presented the tutorial "Pandas from the Inside" at PyData London >on 6 >>>> May 2016. I have also submitted a separate proposal on motion >sensors data >>>> fusion for the main PyCon UK conference. >>>> >>>> >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.wouters at hotmail.com Thu Sep 8 03:24:34 2016 From: jeff.wouters at hotmail.com (Jeff Wouters) Date: Thu, 8 Sep 2016 08:24:34 +0100 Subject: [Microbit-Python] No access to the web site Message-ID: I registered and received the message confirming my password but I can not get into the python website because I don't know what username to use as I was never asked to specify it. Can someone get me on the right track please? Jeff From Jeff's ipad From ntoll at ntoll.org Thu Sep 8 03:29:27 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 8 Sep 2016 08:29:27 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: References: Message-ID: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> On 08/09/16 08:24, Jeff Wouters wrote: > I registered and received the message confirming my password but I can not get into the python website because I don't know what username to use as I was never asked to specify it. > Can someone get me on the right track please? > > Jeff > > From Jeff's ipad > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > Hi Jeff, Apologies if this all sounds obvious, but I want to make sure I understand what the problem is if I am to help you. What exactly are you trying to achieve? You don't mention which website is causing you problems (please supply the URL - there are lots of Python websites). Thanks for your patience, 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 jeff.wouters at hotmail.com Thu Sep 8 03:55:56 2016 From: jeff.wouters at hotmail.com (Jeff Wouters) Date: Thu, 8 Sep 2016 08:55:56 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> References: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> Message-ID: I was trying to sign in to python.org. Now I see that there is a python.uk. Do I have to register there too? Sorry, I am new and rather confused. Jeff From Jeff's ipad > On 8 Sep 2016, at 08:29, Nicholas H.Tollervey wrote: > >> On 08/09/16 08:24, Jeff Wouters wrote: >> I registered and received the message confirming my password but I can not get into the python website because I don't know what username to use as I was never asked to specify it. >> Can someone get me on the right track please? >> >> Jeff >> >> From Jeff's ipad >> _______________________________________________ >> Microbit mailing list >> Microbit at python.org >> https://mail.python.org/mailman/listinfo/microbit > > Hi Jeff, > > Apologies if this all sounds obvious, but I want to make sure I > understand what the problem is if I am to help you. > > What exactly are you trying to achieve? You don't mention which website > is causing you problems (please supply the URL - there are lots of > Python websites). > > Thanks for your patience, > > N. > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit From ntoll at ntoll.org Thu Sep 8 04:00:24 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 8 Sep 2016 09:00:24 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: References: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> Message-ID: <2145df1f-16ab-8df4-0106-31797c1c88d2@ntoll.org> Hi Jeff, Absolutely no problem at all. Can you please tell me what you're trying to achieve? For example (and given the context of this mailing list), are you a teacher looking for Python related micro:bit resources? Perhaps you're a student looking for projects? Maybe your an educational administrator wanting to get in touch with the Python community? Let me know what you're trying to do and I'll point you in the right direction. :-) All the best, Nicholas. On 08/09/16 08:55, Jeff Wouters wrote: > I was trying to sign in to python.org. > Now I see that there is a python.uk. Do I have to register there too? > Sorry, I am new and rather confused. > > Jeff > > From Jeff's ipad > >> On 8 Sep 2016, at 08:29, Nicholas H.Tollervey wrote: >> >>> On 08/09/16 08:24, Jeff Wouters wrote: >>> I registered and received the message confirming my password but I can not get into the python website because I don't know what username to use as I was never asked to specify it. >>> Can someone get me on the right track please? >>> >>> Jeff >>> >>> From Jeff's ipad >>> _______________________________________________ >>> Microbit mailing list >>> Microbit at python.org >>> https://mail.python.org/mailman/listinfo/microbit >> >> Hi Jeff, >> >> Apologies if this all sounds obvious, but I want to make sure I >> understand what the problem is if I am to help you. >> >> What exactly are you trying to achieve? You don't mention which website >> is causing you problems (please supply the URL - there are lots of >> Python websites). >> >> Thanks for your patience, >> >> 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 jeff.wouters at hotmail.com Thu Sep 8 04:22:31 2016 From: jeff.wouters at hotmail.com (Jeff Wouters) Date: Thu, 8 Sep 2016 09:22:31 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: <2145df1f-16ab-8df4-0106-31797c1c88d2@ntoll.org> References: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> <2145df1f-16ab-8df4-0106-31797c1c88d2@ntoll.org> Message-ID: Sorry, Nicholas, I am just a retired engineer who came along the BBC Micro route along the turtle and the buggy, got interested in Arduino and fascinated by this new initiative. I have quite a collection of Fischertechnik including their new Robo TXT, after I went past Economatics Smart Box. The new capabilities are amazing and I want to learn it and be able to deal it with my grand children. I never used Bluetooth to be able to control models. At 71 you don't want to be left behind! Thanks for your attention and advice. Jeff From Jeff's ipad > On 8 Sep 2016, at 09:00, Nicholas H.Tollervey wrote: > > Hi Jeff, > > Absolutely no problem at all. > > Can you please tell me what you're trying to achieve? For example (and > given the context of this mailing list), are you a teacher looking for > Python related micro:bit resources? Perhaps you're a student looking for > projects? Maybe your an educational administrator wanting to get in > touch with the Python community? > > Let me know what you're trying to do and I'll point you in the right > direction. :-) > > All the best, > > Nicholas. > >> On 08/09/16 08:55, Jeff Wouters wrote: >> I was trying to sign in to python.org. >> Now I see that there is a python.uk. Do I have to register there too? >> Sorry, I am new and rather confused. >> >> Jeff >> >> From Jeff's ipad >> >>>> On 8 Sep 2016, at 08:29, Nicholas H.Tollervey wrote: >>>> >>>> On 08/09/16 08:24, Jeff Wouters wrote: >>>> I registered and received the message confirming my password but I can not get into the python website because I don't know what username to use as I was never asked to specify it. >>>> Can someone get me on the right track please? >>>> >>>> Jeff >>>> >>>> From Jeff's ipad >>>> _______________________________________________ >>>> Microbit mailing list >>>> Microbit at python.org >>>> https://mail.python.org/mailman/listinfo/microbit >>> >>> Hi Jeff, >>> >>> Apologies if this all sounds obvious, but I want to make sure I >>> understand what the problem is if I am to help you. >>> >>> What exactly are you trying to achieve? You don't mention which website >>> is causing you problems (please supply the URL - there are lots of >>> Python websites). >>> >>> Thanks for your patience, >>> >>> 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 Thu Sep 8 04:31:21 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 8 Sep 2016 09:31:21 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: References: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> <2145df1f-16ab-8df4-0106-31797c1c88d2@ntoll.org> Message-ID: <472cb0db-920c-c319-71cc-6d0f4684f753@ntoll.org> Hi Jeff, Aha! I believe you're among friends here ~ we're all young at heart no matter what our alleged "real" age is supposed to be. ;-) You've obviously signed up to the mailing list. Please feel free to ask questions. Don't worry "is my question stupid?", we'd love to know what the bumps and sticking points are for MicroPython on the micro:bit. In terms of stuff to read, check out the tutorials in our documentation found here: https://microbit-micropython.readthedocs.io/en/latest/ This should give you a good idea of what the device can do and how to make it do interesting stuff with grandchildren. All feedback is most welcome! There's also all the stuff on the official BBC website at microbit.co.uk (although that's not Python specific). Happy to help and best of luck! N. On 08/09/16 09:22, Jeff Wouters wrote: > Sorry, Nicholas, I am just a retired engineer who came along the BBC > Micro route along the turtle and the buggy, got interested in Arduino > and fascinated by this new initiative. I have quite a collection of > Fischertechnik including their new Robo TXT, after I went past > Economatics Smart Box. The new capabilities are amazing and I want to > learn it and be able to deal it with my grand children. I never used > Bluetooth to be able to control models. At 71 you don't want to be > left behind! > > Thanks for your attention and advice. > > Jeff > > From Jeff's ipad > >> On 8 Sep 2016, at 09:00, Nicholas H.Tollervey >> wrote: >> >> Hi Jeff, >> >> Absolutely no problem at all. >> >> Can you please tell me what you're trying to achieve? For example >> (and given the context of this mailing list), are you a teacher >> looking for Python related micro:bit resources? Perhaps you're a >> student looking for projects? Maybe your an educational >> administrator wanting to get in touch with the Python community? >> >> Let me know what you're trying to do and I'll point you in the >> right direction. :-) >> >> All the best, >> >> Nicholas. >> >>> On 08/09/16 08:55, Jeff Wouters wrote: I was trying to sign in to >>> python.org. Now I see that there is a python.uk. Do I have to >>> register there too? Sorry, I am new and rather confused. >>> >>> Jeff >>> >>> From Jeff's ipad >>> >>>>> On 8 Sep 2016, at 08:29, Nicholas H.Tollervey >>>>> wrote: >>>>> >>>>> On 08/09/16 08:24, Jeff Wouters wrote: I registered and >>>>> received the message confirming my password but I can not get >>>>> into the python website because I don't know what username to >>>>> use as I was never asked to specify it. Can someone get me on >>>>> the right track please? >>>>> >>>>> Jeff >>>>> >>>>> From Jeff's ipad >>>>> _______________________________________________ Microbit >>>>> mailing list Microbit at python.org >>>>> https://mail.python.org/mailman/listinfo/microbit >>>> >>>> Hi Jeff, >>>> >>>> Apologies if this all sounds obvious, but I want to make sure >>>> I understand what the problem is if I am to help you. >>>> >>>> What exactly are you trying to achieve? You don't mention which >>>> website is causing you problems (please supply the URL - there >>>> are lots of Python websites). >>>> >>>> Thanks for your patience, >>>> >>>> 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 mail at timgolden.me.uk Thu Sep 8 04:32:32 2016 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 8 Sep 2016 09:32:32 +0100 Subject: [Microbit-Python] No access to the web site In-Reply-To: References: <6eacd4db-7518-96ed-9993-7f74ae088caa@ntoll.org> <2145df1f-16ab-8df4-0106-31797c1c88d2@ntoll.org> Message-ID: Jeff -- you're welcome to access everything on python.org without logging in to the site. (There was presumably some notion of having additional resources or social connections for logged-on users, but nothing's happened yet). If you'd like to sign in nevertheless, drop a line to webmaster at python.org and describe what's working and what's not and we'll see if we can help you out. If you just want to use Python and the microbit, then just have at it! TJG On 08/09/2016 09:22, Jeff Wouters wrote: > Sorry, Nicholas, I am just a retired engineer who came along the BBC > Micro route along the turtle and the buggy, got interested in Arduino > and fascinated by this new initiative. I have quite a collection of > Fischertechnik including their new Robo TXT, after I went past > Economatics Smart Box. The new capabilities are amazing and I want to > learn it and be able to deal it with my grand children. I never used > Bluetooth to be able to control models. At 71 you don't want to be > left behind! > > Thanks for your attention and advice. > > Jeff > > From Jeff's ipad > >> On 8 Sep 2016, at 09:00, Nicholas H.Tollervey >> wrote: >> >> Hi Jeff, >> >> Absolutely no problem at all. >> >> Can you please tell me what you're trying to achieve? For example >> (and given the context of this mailing list), are you a teacher >> looking for Python related micro:bit resources? Perhaps you're a >> student looking for projects? Maybe your an educational >> administrator wanting to get in touch with the Python community? >> >> Let me know what you're trying to do and I'll point you in the >> right direction. :-) >> >> All the best, >> >> Nicholas. >> >>> On 08/09/16 08:55, Jeff Wouters wrote: I was trying to sign in to >>> python.org. Now I see that there is a python.uk. Do I have to >>> register there too? Sorry, I am new and rather confused. >>> >>> Jeff >>> >>> From Jeff's ipad >>> >>>>> On 8 Sep 2016, at 08:29, Nicholas H.Tollervey >>>>> wrote: >>>>> >>>>> On 08/09/16 08:24, Jeff Wouters wrote: I registered and >>>>> received the message confirming my password but I can not get >>>>> into the python website because I don't know what username to >>>>> use as I was never asked to specify it. Can someone get me on >>>>> the right track please? >>>>> >>>>> Jeff >>>>> >>>>> From Jeff's ipad >>>>> _______________________________________________ Microbit >>>>> mailing list Microbit at python.org >>>>> https://mail.python.org/mailman/listinfo/microbit >>>> >>>> Hi Jeff, >>>> >>>> Apologies if this all sounds obvious, but I want to make sure >>>> I understand what the problem is if I am to help you. >>>> >>>> What exactly are you trying to achieve? You don't mention which >>>> website is causing you problems (please supply the URL - there >>>> are lots of Python websites). >>>> >>>> Thanks for your patience, >>>> >>>> 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 > From andrewferguson500 at gmail.com Fri Sep 9 10:19:15 2016 From: andrewferguson500 at gmail.com (Andrew Ferguson) Date: Fri, 9 Sep 2016 15:19:15 +0100 Subject: [Microbit-Python] Microbit I/O Questions Message-ID: During a project I have come across a few questions related to the I/O pins of the microbit. I could probably try these myself - but I thought I would ask here first before I potentially break my microbit. Unlike Arduino, there is no way to specify whether a pin is an input or and output with the microbit. Therefore I am curious to what would happen in the following cases: A lamp is connected from the 3.3v pin to an I/O pin, and no code is flashed. Would the lamp light? Alternatively, what would happen if a value was read from the pin connected to the lamp? And what would happen if you set an I/O pin to output 3.3v and then tried to read from it? Would you get a value? Would the pin become an input and stop outputting 3.3v? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jj at gioorgi.com Fri Sep 9 11:54:42 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Fri, 09 Sep 2016 17:54:42 +0200 Subject: [Microbit-Python] Building a microbit python extension (SID emulator) Message-ID: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> Hi all, my name is Giovanni Giorgi, I am born in the 1974 and I am a very excited about micropython. I am an Arduino fan, and I have done small extension to this SID emulator: https://github.com/daitangio/sid-arduino-lib I am very excited by micropython: I am evaluting to write a small C extension to reimplement a subset of sid-arduino-lib. There is a guide on PWM micropython hacking and/or on micropython module extension? Even directing to a *.cpp file is okey (I am not scared by C++ by the way :) --- Gio's Blog http://gioorgi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hot.toast at yahoo.co.uk Sun Sep 11 03:33:08 2016 From: hot.toast at yahoo.co.uk (hot.toast) Date: Sun, 11 Sep 2016 08:33:08 +0100 Subject: [Microbit-Python] importing modules using uflash Message-ID: I'm trying to test the micropython sheduler module "usched.py" on the microbit. The script I am using to test it "roundrobin.py" contains the line "from usched import Sched" If I flash the microbit using the command uflash roundrobin.py, I get an ImportError stating no module named 'usched' How do I get uflash to recognise that it needs to incorporate a module in the same path as the script? From ben at benmr.com Sun Sep 11 04:48:59 2016 From: ben at benmr.com (Ben Mustill-Rose) Date: Sun, 11 Sep 2016 09:48:59 +0100 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: References: Message-ID: Hi, If you're getting import errors it unfortunately means that the module hasn't been included in the build of MicroPython for the micro:bit. To expand on this a little, the way that uflash works is: A vanilla copy of the runtime - E.G. with no scripts added is included in the tool (from memory this starts at around line 314). Unless otherwise specified via its parameters, when run, uflash will create a hex representation of roundrobin.py and concatenate said representation with the vanilla runtime. The tool itself has no understanding of modules per say - all it does is joins files together. If you're interested in how it works I highly recommend having a look at the code as it?s very readable. Sorry to be the bearer of bad news - hopefully someone else may have an idea as to how your problem can be solved. Cheers, Ben. On 9/11/16, hot.toast via Microbit wrote: > I'm trying to test the micropython sheduler module "usched.py" on the > microbit. > > The script I am using to test it "roundrobin.py" contains the line "from > usched import Sched" > > If I flash the microbit using the command uflash roundrobin.py, I get an > ImportError stating no module named 'usched' > > How do I get uflash to recognise that it needs to incorporate a module > in the same path as the script? > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From microbit at sheep.art.pl Sun Sep 11 06:27:43 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Sun, 11 Sep 2016 12:27:43 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: References: Message-ID: <20160911122743.2ec55d15@ghostwheel> You can use the mu editor to upload all the additional modules to the internal filesystem of the Micro:bit, then it should be possible to import them. On Sun, 11 Sep 2016 08:33:08 +0100 "hot.toast via Microbit" wrote: > I'm trying to test the micropython sheduler module "usched.py" on the > microbit. > > The script I am using to test it "roundrobin.py" contains the line > "from usched import Sched" > > If I flash the microbit using the command uflash roundrobin.py, I get > an ImportError stating no module named 'usched' > > How do I get uflash to recognise that it needs to incorporate a > module in the same path as the script? -- Radomir Dopieralski From david at thinkingbinaries.com Sun Sep 11 07:19:27 2016 From: david at thinkingbinaries.com (David Whale) Date: Sun, 11 Sep 2016 12:19:27 +0100 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <20160911122743.2ec55d15@ghostwheel> References: <20160911122743.2ec55d15@ghostwheel> Message-ID: Make sure you use the most up to date version of Mu though to do this, as it was a feature that was added reasonably recently. The version of Mu in the Raspberry Pi repo's is still out of date at the moment, and might not have this feature included yet. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hot.toast at yahoo.co.uk Sun Sep 11 07:47:20 2016 From: hot.toast at yahoo.co.uk (hot.toast) Date: Sun, 11 Sep 2016 12:47:20 +0100 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: References: <20160911122743.2ec55d15@ghostwheel> Message-ID: <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> So as i understand it, 1. uFlash is limited to python scripts that contain all the local function and class definitions. The only imports that are allowed are those from the microbit version of micropython. 2. If I want to import "mymodule.py" from a file on my local hard drive, I will have to use the latest version of the mu editor... On 11/09/16 12:19, David Whale wrote: > Make sure you use the most up to date version of Mu though to do this, as > it was a feature that was added reasonably recently. The version of Mu in > the Raspberry Pi repo's is still out of date at the moment, and might not > have this feature included yet. > >> >> > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit -------------- next part -------------- An HTML attachment was scrubbed... URL: From microbit at sheep.art.pl Sun Sep 11 08:00:29 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Sun, 11 Sep 2016 14:00:29 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> Message-ID: <20160911140029.4531b408@ghostwheel> Not quite. It doesn't matter how you upload your main script -- you can use uFlash or Mu or the online editor, or even prepare the hex file yourself by hand. The thing is, that the hex file can contain only one python file in it. However, there is also internal filesystem on the micro:bit, where you can put additional files to be imported by your main script. The most convenient way to access that filesystem and upload your files is by using the latest version of the Mu editor. Of course, you could as well just write a program that creates the file and writes its contents, but that is a little roundabout way of doing it. I hope this helps. On Sun, 11 Sep 2016 12:47:20 +0100 "hot.toast via Microbit" wrote: > So as i understand it, > > 1. uFlash is limited to python scripts that contain all the local > function and class definitions. The only imports that are allowed are > those from the microbit version of micropython. > > 2. If I want to import "mymodule.py" from a file on my local hard > drive, I will have to use the latest version of the mu editor... > > On 11/09/16 12:19, David Whale wrote: > > Make sure you use the most up to date version of Mu though to do > > this, as it was a feature that was added reasonably recently. The > > version of Mu in the Raspberry Pi repo's is still out of date at > > the moment, and might not have this feature included yet. -- Radomir Dopieralski -- Radomir Dopieralski From damien.p.george at gmail.com Sun Sep 11 23:24:09 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 12 Sep 2016 13:24:09 +1000 Subject: [Microbit-Python] Microbit I/O Questions In-Reply-To: References: Message-ID: The microbit GPIO functionality was designed to be easy for children to use. So it automatically configures itself to input or output depending on the call. Eg pin.write_digital will make it an output, and pin.read_digital will then make it an input. Upon power up the pins are in a "disconnected" state, basically in input. On 10 September 2016 at 00:19, Andrew Ferguson wrote: > During a project I have come across a few questions related to the I/O pins > of the microbit. I could probably try these myself - but I thought I would > ask here first before I potentially break my microbit. > > Unlike Arduino, there is no way to specify whether a pin is an input or and > output with the microbit. Therefore I am curious to what would happen in the > following cases: > > A lamp is connected from the 3.3v pin to an I/O pin, and no code is flashed. > Would the lamp light? > > Alternatively, what would happen if a value was read from the pin connected > to the lamp? > > And what would happen if you set an I/O pin to output 3.3v and then tried to > read from it? Would you get a value? Would the pin become an input and stop > outputting 3.3v? > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From damien.p.george at gmail.com Sun Sep 11 23:26:16 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 12 Sep 2016 13:26:16 +1000 Subject: [Microbit-Python] Building a microbit python extension (SID emulator) In-Reply-To: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> References: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> Message-ID: If you want to write C (or C++) extensions to micropython (either for the microbit or other boards), then it's best to consult the forum: http://forum.micropython.org/ There is now a dedicated microbit section on this forum, as well as sections discussion general development of and with MicroPython. On 10 September 2016 at 01:54, Giovanni Giorgi wrote: > Hi all, > my name is Giovanni Giorgi, I am born in the 1974 and I am a very excited > about micropython. > > I am an Arduino fan, and I have done small extension to this SID emulator: > > https://github.com/daitangio/sid-arduino-lib > > I am very excited by micropython: I am evaluting to write a small C > extension to reimplement a subset of sid-arduino-lib. > > There is a guide on PWM micropython hacking and/or on micropython module > extension? > > Even directing to a *.cpp file is okey (I am not scared by C++ by the way :) > > --- > Gio's Blog http://gioorgi.com > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From ntoll at ntoll.org Mon Sep 12 03:21:12 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 12 Sep 2016 08:21:12 +0100 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> Message-ID: Hi, The documentation you seek is here: https://microbit-micropython.readthedocs.io/en/latest/tutorials/storage.html (high level overview) https://microfs.readthedocs.io/en/latest/ (the utility Mu uses to interact with the filesystem) Get latest Mu from here: http://codewith.mu/ See especially this: https://microbit-micropython.readthedocs.io/en/latest/tutorials/storage.html#mainly-main-py Hope this helps, N. On 11/09/16 12:47, hot.toast via Microbit wrote: > So as i understand it, > > 1. uFlash is limited to python scripts that contain all the local > function and class definitions. The only imports that are allowed are > those from the microbit version of micropython. > > 2. If I want to import "mymodule.py" from a file on my local hard > drive, I will have to use the latest version of the mu editor... > > > > > > > On 11/09/16 12:19, David Whale wrote: >> Make sure you use the most up to date version of Mu though to do this, as >> it was a feature that was added reasonably recently. The version of Mu in >> the Raspberry Pi repo's is still out of date at the moment, and might not >> have this feature included yet. >> >>> >>> >> >> >> _______________________________________________ >> 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 Mon Sep 12 04:53:52 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Mon, 12 Sep 2016 08:53:52 +0000 Subject: [Microbit-Python] Adafruit MicroPython Video Message-ID: Hi, I've just watched this Adafruit MicroPython Video:- https://www.youtube.com/watch?v=8btQWSu7DdM which shows some of the power of MicroPython including (in the last 10 minutes) a demo of MicroPython on the micro:bit! Worth watching! Is anyone in contact with Tony DiCola or anyone else from Adafruit? I've got some ideas related to the micro:bit which I'd like to discuss with them. Cheers, Nevil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jj at gioorgi.com Mon Sep 12 11:50:11 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Mon, 12 Sep 2016 17:50:11 +0200 Subject: [Microbit-Python] Building a microbit python extension (SID emulator) In-Reply-To: References: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> Message-ID: <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> Thank you George. Only a question: suppose I will be able to build an extension for microbit python. Is it right to publish a pull request on github from the source code? Is this the right way/right policy of doing it? Thank you! Il 2016-09-12 05:26 Damien George ha scritto: > If you want to write C (or C++) extensions to micropython (either for > the microbit or other boards), then it's best to consult the forum: > http://forum.micropython.org/ > > There is now a dedicated microbit section on this forum, as well as > sections discussion general development of and with MicroPython. > > On 10 September 2016 at 01:54, Giovanni Giorgi wrote: > >> Hi all, >> my name is Giovanni Giorgi, I am born in the 1974 and I am a very excited >> about micropython. >> >> I am an Arduino fan, and I have done small extension to this SID emulator: >> >> https://github.com/daitangio/sid-arduino-lib >> >> I am very excited by micropython: I am evaluting to write a small C >> extension to reimplement a subset of sid-arduino-lib. >> >> There is a guide on PWM micropython hacking and/or on micropython module >> extension? >> >> Even directing to a *.cpp file is okey (I am not scared by C++ by the way :) >> >> --- >> Gio's Blog http://gioorgi.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 Tue Sep 13 00:47:52 2016 From: damien.p.george at gmail.com (Damien George) Date: Tue, 13 Sep 2016 14:47:52 +1000 Subject: [Microbit-Python] Building a microbit python extension (SID emulator) In-Reply-To: <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> References: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> Message-ID: You are welcome to open a PR but I would say that it won't be merged because of 2 reasons: 1) likely such an extension is not going to be used by many people; 2) there is not much room left on the microbit for new features, and we need to save the space for features that will be used by the majority of users. If you do make the extension, I'd suggest just making a README describing how to install/build the extension so that other people can do it themselves if they want to try it, and then advertising your extension on this mailing list or at forum.micropython.org On 13 September 2016 at 01:50, Giovanni Giorgi wrote: > Thank you George. > > Only a question: suppose I will be able to build an extension for microbit > python. > > Is it right to publish a pull request on github from the source code? > > Is this the right way/right policy of doing it? > > Thank you! > > > > Il 2016-09-12 05:26 Damien George ha scritto: > > If you want to write C (or C++) extensions to micropython (either for > the microbit or other boards), then it's best to consult the forum: > http://forum.micropython.org/ > > There is now a dedicated microbit section on this forum, as well as > sections discussion general development of and with MicroPython. > > On 10 September 2016 at 01:54, Giovanni Giorgi wrote: > > Hi all, > my name is Giovanni Giorgi, I am born in the 1974 and I am a very excited > about micropython. > > I am an Arduino fan, and I have done small extension to this SID emulator: > > https://github.com/daitangio/sid-arduino-lib > > I am very excited by micropython: I am evaluting to write a small C > extension to reimplement a subset of sid-arduino-lib. > > There is a guide on PWM micropython hacking and/or on micropython module > extension? > > Even directing to a *.cpp file is okey (I am not scared by C++ by the way :) > > --- > Gio's Blog http://gioorgi.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 damien.p.george at gmail.com Tue Sep 13 03:56:43 2016 From: damien.p.george at gmail.com (Damien George) Date: Tue, 13 Sep 2016 17:56:43 +1000 Subject: [Microbit-Python] Adafruit MicroPython Video In-Reply-To: References: Message-ID: What kind of ideas do you have? On 12 September 2016 at 18:53, Nevil Hunt wrote: > Hi, > > > I've just watched this Adafruit MicroPython Video:- > > > https://www.youtube.com/watch?v=8btQWSu7DdM > > > which shows some of the power of MicroPython including (in the last 10 > minutes) a demo of MicroPython on the micro:bit! Worth watching! > > > Is anyone in contact with Tony DiCola or anyone else from Adafruit? I've got > some ideas related to the micro:bit which I'd like to discuss with them. > > > > Cheers, > > > Nevil > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From nevil.hunt at hotmail.co.uk Tue Sep 13 05:22:00 2016 From: nevil.hunt at hotmail.co.uk (Nevil Hunt) Date: Tue, 13 Sep 2016 09:22:00 +0000 Subject: [Microbit-Python] Adafruit MicroPython Video In-Reply-To: References: , Message-ID: Hi Damien, Are you at PyCon in Cardiff on Friday? If so I will be doing some micro:bit demos, some of which make use of Adafruit modules. Maybe we could have a chat during the day. Nevil ________________________________ From: Microbit on behalf of Damien George Sent: 13 September 2016 08:56 To: For Pythonic MicroBit related discussions Subject: Re: [Microbit-Python] Adafruit MicroPython Video What kind of ideas do you have? On 12 September 2016 at 18:53, Nevil Hunt wrote: > Hi, > > > I've just watched this Adafruit MicroPython Video:- > > > https://www.youtube.com/watch?v=8btQWSu7DdM [https://www.bing.com/th?id=OVP.V6928a269d508f164ab2f8bdf023f6264&pid=Api] MicroPython Basics: What is MicroPython? with Tony D! @ ... www.youtube.com Live stream to http://twitch.tv/adafruit looking at the MicroPython programming language, how it compares to Arduino, and demos of what it can do. Companion to the ... > > > which shows some of the power of MicroPython including (in the last 10 > minutes) a demo of MicroPython on the micro:bit! Worth watching! > > > Is anyone in contact with Tony DiCola or anyone else from Adafruit? I've got > some ideas related to the micro:bit which I'd like to discuss with them. > > > > Cheers, > > > Nevil > > > > > _______________________________________________ > 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 Tue Sep 13 05:25:56 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Tue, 13 Sep 2016 10:25:56 +0100 Subject: [Microbit-Python] Adafruit MicroPython Video In-Reply-To: References: Message-ID: On 13/09/16 10:22, Nevil Hunt wrote: > Hi Damien, > > > Are you at PyCon in Cardiff on Friday? > > If so I will be doing some micro:bit demos, some of which make use of > Adafruit modules. > > Maybe we could have a chat during the day. > > > > Nevil > Nevil, I too would love to see Damien at PyCon UK, but alas, Damien has moved back to Australia. I can see why: by the looks of the photos, Australian winters are better than British summers. :-) 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 mal at egenix.com Wed Sep 14 15:15:22 2016 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 14 Sep 2016 21:15:22 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <20160911140029.4531b408@ghostwheel> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> <20160911140029.4531b408@ghostwheel> Message-ID: <57D9A1CA.5060802@egenix.com> On 11.09.2016 14:00, Radomir Dopieralski wrote: > > Not quite. > > It doesn't matter how you upload your main script -- you can use uFlash > or Mu or the online editor, or even prepare the hex file yourself by > hand. The thing is, that the hex file can contain only one python file > in it. > > However, there is also internal filesystem on the micro:bit, where you > can put additional files to be imported by your main script. The most > convenient way to access that filesystem and upload your files is by > using the latest version of the Mu editor. Of course, you could as well > just write a program that creates the file and writes its contents, but > that is a little roundabout way of doing it. > > I hope this helps. Is the functionality needed for uploading modules to the MB documented somewhere ? (A pointer to the right place in the Mu editor code would already help :-)) Background: I've been looking for something like a few months ago and back then, there was no filesystem module import for the MB. Thanks. > On Sun, 11 Sep 2016 12:47:20 +0100 > "hot.toast via Microbit" wrote: > >> So as i understand it, >> >> 1. uFlash is limited to python scripts that contain all the local >> function and class definitions. The only imports that are allowed are >> those from the microbit version of micropython. >> >> 2. If I want to import "mymodule.py" from a file on my local hard >> drive, I will have to use the latest version of the mu editor... >> >> On 11/09/16 12:19, David Whale wrote: >>> Make sure you use the most up to date version of Mu though to do >>> this, as it was a feature that was added reasonably recently. The >>> version of Mu in the Raspberry Pi repo's is still out of date at >>> the moment, and might not have this feature included yet. > > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 14 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 microbit at sheep.art.pl Wed Sep 14 15:55:28 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Wed, 14 Sep 2016 21:55:28 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <57D9A1CA.5060802@egenix.com> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> <20160911140029.4531b408@ghostwheel> <57D9A1CA.5060802@egenix.com> Message-ID: <20160914215528.24d35ba7@ghostwheel> It just uses normal python commands, such as open(), file.read(), file.write(), os.listdir() and so on, but executes them over the REPL console. You can see exactly what it does here: https://github.com/ntoll/mu/blob/master/mu/contrib/microfs.py On Wed, 14 Sep 2016 21:15:22 +0200 "M.-A. Lemburg" wrote: > On 11.09.2016 14:00, Radomir Dopieralski wrote: > > > > Not quite. > > > > It doesn't matter how you upload your main script -- you can use > > uFlash or Mu or the online editor, or even prepare the hex file > > yourself by hand. The thing is, that the hex file can contain only > > one python file in it. > > > > However, there is also internal filesystem on the micro:bit, where > > you can put additional files to be imported by your main script. > > The most convenient way to access that filesystem and upload your > > files is by using the latest version of the Mu editor. Of course, > > you could as well just write a program that creates the file and > > writes its contents, but that is a little roundabout way of doing > > it. > > > > I hope this helps. > > Is the functionality needed for uploading modules to the > MB documented somewhere ? (A pointer to the right place > in the Mu editor code would already help :-)) > > Background: I've been looking for something like a few months > ago and back then, there was no filesystem module import for > the MB. > > Thanks. > > > On Sun, 11 Sep 2016 12:47:20 +0100 > > "hot.toast via Microbit" wrote: > > > >> So as i understand it, > >> > >> 1. uFlash is limited to python scripts that contain all the local > >> function and class definitions. The only imports that are allowed > >> are those from the microbit version of micropython. > >> > >> 2. If I want to import "mymodule.py" from a file on my local hard > >> drive, I will have to use the latest version of the mu editor... > >> > >> On 11/09/16 12:19, David Whale wrote: > >>> Make sure you use the most up to date version of Mu though to do > >>> this, as it was a feature that was added reasonably recently. The > >>> version of Mu in the Raspberry Pi repo's is still out of date at > >>> the moment, and might not have this feature included yet. > > > > > -- Radomir Dopieralski -- Radomir Dopieralski From mal at egenix.com Wed Sep 14 16:03:57 2016 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 14 Sep 2016 22:03:57 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <20160914215528.24d35ba7@ghostwheel> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> <20160911140029.4531b408@ghostwheel> <57D9A1CA.5060802@egenix.com> <20160914215528.24d35ba7@ghostwheel> Message-ID: <57D9AD2D.8060600@egenix.com> On 14.09.2016 21:55, Radomir Dopieralski wrote: > It just uses normal python commands, such as open(), file.read(), > file.write(), os.listdir() and so on, but executes them over the REPL > console. You can see exactly what it does here: > https://github.com/ntoll/mu/blob/master/mu/contrib/microfs.py Great, thanks. I think this would make an excellent addition to the uflash tool - for those of us who prefer emacs over mu ;-) > On Wed, 14 Sep 2016 21:15:22 +0200 > "M.-A. Lemburg" wrote: > >> On 11.09.2016 14:00, Radomir Dopieralski wrote: >>> >>> Not quite. >>> >>> It doesn't matter how you upload your main script -- you can use >>> uFlash or Mu or the online editor, or even prepare the hex file >>> yourself by hand. The thing is, that the hex file can contain only >>> one python file in it. >>> >>> However, there is also internal filesystem on the micro:bit, where >>> you can put additional files to be imported by your main script. >>> The most convenient way to access that filesystem and upload your >>> files is by using the latest version of the Mu editor. Of course, >>> you could as well just write a program that creates the file and >>> writes its contents, but that is a little roundabout way of doing >>> it. >>> >>> I hope this helps. >> >> Is the functionality needed for uploading modules to the >> MB documented somewhere ? (A pointer to the right place >> in the Mu editor code would already help :-)) >> >> Background: I've been looking for something like a few months >> ago and back then, there was no filesystem module import for >> the MB. >> >> Thanks. >> >>> On Sun, 11 Sep 2016 12:47:20 +0100 >>> "hot.toast via Microbit" wrote: >>> >>>> So as i understand it, >>>> >>>> 1. uFlash is limited to python scripts that contain all the local >>>> function and class definitions. The only imports that are allowed >>>> are those from the microbit version of micropython. >>>> >>>> 2. If I want to import "mymodule.py" from a file on my local hard >>>> drive, I will have to use the latest version of the mu editor... >>>> >>>> On 11/09/16 12:19, David Whale wrote: >>>>> Make sure you use the most up to date version of Mu though to do >>>>> this, as it was a feature that was added reasonably recently. The >>>>> version of Mu in the Raspberry Pi repo's is still out of date at >>>>> the moment, and might not have this feature included yet. >>> >>> >> > > > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 14 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 microbit at sheep.art.pl Wed Sep 14 16:11:50 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Wed, 14 Sep 2016 22:11:50 +0200 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <57D9AD2D.8060600@egenix.com> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> <20160911140029.4531b408@ghostwheel> <57D9A1CA.5060802@egenix.com> <20160914215528.24d35ba7@ghostwheel> <57D9AD2D.8060600@egenix.com> Message-ID: <20160914221150.5398b8bd@ghostwheel> As Nicholas already mentioned, this module works also as a standalone command line tool. On Wed, 14 Sep 2016 22:03:57 +0200 "M.-A. Lemburg" wrote: > On 14.09.2016 21:55, Radomir Dopieralski wrote: > > It just uses normal python commands, such as open(), file.read(), > > file.write(), os.listdir() and so on, but executes them over the > > REPL console. You can see exactly what it does here: > > https://github.com/ntoll/mu/blob/master/mu/contrib/microfs.py > > Great, thanks. > > I think this would make an excellent addition to the uflash > tool - for those of us who prefer emacs over mu ;-) > > > > > On Wed, 14 Sep 2016 21:15:22 +0200 > > "M.-A. Lemburg" wrote: > > > >> On 11.09.2016 14:00, Radomir Dopieralski wrote: > >>> > >>> Not quite. > >>> > >>> It doesn't matter how you upload your main script -- you can use > >>> uFlash or Mu or the online editor, or even prepare the hex file > >>> yourself by hand. The thing is, that the hex file can contain only > >>> one python file in it. > >>> > >>> However, there is also internal filesystem on the micro:bit, where > >>> you can put additional files to be imported by your main script. > >>> The most convenient way to access that filesystem and upload your > >>> files is by using the latest version of the Mu editor. Of course, > >>> you could as well just write a program that creates the file and > >>> writes its contents, but that is a little roundabout way of doing > >>> it. > >>> > >>> I hope this helps. > >> > >> Is the functionality needed for uploading modules to the > >> MB documented somewhere ? (A pointer to the right place > >> in the Mu editor code would already help :-)) > >> > >> Background: I've been looking for something like a few months > >> ago and back then, there was no filesystem module import for > >> the MB. > >> > >> Thanks. > >> > >>> On Sun, 11 Sep 2016 12:47:20 +0100 > >>> "hot.toast via Microbit" wrote: > >>> > >>>> So as i understand it, > >>>> > >>>> 1. uFlash is limited to python scripts that contain all the > >>>> local function and class definitions. The only imports that are > >>>> allowed are those from the microbit version of micropython. > >>>> > >>>> 2. If I want to import "mymodule.py" from a file on my local > >>>> hard drive, I will have to use the latest version of the mu > >>>> editor... > >>>> > >>>> On 11/09/16 12:19, David Whale wrote: > >>>>> Make sure you use the most up to date version of Mu though to do > >>>>> this, as it was a feature that was added reasonably recently. > >>>>> The version of Mu in the Raspberry Pi repo's is still out of > >>>>> date at the moment, and might not have this feature included > >>>>> yet. > >>> > >>> > >> > > > > > > > -- Radomir Dopieralski -- Radomir Dopieralski From ntoll at ntoll.org Wed Sep 14 18:13:43 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 14 Sep 2016 23:13:43 +0100 Subject: [Microbit-Python] importing modules using uflash In-Reply-To: <20160914221150.5398b8bd@ghostwheel> References: <20160911122743.2ec55d15@ghostwheel> <61bc2f45-18fa-e560-ab8e-0f0d334769e3@yahoo.co.uk> <20160911140029.4531b408@ghostwheel> <57D9A1CA.5060802@egenix.com> <20160914215528.24d35ba7@ghostwheel> <57D9AD2D.8060600@egenix.com> <20160914221150.5398b8bd@ghostwheel> Message-ID: Here: http://microfs.readthedocs.io/en/latest/ In general I'm heading towards de-coupling Mu from Qt by building useful functionality in modules like uflash and microfs that Mu sits on top of. Hope this helps and see you all at PyCon UK this weekend... :-) N. On 14/09/16 21:11, Radomir Dopieralski wrote: > As Nicholas already mentioned, this module works also as a standalone > command line tool. > > On Wed, 14 Sep 2016 22:03:57 +0200 > "M.-A. Lemburg" wrote: > >> On 14.09.2016 21:55, Radomir Dopieralski wrote: >>> It just uses normal python commands, such as open(), file.read(), >>> file.write(), os.listdir() and so on, but executes them over the >>> REPL console. You can see exactly what it does here: >>> https://github.com/ntoll/mu/blob/master/mu/contrib/microfs.py >> >> Great, thanks. >> >> I think this would make an excellent addition to the uflash >> tool - for those of us who prefer emacs over mu ;-) >> >> >> >>> On Wed, 14 Sep 2016 21:15:22 +0200 >>> "M.-A. Lemburg" wrote: >>> >>>> On 11.09.2016 14:00, Radomir Dopieralski wrote: >>>>> >>>>> Not quite. >>>>> >>>>> It doesn't matter how you upload your main script -- you can use >>>>> uFlash or Mu or the online editor, or even prepare the hex file >>>>> yourself by hand. The thing is, that the hex file can contain only >>>>> one python file in it. >>>>> >>>>> However, there is also internal filesystem on the micro:bit, where >>>>> you can put additional files to be imported by your main script. >>>>> The most convenient way to access that filesystem and upload your >>>>> files is by using the latest version of the Mu editor. Of course, >>>>> you could as well just write a program that creates the file and >>>>> writes its contents, but that is a little roundabout way of doing >>>>> it. >>>>> >>>>> I hope this helps. >>>> >>>> Is the functionality needed for uploading modules to the >>>> MB documented somewhere ? (A pointer to the right place >>>> in the Mu editor code would already help :-)) >>>> >>>> Background: I've been looking for something like a few months >>>> ago and back then, there was no filesystem module import for >>>> the MB. >>>> >>>> Thanks. >>>> >>>>> On Sun, 11 Sep 2016 12:47:20 +0100 >>>>> "hot.toast via Microbit" wrote: >>>>> >>>>>> So as i understand it, >>>>>> >>>>>> 1. uFlash is limited to python scripts that contain all the >>>>>> local function and class definitions. The only imports that are >>>>>> allowed are those from the microbit version of micropython. >>>>>> >>>>>> 2. If I want to import "mymodule.py" from a file on my local >>>>>> hard drive, I will have to use the latest version of the mu >>>>>> editor... >>>>>> >>>>>> On 11/09/16 12:19, David Whale wrote: >>>>>>> Make sure you use the most up to date version of Mu though to do >>>>>>> this, as it was a feature that was added reasonably recently. >>>>>>> The version of Mu in the Raspberry Pi repo's is still out of >>>>>>> date at the moment, and might not have this feature included >>>>>>> yet. >>>>> >>>>> >>>> >>> >>> >>> >> > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From jj at gioorgi.com Thu Sep 15 04:34:33 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Thu, 15 Sep 2016 10:34:33 +0200 Subject: [Microbit-Python] Adding an extra C module to microbit: howto? In-Reply-To: <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> References: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> Message-ID: <6e6c33de1f13d049962f2ea3d6082420@webmail.webfaction.com> Hi all, I'd like to try to add a new module to microbit micropython project. I have digged a bit on the source, looking how the audio module is defined. I only need only to touch the following files? source/microbit/mod.c inc/genhdr/qstrdefs.generated.h inc/microbit/mpconfigport.h inc/microbit/qstrdefsport.h Do you have a small guide on how to do it? I have also downloaded the official micropython project but I have no luck (perhaps I missed something...). -------------- next part -------------- An HTML attachment was scrubbed... URL: From microbit at sheep.art.pl Thu Sep 15 04:41:28 2016 From: microbit at sheep.art.pl (Radomir Dopieralski) Date: Thu, 15 Sep 2016 10:41:28 +0200 Subject: [Microbit-Python] Adding an extra C module to microbit: howto? In-Reply-To: <6e6c33de1f13d049962f2ea3d6082420@webmail.webfaction.com> References: <865b20760414c42ec7e261a78c21f498@webmail.webfaction.com> <39e8f564d99500b52ec516509d5d402a@webmail.webfaction.com> <6e6c33de1f13d049962f2ea3d6082420@webmail.webfaction.com> Message-ID: <20160915104128.18ca6cc5@ghostwheel> Hi Giovani, there isn't much documentation, the source files and the "sample" branches at https://github.com/dhylands/micropython/tree/c-sample2 are the best sources of knowledge so far. Because of that I started an unofficial developer documentation at http://micropython-dev-docs.rtfd.io/ and I have recently added a chapter about adding your own module -- maybe that will be helpful. If you see any mistakes or opportunity for improvement, or want to add something, don't hesitate to make a pull request. Note however, that this is about general micropython, and the micro:bit port may have some special cases. On Thu, 15 Sep 2016 10:34:33 +0200 Giovanni Giorgi wrote: > Hi all, > > I'd like to try to add a new module to microbit micropython project. > > I have digged a bit on the source, looking how the audio module is > defined. > > I only need only to touch the following files? > > source/microbit/mod.c > > inc/genhdr/qstrdefs.generated.h > > inc/microbit/mpconfigport.h > > inc/microbit/qstrdefsport.h > > Do you have a small guide on how to do it? > I have also downloaded the official micropython project but I have no > luck (perhaps I missed something...). -- Radomir Dopieralski -- Radomir Dopieralski From jj at gioorgi.com Sat Sep 17 02:50:32 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Sat, 17 Sep 2016 08:50:32 +0200 Subject: [Microbit-Python] Micro python: heap memory tuning Message-ID: Hi, I am playing with micropython microbit implementation. I have removed some modules from the compilation, thus reducing the final compiled hex I'd like to understand if I can extend the python heap space too. I found in mprun.c the following lines: .... mp_stack_set_limit(1800); // stack is 2k // allocate the heap statically in the bss static uint32_t heap[9692 / 4]; gc_init(heap, (uint8_t*)heap + sizeof(heap)); .... How can I compute the magic value 9692? For instance if I remove some static allocated code, how can I compute a new larger value? Also the dynamic heap allocation commented how below, is usable or it is a "bad idea"? .... /* // allocate the heap using system malloc extern void *malloc(int); void *mheap = malloc(2000); gc_init(mheap, (byte*)mheap + 2000); */ -- Giovanni Giorgi jj at gioorgi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.p.george at gmail.com Mon Sep 19 09:40:34 2016 From: damien.p.george at gmail.com (Damien George) Date: Mon, 19 Sep 2016 23:40:34 +1000 Subject: [Microbit-Python] Micro python: heap memory tuning In-Reply-To: References: Message-ID: You can try adjusting the 9692 value to get more heap. At some point you won't be able to link the final firmware because there's not enough RAM for the requested heap. The value that's there at the moment is almost the maximum you can use (unless you remove some other things that use bss/data). Using malloc to allocate the heap is not a good idea (there's a small mbed heap of about 2k but it's needed for the DAL, and hopefully one day we can reclaim this memory). On 17 September 2016 at 16:50, Giovanni Giorgi wrote: > Hi, > I am playing with micropython microbit implementation. > I have removed some modules from the compilation, thus reducing the final > compiled hex > I'd like to understand if I can extend the python heap space too. > I found in mprun.c the following lines: > .... > mp_stack_set_limit(1800); // stack is 2k > > // allocate the heap statically in the bss > static uint32_t heap[9692 / 4]; > gc_init(heap, (uint8_t*)heap + sizeof(heap)); > .... > > How can I compute the magic value 9692? > For instance if I remove some static allocated code, how can I compute a new > larger value? > Also the dynamic heap allocation commented how below, is usable or it is a > "bad idea"? > .... > /* > // allocate the heap using system malloc > extern void *malloc(int); > void *mheap = malloc(2000); > gc_init(mheap, (byte*)mheap + 2000); > */ > > > -- > Giovanni Giorgi > jj at gioorgi.com > > > > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From owen.ibberson at gmail.com Wed Sep 21 12:45:26 2016 From: owen.ibberson at gmail.com (geniusatwork Games) Date: Wed, 21 Sep 2016 17:45:26 +0100 Subject: [Microbit-Python] how to link the microbit to real python Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Thu Sep 22 08:57:18 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 22 Sep 2016 13:57:18 +0100 Subject: [Microbit-Python] how to link the microbit to real python In-Reply-To: References: Message-ID: <89c10e6f-6cfd-b2cb-c620-5a9759e22b10@ntoll.org> On 21/09/16 17:45, geniusatwork Games wrote: > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > Hi Owen, Please subscribe to the mailing list before posting (see the URL referenced above for how to do this)! Also, did your client cut off the body of the email. We only saw the rather opaque subject. 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 jj at gioorgi.com Sat Sep 24 08:12:56 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Sat, 24 Sep 2016 14:12:56 +0200 Subject: [Microbit-Python] How to exclude some modules and how to supped up build? Message-ID: <3AF29F61-1FAA-4C78-BAD5-D1D79F93EA04@gioorgi.com> Hi, I am playing with micro: bit micropython source code: https://github.com/bbcmicrobit/micropython I have found a bit difficult to exclude module from the build. Even if I do not expose them in the inc/microbit/mpconfigport.h (editing the MICROPY_PORT_BUILTIN_MODULES macro) they seems get linked in the final executable. For instance I have evidence the music callback function microbit_music_tick get linked even if I exclude the modmusic module from the MICROPY_PORT_BUILTIN_MODULES. I have to define a macro to exclude module code from the build, but this is quite ugly because I need to put a lot of if-define in a lot of file. I feel it is as a dark side path :( There is a better way of doing it? Also, the "yt build" re-build every time the entire source tree (200+ file). There is a faster way to simply check my C++ module syntax? Thank you! -- Giovanni Giorgi jj at gioorgi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at groklearning.com Mon Sep 26 05:22:05 2016 From: jim at groklearning.com (Jim Mussared) Date: Mon, 26 Sep 2016 19:22:05 +1000 Subject: [Microbit-Python] How to exclude some modules and how to supped up build? In-Reply-To: <3AF29F61-1FAA-4C78-BAD5-D1D79F93EA04@gioorgi.com> References: <3AF29F61-1FAA-4C78-BAD5-D1D79F93EA04@gioorgi.com> Message-ID: On 24 September 2016 at 22:12, Giovanni Giorgi wrote: > Hi, > I am playing with micro: bit micropython source code: > https://github.com/bbcmicrobit/micropython > > I have found a bit difficult to exclude module from the build. > Even if I do not expose them in the inc/microbit/mpconfigport.h > (editing the MICROPY_PORT_BUILTIN_MODULES macro) > they seems get linked in the final executable. > > For instance I have evidence the music callback function microbit_music_tick > get linked even if I exclude the modmusic module from the > MICROPY_PORT_BUILTIN_MODULES. This function will get linked regardless because it is invoked directly from main.cpp (in the microbit_ticker function). In general though, removing the module from the list in MICROPY_PORT_BUILTIN_MODULES works. e.g. $ /usr/bin/arm-none-eabi-nm build/bbc-microbit-classic-gcc-nosd/source/microbit-micropython | grep neopixel 00022d14 T neopixel_clear 000028e8 t neopixel_clear_ 00004568 T neopixel_init 000029a8 t neopixel_make_new 0002b340 T neopixel_module 00022d3a T neopixel_set_color 000045b4 T neopixel_show 000028d8 t neopixel_show_ 000028f8 t neopixel_subscr 0002b34c T neopixel_type 000229a8 t neopixel_unary_op 0002b2e8 t _ZL17neopixel_show_obj 0002b2f4 t _ZL18neopixel_clear_obj 0002b300 t _ZL20neopixel_locals_dict 0002b310 t _ZL23neopixel_module_globals 0002b320 t _ZL26neopixel_locals_dict_table 0002b330 t _ZL29neopixel_module_globals_table Then if I remove the neopixel module from the list: $ /usr/bin/arm-none-eabi-nm build/bbc-microbit-classic-gcc-nosd/source/microbit-micropython | grep neopixel (nothing) > > I have to define a macro to exclude module code from the build, but this is > quite ugly because I need to put a lot of > if-define in a lot of file. I feel it is as a dark side path :( > > There is a better way of doing it? > > > Also, the "yt build" re-build every time the entire source tree (200+ file). > There is a faster way to simply check my C++ module syntax? Just run the ninja build directly: $ ninja -C build/bbc-microbit-classic-gcc-nosd 'yotta build' runs cmake to generate the ninja script, then invokes ninja. You'll need to run 'yotta build' if you make changes to the build (like adding/removing files), but for file changes just running ninja directly is fine. > > Thank you! > > -- > Giovanni Giorgi > jj at gioorgi.com > > > > > > > > _______________________________________________ > Microbit mailing list > Microbit at python.org > https://mail.python.org/mailman/listinfo/microbit > From jj at gioorgi.com Wed Sep 28 16:31:51 2016 From: jj at gioorgi.com (Giovanni Giorgi) Date: Wed, 28 Sep 2016 22:31:51 +0200 Subject: [Microbit-Python] How to exclude some modules and how to supped up build? In-Reply-To: References: <3AF29F61-1FAA-4C78-BAD5-D1D79F93EA04@gioorgi.com> Message-ID: Thank you: you changed my life because now the build is very speedy. About the build: I have found some functions are linked in the help_table_instances, so you are unable to unlink them if you do not comment out the entry inside source/microbit/help.c For neopixel works because it has no entry in help_table_instances. I was forced to add some #if...#endif code to "cut out" modules. Thank you very much anyway! On 26/set/2016, at 11:22, Jim Mussared via Microbit wrote: > ninja -C build/bbc-microbit-classic-gcc-nosd -- Giovanni Giorgi jj at gioorgi.com