Professional Documents
Culture Documents
Προγραμματισμός οχήματαος με MicroWorlds Pro
Προγραμματισμός οχήματαος με 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
.
, ,
, , ,
. ,
,
. MicroWorlds Pro
Logo ' .
3. MicroWorlds Pro
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]
Driving_Cmnds
script car.py
(fd 10)
&
5th CIE2013
5
car.py
Logo
=fd;
Logo
=rt;
Logo
(1) PiFace
Logo
(2) PiFace
4.
,
(tactile switch) ( 1),
.
, 4 ,
( 2). ,
. ,
,
PiFace.
1. . 6
(SW1-SW6)
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
/ /
, ,
.
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
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
Pi.
10
2013
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.