The Wire-Mobile

No preview image

2 collaborators

Default-person Tracy Dobie (Author)
Default-person David Weintrop (Author)

Tags

(This model has yet to be categorized with any tags)
Model group ls426_w11 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 4.1.2 • Viewed 232 times • Downloaded 19 times • Run 2 times
Download the 'The Wire-Mobile' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model is a puzzle for the users to solve. Unlike most NetLogo models, in our model, the participants are the agents, as opposed to the turtles being the agents. The emergence in the model occurs off the computer screen when all agents (users) work together to make the car run.

HOW IT WORKS

Our model uses a car with an embedded GoGo board equipped with 7 sensors that interact with the computer. Each sensor has a different behavior that the participants must discover. There are also 4 turtles on the NetLogo display that serve as on-screen representations of the four outputs the GoGo board controls.

HOW TO USE IT

First, hook up the wire-mobile, turn on the GoGo board, click setup on the model, and click Wire-Mobile!!! Then, each particpant takes a sensor, and together they need to figure out how to make the car move.

THINGS TO NOTICE

The car only moves when all of the particpants work together; no one wheel is powerful enough to move the car on its own. Thus, the movement of the car truly is emergent.

THINGS TO TRY

Set a goal or challenge for participants moving the car. For example, you might create an obstacle course through which users have to maneuver the car, or pick an end point that the car has to reach. You might also time yourself and see how quickly you can get your car to finish a race. (Side note: Due to a limited number of outputs, our car only has three wheels; thus, it is difficult to turn. Adding a fourth wheel would allow users to increase the complexity of potential tasks.)

EXTENDING THE MODEL

There is one more sensor available on the board that can be used, so adding an eighth sensor is an option. Additionally, you could change the way in which the program reacts to input from the sensors and instead have the outputs correspond to the magnitude of the inputs.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

extensions [gogo]

globals [
  serial-port   ;; different on different operating systems
  counter
  front-direction-state
  back-direction-state
]

to setup
  set counter 0
  set back-direction-state 1023
  set front-direction-state 1023
  set serial-port user-one-of "Select a port:" gogo:ports
  gogo:open serial-port
  repeat 5
  [ if not gogo:ping
    [ user-message "The GoGo Board is not responding." ] ]
  
  ; setup onscreen representations of sensors
  create-turtles 4 ; one for each wheel and a fourt for the light
  ask turtles [set size 4]
  ask turtle 0 [setxy 0 800 set heading 0] ;front wheel
  ask turtle 1 [setxy -600 -600 set heading 0] ;back-left wheel
  ask turtle 2 [setxy 600 -600 set heading 0] ;back-right wheel
  ask turtle 3 [set heading 0 set color yellow - 2] ;light
end 

to wire-mobile
  set counter counter + 1
  show counter
 
 ;button sensor - controls back R wheel
  gogo:talk-to-output-ports ["a"]
  ifelse gogo:sensor 3 < 1000
    [ gogo:output-port-on 
      ask turtle 2 [fd 1] ]
    [ gogo:output-port-off ]
 
 ;pressure sensor - controls back L wheel   
  gogo:talk-to-output-ports ["b"]
  ifelse gogo:sensor 4 < 150
    [ gogo:output-port-on 
      ask turtle 1 [fd 1] ]
    [ gogo:output-port-off ]
  
 ;audio sensor - controls front wheel
  gogo:talk-to-output-ports ["d"]
  ifelse gogo:sensor 1 > 250
    [ gogo:output-port-on
      ask turtle 0 [fd 1] ]
    [ gogo:output-port-off ]
   
 ;depth sensor - beeps when approaching wall/object 
  if gogo:sensor 5 < 975
    [beep]
 
 ;light sensor - turns on light
  gogo:talk-to-output-ports ["c"]
  ifelse gogo:sensor 6 > 300
   [ gogo:output-port-on 
     ask turtle 3 [set color yellow] ]
    [ gogo:output-port-off 
      ask turtle 3 [set color yellow - 2] ]

;button sensor (red) - change direction of back wheels
  gogo:talk-to-output-ports ["a" "b"]
  if gogo:sensor 7 > 1000 and back-direction-state < 1000  
    [gogo:output-port-reverse
      ask turtle 1 [set heading heading + 180] 
      ask turtle 2 [set heading heading + 180] ]   
  set back-direction-state gogo:sensor 7
    
 ;button sensor (red) - change direction of front wheel
  gogo:talk-to-output-ports ["d"]
  if gogo:sensor 8 > 1000 and front-direction-state < 1000  
    [gogo:output-port-reverse
      ask turtle 0 [set heading heading + 180] ]    
  set front-direction-state gogo:sensor 8 
end  

There are 5 versions of this model.

Uploaded by When Description Download
Tracy Dobie about 13 years ago No description provided Download this version
David Weintrop about 13 years ago No description provided Download this version
David Weintrop about 13 years ago No description provided Download this version
David Weintrop about 13 years ago No description provided Download this version
David Weintrop about 13 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.