23
A Racket-Based Robot to Teach First-Year Computer Science K.Androutsopoulos, N. Gorogiannis, M. Loomes, M. Margolis, G. Primiero, F. Raimondi, P. Varsani, N. Weldin, A.Zivanovic Department of Computer Science School of Science and Technology Middlesex University, London http://www.cs.mdx.ac.uk European Lisp Symposium 2014 (Middlesex University) ELS2014 1 / 23

A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

A Racket-Based Robotto Teach First-Year Computer Science

K.Androutsopoulos, N. Gorogiannis, M. Loomes, M. Margolis, G.Primiero, F. Raimondi, P. Varsani, N. Weldin, A.Zivanovic

Department of Computer ScienceSchool of Science and Technology

Middlesex University, Londonhttp://www.cs.mdx.ac.uk

European Lisp Symposium 2014(Middlesex University) ELS2014 1 / 23

Page 2: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 2 / 23

Page 3: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 3 / 23

Page 4: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

MIT CS 6.001

(Middlesex University) ELS2014 4 / 23

Page 5: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

MDX CSD 1000

(Middlesex University) ELS2014 5 / 23

Page 6: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 6 / 23

Page 7: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Computer Science at Middlesex University

New Computer Science programme for the academic year 2013/2014

Teach students how to become autonomous learners

Racket: solid mathematical background and language-independentprogramming skills

Real hardware: Arduino, Raspberry Pi, and the Robotic PlatoformMirto

Completely revised delivery and assessment methods:I no modules or coursesI activities run seamlessly across the projectsI Assessment through Student Observable Behaviours (SOBs).

(Middlesex University) ELS2014 7 / 23

Page 8: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Week structure

General Lecture: introduction to topic and related project;

Design Workshop: design skills in software or hardware, systemsengineering (UML), HCI, security;

Programming Workshop: exercises, master-classes, coachingsessions, restricted to Racket;

Physical Computing Workshop: from simple logic gates tomicrocontrollers (Arduino) and other specialist devices controlledthrough Racket;

Synoptic Workshop: 4 hours to investigate foundations, design,build, test and discuss projects.

(Middlesex University) ELS2014 8 / 23

Page 9: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 9 / 23

Page 10: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Three Projects

1 traffic light system

2 dungeon game

3 MIddlesex RoboTic PlatfOrm – MIRTO

(Middlesex University) ELS2014 10 / 23

Page 11: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

The Platform

Base platform:

I two HUB-ee wheels with motors and encoders(to measure actual rotation)

I front and rear castorsI two bump sensorsI an array of six infra-red sensorsI a rechargeable battery packI an Arduino microcontroller board

Top layer:

I a Raspberry Pi connected to the ArduinoI Linux with Racket (current version 5.93)I USB-WiFi adapter for SSH and networkI Additional: cameras, microphones and text to speech with speakers

(Middlesex University) ELS2014 11 / 23

Page 12: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

MIRTOlib

Library developed by the teaching team

Takes care of low-level serial communications

(send-sysex-int-msg #x7D 5 power)

Students deal only with high-level Racket programs

(define (setMotors speed1 speed2)

(setMotor 0 speed1)

(setMotor 1 speed2))

Students can read IR values with

(getIR 2)

(Middlesex University) ELS2014 12 / 23

Page 13: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 13 / 23

Page 14: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Line-following with PID

(define proportional (- error 2000))

;; Integral component: we reset to 0 when error is 0

(cond ( (= 0 proportional) (set! intError 0))

(else (set! intError (+ intError proportional)))

)

;; we assume dt constant, so this is just the difference

;; If derivative < 0, we moved to the left of the line

(define derivative (- proportional (- prevError 2000)))

(set! prevError error)

;; The correction is the sum of a proportional component,

;; integral component and a derivative component.

(define correction (+ (* Kp proportional)

(* Ki intError)

(* Kd derivative)) )

(cond

((> correction 0) ;;we are to the right

(setMotors PWR (- PWR correction)))

(else ;; we are to the left

(setMotors (+ PWR correction) PWR))

)

(Middlesex University) ELS2014 14 / 23

Page 15: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Others

Speech-recognition: PocketSphinx connected to Racket

Graphical Interface using X on Pi

Web-server running on Pi

Twitter controlled Robot

(Middlesex University) ELS2014 15 / 23

Page 16: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

1 The really (in)famous precedent

2 The context

3 Racket & Mirto

4 Applications

5 Assessment & Evaluation

(Middlesex University) ELS2014 16 / 23

Page 17: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

SOBs

1 Threshold level: essential to pass the year.

2 Typical level: expected for a good honours degree.

3 Excellent level: identifies outstanding achievements.

(Middlesex University) ELS2014 17 / 23

Page 18: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

SOBs Tool

Figure : Entering and searching SOBs(Middlesex University) ELS2014 18 / 23

Page 19: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

SOBs Tool

Figure : Student list with SOBs

(Middlesex University) ELS2014 19 / 23

Page 20: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

SOBs Tool

Figure : Observing a SOB for a student(Middlesex University) ELS2014 20 / 23

Page 21: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

SOBs Tool

Figure : Student view: position with respect to class

(Middlesex University) ELS2014 21 / 23

Page 22: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Evaluation & Conclusion

85% success rate

Average 90% attendance

All students have progressed beyond threshold SOBs

https://github.com/fraimondi/myrtle/

(software and design files)

(Middlesex University) ELS2014 22 / 23

Page 23: A Racket-Based Robot to Teach First-Year Computer Science · Real hardware: Arduino, Raspberry Pi, and the Robotic Platoform Mirto Completely revised delivery and assessment methods:

Conclusion

Thanks and feel free to come and see MIRTO!

(Middlesex University) ELS2014 23 / 23