Data Sheet

Core Spartan Documentation Modern Robotics, Inc
Version 3.0.3 Page 16
5.1. Modern Robotics Header
The Modern Robotics Header is in every example published by Modern Robotics. At the top of
the header is the name of the file and the main sensors that are being used in the program.
Below that are two to three paragraphs are designed to be informative by explaining the sensor
use and a description of the expected behavior of the example. Should an example not perform
the way it is described in the example check that your wiring matches the “Connections”
section of the header.
Next is a list of connections to the Core Spartan Controller. In more complex examples the list
of connections contains more sensors, motors and servos.
Connections:
Left Optical Distance sensor (ODS) = Port A0
Right Optical Distance sensor (ODS) = Port A1
Program Control Button (PCB) = Port D2
Touch Sensor = Port D7
Left Motor = Motor Port M1 (- +)
Right Motor = Motor Port M0 (+ -)
At the bottom of the header is a statement that is found across all the examples. The first half
notes not to use pinMode()when using a Modern Robotics Sensor because the pinMode() is
being handled within the library. The second half of the statement states where to find more
language references and keyboard shortcuts to opening the serial monitor.
“NOTE* When using any Core sensor and its accompanying library, the pinMode() function
should never be used as some sensors change or hold the mode as input/output at certain times
to function correctly. All mode initializations are automatically done when the sensor
constructor is called. i.e. CORE_PCB(). IMPORTANT: PCB.delayedStart(); must be the first line in
setup() when PCB is being used as a start/stop button.
Core Spartan language reference can be found at http://modernroboticsinc.com/spartan
Arduino language reference can be found at http://arduino.cc/en/Reference/HomePage
Windows: USE SERIAL MONITOR -> Ctrl+Shift+M
Mac: USE SERIAL MONITOR -> Cmd+Shift+M”