This is an old revision of the document!
Milestone 1
Overview
This milestone requires you to complete three tasks: 1) find your team member, 2) implement test a queue, and 3) verify that you have a working receiver board.
Pass off and report submission will be done as a team (not individually)
Verify that you have one good transmitter and one good receiver board
Implement Test a queue software package on the ZYBO board
Queue Task Overview
You will need to implement test a queue data structure for your laser-tag system. You should remember the basics of the queue data structure from some of your CS classes. This web-page provides a quick review of queues. This web page explains the “circular buffer” implementation strategy for queues. You must implement your queue as a circular buffer.
The queue that you must implement test will be just a little different than a typical queue. It must have the following properties:
Using a special function, your queue must allow you to keep adding (pushing) new elements even after it is full. If the queue is full when you add an additional element, it must remove the oldest element and add the new one, making sure to keep the correct order of things in the queue. For example, let's say that your queue can contain 200 elements. If you add 400 elements to the queue, the queue should contain the last 200 elements that were added, in the same order that they were added. In other words, the queue will contain elements 201 through 400. When you remove an element from the queue, the elements should be removed in arrival order, e.g., element 201, followed by element 202, etc. You write a special function to do this: queue_overwritePush().
You must be able to read the contents in the queue without removing them or disturbing them. In other words, your queue must provide a function that can read elements in the queue by index. For example, let's assume that the name of the function is queue_readElementAt(&q, index) and that it takes two arguments (the address of the queue, and the index of the element to read). If index = 0, this will read the oldest element in the queue. Larger values of index will successively read data that arrived later. You must print out an error message if the index-value would access elements beyond what is currently stored in the queue.
Board & Queue Pass-Off
Matlab plot of received data with hit for player 1.
Matlab plot of received data with shooter blocked (without hit) for player 1.
Ensure that the queue_print() function prints out the contents of the queue in order, from oldest value to newest value.
Ensure that your queue code passes the provided queue_runTest().
Submit your code on learning-suite.
TA Pass-Off Notes for Queue Software
Ensure that the queue_print() function prints out the contents of the queue in order, from oldest value to newest value.
Ensure that the queue_runTest() function runs to its end and that all tests pass.
Receiver Board Task Overview
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.
These videos provide guidance on the oscilloscope that you will use during the pass-off of your receiver board.
-
-
You will be using the gun mounted on the column. In addition to saving the FFT plot for your report you also need to save the raw data. The raw data needs to be collected with a sample rate of 100 ksamples/second.
Oscilloscope settings
Horizontal scale: 50 ms/
Under the save menu select CSV
Under the save menu select settings set the number of samples to 50,000
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.
Report
You will turn in one report for this Milestone, the report will describe your experiments with your receiver boards and contain the following:
Matlab plot (in frequency domain) of received data with hit for player 1 (frequency 1),
Matlab plot (in frequency domain) of received data with shooter blocked (without hit) for player 1 (frequency 1).
Proper titles, etc.
Here is a sample report you can use as an example.
All Requirements for this Milestone
You must have one working transmitter board.
You must have one working receiver board.
You must submit the report as described directly above.
Your queue code must implement all of the functions listed in the queue.h file shown below. For those of you unfamiliar with how to allocate memory in 'C', I provided the queue_init() and queue_garbageCollect() functions below.
Write your own queue code. Don't download code from the internet, it tends to have bugs in it anyway. Also, because I have added functions that are not typically included in a queue data structure, things will just go faster and easier if you write the code yourselves.
Your queue code must pass the provided queue_runTest() test.
-
Implementing the Queue
All software is developed using the same setup as you used in ECEn 330. A main.c is provided in the lasertag directory that you can modify to call various test functions.