Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Assessment guidance Homework Tasks

PCB Programming Challenges

1 Program Challenges

With our fully working board, we can now write some programs to make perform different tasks for us. Create each of the following programs (they get trickier as you go along), and save each one seperately.

Tasks

Program your PCB, so that it…

  • is a metronome. Every second, the LEDs flash on and off for 0.1s to help a pianist keep time while practicing.
  • is a disco light. The LEDs flash repeatedly in a pattern. Bonus marks if the pattern changes when the light level drops.
  • is a child's nightlight. The LEDs come on when it gets a bit darker than the room you're in.
  • is a Survival light. The PCB flashes out SOS in Morse code when the LDR is covered up.
  • is an automatic floodlight. The first LED illuminates when it gets a little darker than the room, the second LED as well when it gets darker still, and the third LED when it is very dark.
  • is a torch. The LEDs all come on when someone puts their finger on the LDR momentarily (this make the LDR appear to be read dark), and turns them off again when someone puts their finger on the LDR a second time (Like a tap/push switch).
  • is a toothbrush timer. When triggered by someone passing their hand over the LDR, use the LEDs to indicate to a child when two minutes have elapsed, to help them brush their teeth thoroughly.

Free choice

  • Create a scenario (like I did in the toothbrush task), and write a program for it.

2 Assessment Point

Assessment Point

  • Take (cropped) screenshots of your individual working programs, and write a few sentences describing how it works in a text document. Upload each picture and text document seperately.
  • On your customised program, explain the scenario briefly, and explain how the code works.
  • You can now put your favourite program on it, and take your PCB home. Well done!
  • Silver badge (First 3 programs)- Progress ladder, Green - With assistance, write programs to handle inputs in a PIC circuit
  • Gold Badge (Next 2 programs)- Progress ladder, Blue - Independently write PIC programs which handle both digital and analogue data.
  • Platinum Badge (Final 2 programs) - Progress ladder, Violet - Invent and refine appropriate PIC programs independently.

Return to homepage