Final Project


The final assignment is a project of your own choosing. The goal of the project is to consolidate your knowledge of the key concepts covered in the CS107e course, and to do something creative with your Raspberry Pi. We hope you find the project a fun and satisfying way to put your new knowledge and skills into action and build something you are truly proud of!

Project schedule and deliverables

You have just under two weeks to complete the project. We will update this page with more scheduling details as the end of the quarter approaches.

Team formation and initial idea due 6pm Saturday October 24

Form a team of 1 to 3 people. We’ve observed that a 2-person team works out the best, so that is our recommendation. If you have a project in mind that would be better run as a solo effort or requires a team of 3, that’s ok too, but you may want to talk it through with us to understand the tradeoffs and challenges for the different arrangements.

Decide a general idea of what you would like to do for your project. The initial proposal should include:

Each project team has a budget of $20 per person for hardware. We will send each student a small sensor kit, something similar to this. If the sensors you need and are not encompassed by this kit, please let us know. Instead of sending you this kit, you can purchase your own parts and have them reimbursed.

The “default” project is a version of Flappy Bird called “Rappi Bird.” You control a bird moving through a randomly generated level by hitting a button. The project involves handling I/O (button presses), graphics, and learning how to import sprites (e.g., the picture of your bird) into your C program. Optional extensions will include music, better graphics, or whatever strikes your fancy. Our expectation is that the basic version it will be 8-10 hours of work per person for a two-person group. If you would like to do the default project, when you submit your project idea you can just say Rappi Bird or Default Project.

Submit your project idea and team on this Google form. We will create a shared repository for your team.

Grading

Our rubric for evaluating final projects considers two major areas and one bonus opportunity:

Additional resources

In addition to going further with the components you have already used in the course, you are welcome to explore additional hardware and software for your project. Here are some resources you may want to check into.

Suggestions and inspirations

The direction you take the project is open-ended. The best project is one that that you thought of yourself and that resonates with your interests.

It is fun to see what others have done and can help get your creative juices flowing. Check out our project gallery for highlights of past quarters – what a diverse array of clever projects we have seen!

There are makers worldwide sharing field reports about the cool things they have concocted. Some sites to check out:

Games

You have the start of a graphics and input library. Extend your graphics library to draw additional types of objects, and your input library to handle a game controller.

Some examples of input devices that you could use to control your game:

Once you have better input, you are all set to build a game. Build a simple game such as Pong or Tetris, or even better a game of your own design.

Another cool thing you can do is communicate with old game cartridges, since you can connect the pins on the cartridge to the GPIO pins on the Pi.

Music

We described how to generate notes on the Raspberry Pi. With that knowledge, you can

System components

Your project should be about building a working system that does something cool.

However, if you build some support infrastructure, then you can build a more impressive system. A good sub-project for a team member is to build a component of the system.

Analog input

Up to now, we have only read digital values using GPIO. The Raspberry Pi, unlike a microcontroller like an Arduino, cannot read analog values.

Many sensors are analog (photodetectors, potentiometers, temperature sensors, joysticks).

In order to read analog values, you will need to interface an analog to digital converter (ADC) to the Raspberry Pi. An example of an ADC is the MCP3008, which can be controlled from the PI using the Serial Peripheral Interface (SPI) protocol.

Write a program that reads analog inputs to produce an interesting result, such as a screen visualization or sound.

Network (Ambitious)

Build a simple network that allows multiple raspberry pis to communicate over a shared medium (only one Pi can transmit at a time). One way to do this is to connect TX and RX pins to a shared line.

It is also possible to communicate by other means. For example, you could use sound, light, or radio waves.

Finally, you’ve seen in class how “digital” lines aren’t purely digital. You could design your circuit to make bits as sharp as possible to see how fast you can transmit and receive. You might find that sending bits faster means you’ll have to send smaller packets, so optimize for overall data transfer, not just the bit rate.

GPU (Ambitious)

The raspberry pi has a very powerful GPU. In fact, the GPU is much faster than the CPU. The GPU assembly language is similar to, but different, than the CPU assembly language. It is possible to download code to the GPU using a mailbox, and then call that code. Learn about the GPU and build a library for programming the GPU.

Can you think of a computationally intensive task that could be off-loaded to the GPU? At the very least, you can clear your framebuffer faster!