• Non ci sono risultati.

Pr og ra m m in g la ng ua ge s & C om pi le rs

N/A
N/A
Protected

Academic year: 2022

Condividi "Pr og ra m m in g la ng ua ge s & C om pi le rs"

Copied!
1
0
0

Testo completo

(1)

Cooperation with: G. Marcianó, S. Siega SchoolNetROBOTICA [email protected] [email protected]

U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n P ri m a ry S ch o o ls P ri m a ry S ch o o ls P ri m a ry S ch o o ls P ri m a ry S ch o o ls is is is is C o n cr e te C o n cr e te C o n cr e te C o n cr e te P ro g ra m m in g P ro g ra m m in g P ro g ra m m in g P ro g ra m m in g

U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n U s in g S m a ll R o b o ts i n P ri m a ry S ch o o ls P ri m a ry S ch o o ls P ri m a ry S ch o o ls P ri m a ry S ch o o ls is is is is C o n cr e te C o n cr e te C o n cr e te C o n cr e te P ro g ra m m in g P ro g ra m m in g P ro g ra m m in g P ro g ra m m in g

G . B a r b a r a D e m o D ip a rt im e n to I N F O R M A T IC A U n iv e rs it y T O R IN O – IT A L Y

[email protected]

U ni ve rs it y ac ti vi ty c on ce rn s te ch no lo gy :



Pr og ra m m in g la ng ua ge s & C om pi le rs



A n in te gr at ed d ev el op m en t en vi ro nm en t, it s w in d ow i s sh ow n h er e at t h e ri gh t b ot to m



C om m un it y of p ra ct ic e fo r te ac h er s an d p up ils

G. B. Demo, G.Marcianó,Contributing to the Development of Linguistic and Logical Abilities through Robotics, EUROLOGO 2007, Bratislava In primary schools robot programming is fun and represents an excellent tool both for introducing to ICT and for helping the development of logical and linguistic abilitiesof schoolchildren. Core of our project is NQCBaby, an Italian version of a Logo-like interface to NQC, so that children used to deal with the Turtle can transfer and adapt their Logo abilities to robots, also discussing the differences. NQCBaby is thougth for RCX but extendible to other small robots. In the meanwhile children are also introduced to NQC, the “real”robot language, by looking at how their descriptions of robot behaviors are translated into NQC “in order to be understood by robots”. NQCBabyis child-oriented rather than robot-oriented like NQC language.

---NQCBabyexample // in schools it is Italian-based HiRobby sensor3_light speed(5) repeatalways if_light forward(20) end if_dark left(100) right(random(200)) end end thanks bye Reports and software toolsare downloadableat: //www.di.unito.it/~barbara/MicRobot //i-teach.educ.di.unito.it/course/view.php?id=89Thanks to the students who designed and implemented current version software tools: D.Carbone, D. De Milato, M. Passet

S co o lc h il d re n : 1 . a ss e m b le th e ro b o t b y m a n ip u la ti n g h ar d w a re co m p o n en ts i. e. m o to rs a n d se n so rs 2 . p la n a n d d ra w p at h s fo r th e r o b o t 3 . w a lk th e p a th , fi n d c o m p o n en t se g m en ts , es ti m a te m ea su r es b y t h ei r h a n d s, t h ei r fe et , st ep s 4 . w ri te th e co d e q u it e n a tu ra ll y i f a ch il d re n o ri en te d l a n g u a g e is p ro v id ed 5 . v er if y ( d if fe r en t v er si o n s o f ) th e co d e b y w a lk in g si d e b y s id e w it h t h ei r m o v in g ro b o ts

In our project with schools, robot programming activities are NOT playful breaks or labs, rather a support for the standard subjects in primary school curricula, i.e. for children from 5-6 years old: cross-disciplinary activities Final goal is to develop activities covering from 5-6 to 15-16 years old pupils different types of robots used for the different ages with the same evolving language mostly Lego RCX and NXT, at prewriting age BeeBot with buttons commands.

S m a ll r o b o ts a re s im p le c o m p u te rs t h a t ca n m o v e a u to n o m o u sl y ch il d re n e x p er ie n ce a t an g ib le p ro g ra m m in g a ct iv it y b y m ak in g a ro b o t m o v e U si n g s m a ll r o b o ts i n p ri m a ry s ch o o l g iv es p u p il s co n cr et e y et f u ll p ro g ra m m in g e x p e ri en c es a t th e a g e o f P ia g et ’s co n cr et e o p er a ti o n a l st a g e o f co g n it iv e d ev el o p m en t  p ro v id ed t h e la n g u a g e is c h il d re n -o ri en te d

---usingNQC language task main() { SetSensor(SENSOR_3, SENSOR_LIGHT); SetPower(OUT_A+OUT_C, 5); while(true) { if (SENSOR_3 > 48) {OnFwd(OUT_A+OUT_C); Wait(20); Off(OUT_A+OUT_C); } if (SENSOR_3 <= 48){OnFwd(OUT_C); OnRev(OUT_A); Wait(100); OnFwd(OUT_A); OnRev(OUT_C); Wait( ); } Off(OUT_A+OUT_C); } Off(OUT_A+OUT_C) ; }

O u r N Q C B a b y L a n g u a g e i s te x tu al , It al ia -b as ed , L o g o -l ik e, t ra n sl at ed in to N Q C , a co m m o n ly u se d s m al l ro b o t p ro g ra m m in g l a n g u a g e. A s a n e x a m p le , h er e

follows the code for the FLOOR SWEEPER ROBOTbehavior, bothin NQCBaby and in NQC:

B y m ea n s o f a ct iv it ie s w it h s m al l ro b o ts , ch il d re n p h y si c al ly d e al w it h t h e b as ic b lo ck s o f al g o ri th m s: s eq u en c e, s el e ct io n a n d i te ra ti o n , an d l ea rn h o w t o s p ec if y th e m : th e y d o c o n c re te p ro g ra m m in g . S ch o o lc h il d re n a re t h u s in tr o d u c ed t o a so li d p ro g ra m m in g c o m p et en c e .

NQCBaby level

children write code here Here codetranslation appearspossiblecodeerrorsare listed here

1Robbi 2sensore1_tocco 3ripetisempre 4avanti(10) 5se_tocca 6indietro100) 7destra(100) 8fine 9fine 10grazieCiao commands Line 6:( is missing

red marksare for path already covered

In s ch oo l- ye ar 2 0 0 7 -2 0 0 8 u se d i n ab ou t 2 5 cl as se s in P ie m on te r eg io n.

Riferimenti

Documenti correlati

 15 Reinseriamo le viti rimosse al passo precedente, dopo aver fatto passare il cavo del servo nelle fascette come mostrato nell’immagine..  16 Raggruppiamo i cavi dei servo

Viene infine mostrato come tali tecniche possano essere utilizzate sia per l’analisi della variazione delle dimensioni delle cavità al variare delle condizioni di flusso, sia per

I vettori possono essere virali o non virali, anche se ad oggi questi ultimi hanno un impiego maggiore; i virus infatti si sono evoluti per milioni di anni

Recentemente, ad Alta è stato sviluppato un modello di ordine ridotto per la progettazione preliminare e la stima delle prestazioni non cavitanti per induttori a mozzo

GIORGIO PRADELLA (chitarra e voce) fondatore e leader del gruppo, musicista la cui formazione trova radici profonde nella musica blues, solista delicato e di

La prospettiva del tributarista: D ISCIPLINA DELL ’ OBBLIGAZIONE TRIBUTARIA IN RAFFRONTO CON LA DISCIPLINA DELLE OBBLIGAZIONI DI DIRITTO PRIVATO.. S TEFANO

Conferenza presso la Sala del Refettorio Palazzo San Macuto ore 10:30 Mostra Fotografica presso Galleria Alberto Sordi 10:00-20:00 PROGRAMMA. 10:30 Saluti

[r]