Fall 2014 College Course

Instructors: Ellen Wetmore, Holly Yanco, Adam Norton
Contact Information: ellen_wetmore[at]uml.edu, holly[at]cs.uml.edu, anorton[at]cs.uml.edu
Location: UMass Lowell, North Campus
Age Level: College
Platform: Super Cricket

Welcome to the Fall 2014 college course Artbotics page (70.100 / 91.117). All associated class handouts, presentations, and code samples will be posted here.

Course Information

  • Class meets in Olsen 401, Tuesdays and Thursdays, 9:30am – 10:45am
  • Lab meets in Olsen 302, Tuesdays or Thursdays, 11:00am – 12:15pm
  • Syllabus
  • Course Schedule

Handouts, Guides, and Assignments

Presentations

Labs

Code Samples

Right click > Save As each of the following .lgo files. Open Cricket Logo, and File > Open each file to see the code.

Servo motor commands (manual movement)
This is an example of how to control a servo motor by manually typing every position you want it to move to. This is a fine method of using a servo motor, however, if you want much more finer grain movement you may want to use something like the next example.

Servo motor commands (global variable increase)
This example accomplishes a similar effect to the one above, except it uses a global variable named position to change the servo motor position progressively. The position increases by 5 each time, until the value reaches 255, at which point it turns the servo off, and then resets position to be 0 and starts the process over again.

When statement example (interrupt action with another action; use for attraction modes)
This is an example of how to use a when statement to interrupt another action. In this example, the servo plugged into port 1 will move whenever the distance sensor in port a reaches a value of 50 or greater. It interrupts the actions in the loop, and when completed, the actions in the loop resume. Try letting this program run and waving your hand in front of the sensor at any point during the program. You will notice the servo commands will be executed whenever you do this.

Ifelse statement example (do one action or another; not necessarily good for attraction modes)
This example uses an ifelse statement to perform one set of actions or another, depending on the sensor value. The difference between this and the when statement example is that this one will not interrupt the process if the sensor value changes. You will have to wait for the actions to complete before it checks the sensors value again. Try letting this program run and waving your hand in front of the sensor at any point during the program. You will notice the servo commands will only be executed if your hand is in front of the sensor in between light/motor port d and a turning on.

 

This entry was posted in College Programs, Programs, Super Cricket Programs. Bookmark the permalink.