Table of Contents

Milestone 1

Overview

Before starting this milestone, find your team member. Pass off and report submission will be done as a team (not individually).

This milestone requires you to complete three tasks:

  1. Verify that you have one good transmitter and one good receiver board
  2. Submit a report describing your analog board experiments
  3. Implement a queue library module

Requirements

  1. You must have one working transmitter board.
  2. You must have one working receiver board.
  3. You must submit the report as described below.
  4. Your queue code must implement all of the functions listed in the queue.h file. For those of you unfamiliar with how to allocate memory in 'C', the queue_init() and queue_garbageCollect() functions are provided through a link below.
  5. Write your own queue code. Don't download code from the internet, it may have bugs in it. Also, since this queue module has extra functions that are not typically included in a queue implementation, things will just go faster and easier if you write the code yourselves.
  6. Your queue code must pass the provided queue_runTest() test.
  7. You must follow the same coding standards as was done for ECEN 330. Exception: clang-format is not required. Ignore any clang-format rules.

Resources

Videos

These videos provide guidance on the oscilloscope that you will use during the pass off of your receiver board.

Queue Coding Help

Source Code

Note that the following files are provided in your ecen390 project directory. The test code is used to check the correctness of your code.

You are expected to create and implement the following file. See the provided header file (.h) for a description of each function.


Specifications

Receiver Board

For this task, you must verify that you can receive a 20 mV RMS FFT signal from a gun excited with a 0 - 3.3V square wave when the two guns are separated by 40 feet. milestone1verifyanaloghardware.jpg

You will be using the gun mounted on the column. Save the raw data from the oscilloscope on a USB flash drive. You can then process the captured data with MATLAB to produce FFT plots for the report. The raw data needs to be collected with a sample rate of 100 ksamples/second.

Oscilloscope settings

You can verify the sample rate by reading the data into MATLAB and subtracting the time sample. The MATLAB code would be the following.

1/max(diff(t))

The MATLAB output should be 1E5.


Queue

You will need to implement a queue library module for your laser-tag system. Create a new file named queue.c in the lasertag directory. You should remember the basics of the queue data structure from some of your CS classes. A link under “Queue Coding Help” provides a quick review of queues. A link also explains the “circular buffer” implementation strategy for queues. You must implement your queue as a circular buffer.

The queue that you must implement will be just a little different than a typical queue. It must have the following properties:


Pass Off

Receiver Board

Show the following on the oscilloscope display:

Queue

Report

You will turn in one report for this Milestone, the report will describe your experiments with your receiver boards and contain the following:

  1. MATLAB plot (in frequency domain) of received data with hit for player 1 (frequency 1).
  2. MATLAB plot (in frequency domain) of received data with shooter blocked (without hit) for player 1 (frequency 1).
  3. Proper titles, etc.

Here is a sample report you can use as an example.