// wait 1/10 of a second = 100 ms
Serial.println("Finished reading the
if(c == 'p') // send 100 bytes of comma
separated data to PC
int temp = DATA_ADDRESS; // load starting
for(int i = 0; i < 100; i++)
❏ Compile and open the serial monitor.
❏ Send the g command and move the dial from zero to
180 degrees several times over 10 seconds.
❏ Send the p command.
❏ Verify that you get results similar to those shown in
❏ Now, highlight and copy the data. What? It didn't work
— bummer! You can't copy data from the Arduino serial
monitor. So, let's use a serial monitor type program you
can copy data from.
Lab 5: Send the Dial Data to the PC
As we just learned, the Arduino serial monitor doesn't
let us copy data. We will now learn to use a serial
terminal, Pu TTY.exe, that will let us not just copy data, but
load it to a log file on our PC.
■ FIGURE 14: Arduino serial port.
1 USB cable
Estimated time for this lab: 30 minutes
Check off when complete:
❏ Download Pu TTY.exe from:
■ FIGURE 12:
❏ Create a file to save our logged data. Open the
■ FIGURE 11: Dial data in the serial monitor.
Pu TTY desktop icon. ■ FIGURE 15: Pu TTY serial line.
❏ Drag the Pu TTY.exe file from your download directory
to your desktop, leaving the icon shown in Figure 12.
❏ Open Pu TTY as shown in Figure 13.
❏ Click on the 'Connection type:' radio button for serial,
then enter the COM# for your Arduino. You can find
this number by opening the Arduino menu Tools/Serial
port as shown in Figure 14.
■ FIGURE 13:
Pu TTY open
❏ Enter this COM# in the Serial line text box and enter
the baud rate in the Speed box as shown in Figure 15.
❏ Click on the Terminal Category and in the 'Line
discipline options,' click the 'Force on' radio buttons for
both 'Local echo' and 'Local line editing' as shown in
January 2015 59