□shake microbit to control game
game rule:
By shaking microbit , the sailfish will fly straight ahead.
If sailfish collide with bubble, you get three scores.
On the contrary , if sailfish collide with jellyfish, you lose one
score.
One game,you have 180 seconds to get scores ,if there is no time the hero ranks
will appear .
□download and install python27
This course,yauger will install python27 in windows for example
First, let we download python27
https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
If the link disappear, you can search it in the internet.
Install python27
take notice
add python.exe to path
□download and install Pyserial
PySerial is a library which provides support for serial connections over a variety of different devices.
We use it to connect microbit and personal computer.
Microbit send any data , personal computer can get the data by PySerial.
You can download it in this sitehttps://zh-tw.osdn.net/projects/sfnet_pyserial/downloads/pyserial/2.7/pyserial-2.7.win32.exe/
Take noticce:
I install pyserial-2.7.win32.exe. Pyserial has newer vesion, but this example,i use 2.7win32 version.
We use it to connect microbit and personal computer.
Microbit send any data , personal computer can get the data by PySerial.
You can download it in this sitehttps://zh-tw.osdn.net/projects/sfnet_pyserial/downloads/pyserial/2.7/pyserial-2.7.win32.exe/
Take noticce:
I install pyserial-2.7.win32.exe. Pyserial has newer vesion, but this example,i use 2.7win32 version.
沒有留言:
張貼留言