CS-212
Lab 5
Spring 2011

  1. Talk to me... The file PC_Comm.c once compiled and downloaded to your Arduino will allow your PC/Mac to talk to the Arduion via a VT100 emulator program and the USB cable. Familiarize your self with the program (i.e. understand what it is doing and why it is doing it). Create a Studio 4 project and compile, build and download the .hex file into the Arduino. Demonstrate the working program to the CA.
  2. Design for reuse Take the project you made for part 1 and copy it to a new project. Break up the program into 3 parts: PC_Comm.c , PC_Comm.h and Comm_Demo.c. Comm_Demo.c should be the main program and should #include PC_Comm.h. Add a queue of characters and use it to buffer the characters received from the PC until and "enter" character is received, once the "enter" character is received remove the characters from the received queue and send them back to the PC. Demonstrate this to the CA.
  3. Something Useful Create a new Studio 4 project. Using PC_Comm.c and PC_Comm.h and the stack and queue data structures (.c and .h) you made for Lab 3 redo part 1 of Lab 4 such that the user enters an infix expression to evaluate to the Arduino via the terminal emulator on the PC/Mac; the program on the Arduino should receive the expression and (using stacks and queues) evaluate it and send the result of the evaluation back to the terminal emulator. To simplify things only single digit numbers need be considered (extra credit if you implement multi-digit numbers).

    Create a lab5 directory on the class server using your FTP account and upload the source code of your files. Demonstrate all parts of the lab to your TA (or me if I'm in my office)