Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MicroWorlds Pro

.
19
stefane@sch.gr


Logo, MicroWorlds Pro,
Raspberry Pi, .
MicroWorlds Pro,
,
Raspberry Pi.
PiFace.
, ,
.
: Logo, MicroWorlds Pro, Raspberry Pi, PiFace, ,
Dos script, Unix shell script, Netcat, Python.

1.
MicroWorlds Pro
,
Logo ,
.

. ,
MicroWorlds Pro
,
. ,
, , .

Logo .

2. Logo
, MicroWorlds Pro,
,
(MicroWorlds) Logo
.

Conferrence on Informatics in Education 2013

, ,
, , ,
. ,
,
. MicroWorlds Pro

Logo ' .

3. MicroWorlds Pro

MicroWorlds Pro (MWPro) Windows


Logo ,
.
MWPro,
(text file). 1,
Logo, Radio_Control.mw2,
.
Windows
Radio_Control.mw2

Windows
Computer

From_MWPro.txt
Get_cmdline_and_Send.bat
cmdline.txt

Unix

Raspberry Pi
Computer

Driving_Cmnds
Receive_cmdline_and_Drive
car.py

1.

, Logo
:

5th CIE2013

) : -
, ,
( 2). 90 ( 90) rt
90 (right 90), .
,
scripting unix-shell python.
Logo ,
From_MWPro.txt ( 2).
Radio_Control.mw2
90
10

From_MWPro.txt

rt 90
fd 10

rt 90

fd 10

2. Logo
) : dos script Get_cmdline_and_Send.bat, ,
From_MWPro.txt
Logo ( 3).
, Netcat (nc)
, Raspberry Pi IP
. 2
From_MWPro.txt fd 10 (forward 10). 3
Raspberry Pi.
Get_cmdline_and_Send.bat


From_MWPro.txt


cmdline.txt
(fd 10)

cmdline.txt
IP 192.168.2.4 port 1234
[Raspberry Pi Computer]

3. dos script Get_cmdline_and_Send.bat

Conferrence on Informatics in Education 2013

) : Raspberry Pi, Netcat (nc)



(listening mode),
Driving_Cmnds ( 4). ,
Windows PC, Driving_Cmnds
Raspberry Pi.
) : unix shell script Receive_cmdline_and_Drive,
Driving_Cmnds ( 4).
, python script car.py
.
Receive_cmdline_and_Drive

port 1234,
Driving_Cmnds
.


Driving_Cmnds

script car.py

(fd 10)

&

4. shell script Receive_cmdline_and_Drive


) : python script car.py
. .
fd,
bk, rt lt (forward, backward, right left),
/ /
.
PiFace, .
,
,
/
/ ( 5). fd / bk,

10cm, rt / lt,
90 .

.

5th CIE2013

5
car.py


Logo
=fd;


Logo
=rt;



Logo

(1) PiFace



Logo

(2) PiFace

5. python script car.py

4.
,
(tactile switch) ( 1),
.
, 4 ,
( 2). ,
. ,
,
PiFace.

1. . 6
(SW1-SW6)

Conferrence on Informatics in Education 2013

2. ,
.. 4

5.

Raspberry Pi - PiFace - - ,
1
netcat ( Unix).
2 8 Windows - PCs -
, MWPro,
1 netcat ( Windows).
(terminal window)
shell script Receive_cmdline_and_Drive
Logo .
- PCs,
Dos, Dos script Get_cmdline_and_Send.bat xxx.yyy.zzz.www
xxx.yyy.zzz.www IP
- Rapsberry Pi. Radio_control.mw2
MWPro .
2-3 .

.
.

5th CIE2013


,

.
,
,

:
,
.

6.

MicroWorlds Pro, Logo
, . /,
Raspberry Pi,
. ,
,
,
Logo.

,
.

Logo
.
(~100 )
1.
1.

Raspberry Pi Model B
SD Memory card 4 GB
PiFace Digital Interface

( )
45
7~8
36
10~15

/ /
, ,
.

Conferrence on Informatics in Education 2013

7. -
Netcat
Netcat ( nc)
TCP/IP
.

(command line) dos unix
.
Dos / Unix shell script
Dos / Unix (command line),
, .
Raspberry Pi
, Raspberry Pi (
3),
, .
, .
SD
Debian Linux. Ethernet
.

3. Raspberry Pi
PiFace interface
PiFace ( 4) interface Raspberry Pi
,
,
.

5th CIE2013

4. PiFace interface Raspberry Pi


Python
python .
,
. , Raspberry Pi
PiFace.

Farnell
element14
(2013).
PiFace
Digital.
http://www.farnell.com/datasheets/1684425.pdf

Logo
Foundation
(2011).
What
is
Logo?
http://el.media.mit.edu/logo-foundation/logo/index.html

PiFace Digital (2013). Getting Started with PiFace Digital.


http://pifacedigital.wordpress.com/2013/01/30/174770794/
Python Software Foundation (2012). Python v2.6.8 documentation.
http://docs.python.org/release/2.6.8/
Raspberry Pi Foundation (2013). Raspberry Pi Model B.
http://www.raspberrypi.org/faqs
Wikipedia
(2013).
Raspberry
http://en.wikipedia.org/wiki/Raspberry_Pi

Pi.

. (2005). MicroWorlds Pro.


http://users.sch.gr/glezou/microworldspro/2005MICROWORLDS_2.htm

10
2013

Conferrence on Informatics in Education


Abstract

In this work is described the interconnection of the greek localized Logo programming
environment, MicroWorlds Pro, with the credit card sized computer Raspberry Pi, for the
control of an ordinary radio controlled vehicle. Within MicroWorlds Pro software, every
command of the language that is executed for the direction of a turtle in geometrical shape
design, is translated to the respective english one and is sent to the Raspberry Pi computer via
internet. In real time, the received command activates accordingly the switches of the PiFace.
Those, properly connected to the remote control switches, cause the movement of the vehicle
to the desired direction.
Keywords: Logo programming, MicroWorlds Pro, Raspberry Pi, PiFace, switch, Dos script,
Unix shell script, Netcat, Python.

You might also like