If you have an Arduino connected to a computer or a Raspberry Pi, and want to send data from the Arduino to the PC you can do the following:
Arduino:
void setup() {
// Opens serial port, sets data rate to 9600 bps:
Serial.begin(9600);
}
void loop() {
// Sends a line over serial:
Se...