Legos, Java, Programming Assignments and CS1 - PowerPoint PPT Presentation

About This Presentation
Title:

Legos, Java, Programming Assignments and CS1

Description:

Could the model read and transmit values one at a time? ... Plus software to drive the model at an appropriate level of abstraction. ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 12
Provided by: DavidB250
Category:

less

Transcript and Presenter's Notes

Title: Legos, Java, Programming Assignments and CS1


1
Legos, Java, Programming Assignments and CS1
An assignment scenario
David J. Barnes The University of Kent at
Canterbury d.j.barnes_at_ukc.ac.uk http//www.cs.ukc.
ac.uk/djb/
2
Context
  • I use LEGO Mindstorms computer-controlled
    models as a motivational tool.
  • As additional material in my teaching.
  • As part of a promotional talk to prospective
    students.
  • With school children.
  • Paper in SIGCSE 2002 on pedagogical issues with
    their use for teaching Java.

3
Criteria for scenario selection
  • The scenario should be interesting.
  • Possibly grounded in the real-world.
  • Rich in possibilities for discussion.
  • Collateral learning is very important to me.
  • It should present design alternatives.
  • Software.
  • Legoware.

4
The Time-Team scenario
  • Caveat this is possibly not an original idea.
  • OO reuse ?
  • A scenario for using arrays.
  • The task is to map an area in some way.
  • Geophysical mapping by archaeologists.
  • Ground-surface mapping for navigation.
  • Mobile temperature mapping.

5
Constraints of the scenario
  • The data is to be visualised on a PC.
  • The amount of data to be gathered is too much to
    fit fully in the models limited memory.
  • Communication with the PC must be face-to-face.
  • The IR transmitter of the RCX must be directed to
    the IR tower of the PC.

6
Host PC
Tower
Area to be Mapped
7
Discussion
  • RCX to PC communication is not a problem
  • rcxcomm package from DTU.
  • Could the model read and transmit values one at a
    time?
  • How can the model store a collection of values to
    be sent as a group?
  • What sort of path should the model follow?

8
Discussion
  • How do we take regular readings?
  • What characteristics does the model need to
    provide values that are meaningful?
  • Others?

9
Implementation
  • Once the issues have been addressed, a particular
    model could be provided.
  • Plus software to drive the model at an
    appropriate level of abstraction.
  • This keeps the focus on array manipulation.
  • The host visualisation could also be provided a
    simple JFrame with a JPanel.

10
Extension ideas
  • Use a temperature sensor for temperature mapping.
  • Physical accuracy in the model is probably less
    of an issue.
  • Readings may take longer.
  • Since maps are often for the purpose of
    navigation, have the host instruct the model to
    go somewhere based on the map data.

11
Summary
  • Mindstorms models provide a valuable tool for
    creating credible real-world scenarios.
  • Appropriate scenarios can provide a rich source
    for discussion as well as a vehicle for use of
    particular language features.
Write a Comment
User Comments (0)
About PowerShow.com