User Tools

Site Tools


notes:c4eng:fall2023:projects:ptb2

This is an old revision of the document!


PTB2

switch

The switch used has three connection pins.

  • Connect the central pin to 3.3V, using a 10 KΩ resistor in series
  • Connect one of the outer pins to a GPIO pin, using a 10 KΩ resistor in series
  • Connect the other outer pin to ground

button

multicolor LED

[ptb2] The multicolor LED should output the colors RED, GREEN, and BLUE. With that information , I would personally color code the buttons associated with the specific color desired when the button is pressed. Meaning have a RED button cap for when you want the multicolor LED to output RED, and so on for each color. This just makes it easier to test your code.

if-else

The if else statement essentially means that “ if this condition is true do the following thing, else do this thing instead”. If the condition inside the parentheses evaluates to true , the code inside the if block will execute.

notes/c4eng/fall2023/projects/ptb2.1698203999.txt.gz · Last modified: 2023/10/25 03:19 by acuno