[Microbit-Python] Microbit-Python “Simon Says” Example for Kitronik Inventor’s Kit

Nicholas H.Tollervey ntoll at ntoll.org
Sun Feb 7 07:27:51 EST 2016


Hi Nevil,

Just a quick correction: it's Damien George who should be getting all
the thanks - he's the creator of MicroPython and has put in a huge
amount of work on this project.

Without Damien we wouldn't have Python on the micro:bit.

N.

On 07/02/16 12:19, Nevil Hunt wrote:
>  
> 
> Hi,
> 
>  
> 
> First of all I’d like to thank Nicholas for the Micro-Python initiative
> and Andrew Mulholland (who I met at the BETT show and who showed me how
> to get going with Microbit-Python). I am a STEM Ambassador and I’m
> working with one of the micro:bit partner companies, Kitronik, helping
> to get their resources ready for the roll out of the micro:bit into
> schools. In particular I’ve been helping get their “Inventor’s Kit”
> ready. The Inventor’s Kit allows the micro:bit to connect to a
> Breadboard then comes with various electronic components (switches,
> LEDs, buzzers, motors, pots, etc) to experiment with connecting
> electronics to the micro:bit. The booklet that comes with the Kit has 10
> experiments along with the code to drive them. Four use ‘Block’ and six
> use ‘Touch’ but our plan is to publish many more on the web site
> (www.kitronik.co.uk/microbit <http://www.kitronik.co.uk/microbit>) We
> would like some of these to use Java and some to use Python. As you
> might imagine, things are quite busy. I am now up and running with
> Microbit-Python but I have limited time to write the example code so I
> thought I’d see if anyone on this forum fancied having a go!
> 
>  
> 
> The first one we have in mind is a “Simon Says” game where the
> Breadboard is fitted with 4 push switches (A,B,C,D) and a buzzer (see
> attached). Using the 4 corner LEDs of the micro:bit as the A,B,C,D
> lights the game starts by illuminating one random corner of the display
> e.g. ‘B’ and playing the note ‘B’ on the buzzer via P0. The player then
> has match this by pressing switch ‘B’ which illuminates ‘B’ and plays
> the note ‘B’. The game then illuminates ‘B’ plus one more random corner,
> e.g. ‘D’ while playing note ‘D’ on the buzzer. The player then has match
> this by pressing switches ‘B’ and ‘D’ in sequence. The game continues by
> adding another random letter to the sequence, e.g. ‘B’ ‘D’ ‘A’ then ‘B’
> ‘D’ ‘A’ ‘B’ then ‘B’ ‘D’ ‘A’ ‘B’ ‘C’ etc with the score being the
> maximum length of sequence the player correctly repeats. The game ends
> when the player fails to match the sequence.
> 
>  
> 
> So if you fancy having a go, post me the code and I will try it out.
> Since you are unlikely to have an Inventor’s Kit you could try writing a
> simpler 2 switch version of the game using the ‘A’ and ‘B’ buttons on
> the micro:bit.
> 
>  
> 
> Regards,
> 
>  
> 
> Nevil Hunt
> 
> STEM Ambassador
> 
> 
> 
> _______________________________________________
> 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: <http://mail.python.org/pipermail/microbit/attachments/20160207/2a168a7b/attachment.sig>


More information about the Microbit mailing list