Step 7Visual effects / Lighting
Display / Visual Feedback
It is nice to have visual feedback for things like ammunition and lives there are a few ways you could do this: the main being using LED’s or an LCD to display the information.
I chose to uses LED’s, and there is provision for using LED’s in the code provided.
The code varies two of the arduino’s PWM pins( ammoPin and lifePin) dependant on the ammunition and life.
The PWM pins can be used to power LEDs and the more life or ammo the player has the brighter the LEDs will be alternatively the PWM output can be used to drive an bar graph driver chip like the LM3914N
The PWM output can not be used to directly drive a bar graph driver chip, the PWM signal needs to be smoothed to give an analogue output, this can easily be done using an RC low pass filter.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|













































