Data Sheet
Core Spartan Documentation Modern Robotics, Inc
Version 3.0.3 Page 29
7. Serial Communication
The Spartan Controller supports serial communication on ports D0 (RX) and D1 (TX) and
they are used to communicate with other devices or to the computer via USB. The code
below is a method used to communicate between two Core Spartan Controllers. Please
refer to https://www.arduino.cc/en/Reference/Serial for more information and examples
about the Arduino Serial Library. Ports D0 and D1 should not have anything connected to
them while uploading code to the board as it can interfere with serial communications.
void setup(){
Serial.begin(9600);
}
void loop(){
for(int data=0; data<10; data++){
Serial.write(data);
}
while(Serial.available() != 0){
int val = Serial.read();
Serial.println(val);
}
}
void setup(){
Serial.begin(9600);
}
void loop(){
while(Serial.available() != 0){
int val = Serial.read();
Serial.println(val);
}
for(int data=0; data<10; data++){
Serial.write(data);
}
}










