This assignment is designed to teach modern programming skills in a way that is both engaging and authentic. The core philosophy rests on two pillars:
AI as a pair programmer and hardware debugging partner: We position AI not as a magic black box, but as a "pair programmer." This requires students to learn the crucial skill of prompt engineering—how to ask good questions to get good answers. It teaches them to be critical of AI-generated code and to use it as a starting point, not a final product.
Hardware-in-the-loop verification: The requirement to validate code with physical hardware is the cornerstone of the assignment's authenticity. An AI can write code, but it cannot build a circuit or verify that the code works in the real world. This forces students to understand, adapt, and debug the code, ensuring they are active participants in their learning.
After completing this assignment, students will be able to:
This assignment can be adapted, but a 3-week timeline is often effective. For a more structured approach, especially in introductory courses, you can use a series of milestone assignments to keep students on track.
Another way that you can adapt this assignment is to shrink the milestones into a two-week timeframe, depending on the level of students in the class and their prior familiarity with engineering and makerspaces.
Week 1: Introduction and setup
guide_to_ai_prompts.md.Week 2: Core development
Week 3: Finalizing and submission
Here are instructions that you can use about scaffolding the project with milestones:
Project milestone assignments are designed to help you make progress on your projects in a logical and gradual manner. Our class projects are complex open-ended challenges that will require continuous effort on your part. Trying to cram all the project work to the week before submission deadline will most likely lead to a significant amount of stress for you as well as an incomplete/incorrect final result. For this reason, I have created the project milestones as a guide for your progress.
By completing these assignments on time, you will make steady progress on your project and have a clear picture of how the week's topic relates to the bigger picture. Please notice that completing the project milestone for a given week does not mean you are done working on your project for that week. Instead, completing this assignment means you have reached a good point from which to explore different aspects of the project and develop your own solution to the challenges I have posed.
This week's milestone is the project proposal. Students should submit a PDF file that answers the following questions:
Goal and objectives:
- What is your personal goal for this project? Start by describing a general area that you would like to work on, for example, "I would like to build a circuit to measure sound levels and write Python code to do interesting things."
- Write one sentence about where your project can be applied in real life in the future (if developed further). Describe what your project's applications might be.
Approach:
- List all the components that you might need for this project. Spend around 10 minutes looking up your project on the internet and note down things.
- Write down the inputs and outputs of your project. Input can be anything physical or human interaction. Output can be anything in response that humans understand.
- What kind of data can you collect in your project? Fill out a table like this:
| Type of data | Quantity (how many instances are possible) | Is it possible to automate the data collection/analysis in this category? | Can you use publicly available data to support this category? |
|---|---|---|---|
| Input (for example, user inputs) | |||
| Processing variable (for example, voltage) | |||
| Output (for example, voltage or display) |
Challenges:
- What aspects of the project are unclear to you? (1-2 lines)
- Which parts of the project you might need the most help on? (1-2 lines)
Backup:
- Go through the ideas in the project_ideas.md document. What are your top 3 choices of projects to work on if the project you proposed above is not feasible for this class?
For this week's project milestone, the goal is to finalize the project idea and get started with the structure of how the user will interact with the project. The specific tasks are:
1. Download and install a code editor like VS Code.
2. Set up the editor to run Python 3 and install relevant extensions (e.g., Python and Pylance for VS Code).
3. Create a new Python file and write a print statement that describes the project idea in 2-3 sentences.
4. In the same Python file, write code for printing any user choices and code to accept user inputs.
5. End the Python file with some print statements on expected outputs of the program by using if-elif-else.
For this week's project milestone, the goal is to write a loop structure for the code to collect the data needed for the project. For example, if you need to collect data on voltages and currents of a solar cell, you would implement a loop to collect that data. If the project requires a circuit, this is the milestone where it should be planned.
The specific tasks that each submission must have:
1. Build up from the Python file for the previous milestone.
2. Design and implement the main loop in the project code. It could be as simple as asking a few questions until the user decides to stop, or more complicated to collect many different data points.
3. Show a picture of the circuit design (a rough schematic is fine). If the project does not involve building hardware, the student should show a rough flowchart of the project's data flow.
This project milestone is highly dependent on the individual project idea. Students should work towards their project goal and complete the hands-on part of their project (if any). If they do not have a hands-on component, they should curate data for their project by collecting it from the internet or other sources. With this milestone, they should finish all of these non-programming aspects. In terms of programming, they should do one or more of the following:
- Load project files (like CSVs or text files) in their code and use them appropriately.
- Generate a graph or other visualization.
"The AI's code doesn't work!"
Over-reliance on the AI:
Hardware/Wiring issues:
Vague prompts and frustration:
Refer to the assessment_rubric.md for detailed criteria. Key points for grading:
hardware_recommendations.md file and a list of 2-3 specific kits you recommend from online retailers. Often kits can be purchased for less than $20 (see below: department might agree to cover the budget).A key element to making this assignment successful is leveraging the support infrastructure available at many universities.
Makerspaces: University makerspaces are an invaluable resource. They provide access to tools (soldering irons, 3D printers, oscilloscopes), components, and knowledgeable staff. We highly recommend partnering with your local makerspace. Staff can help students with circuit debugging, component selection, and safe practices. This assignment can serve as a great introduction for students to the creative and supportive environment of a makerspace.
Near-Peer Mentors (Learning Assistants): For the hardware validation component, near-peer mentors can be incredibly effective. Hiring undergraduate students who have previously completed the course to act as Learning Assistants (LAs) or tutors for 2-3 hours per week provides a huge benefit. These LAs can hold office hours specifically for hardware help, work closely with the makerspace staff, and provide guidance that is more relatable to students than that from a professor. They bridge the gap and make the hardware aspect far less intimidating for beginners.