At most basic level you add to schematic the 3 LEDs, each with a series R, and
connect them to a port pin and Vcc (same power as chip is using). Something like this -
View attachment 134891
The above turns them on when port bit set to 0. You could connect them from port pin
to ground then writing a 1 to port pin would tunr them on.
Then your code flows essentially like this -
Read sensor
Use case statement or if statements test value for sensor and write
to port, for that bit,/led a "0" to turn on LED. Not you should use mask
operation so you do not disturb other bits used on port apart from the LED.
Then loop back to read sensor, over and over.
Regards, Dana.