Newcomer of Psoc4, should be a simple question | Cypress Semiconductor
Newcomer of Psoc4, should be a simple question
Hi, I am new to this development kit and I just want to start a simple project.
However I have some questions.
I just want to make a simple try with digital input and digitat output.
In the .cysch file I named 2 switches as input (Pin1,Pin2 ) and 4 LEDs as output (Po1, Po2, Po3, Po4)
I want to program that if different pattern of 2 switches are pressed, different pattern of LEDs light on.
I have set the input pins to P1/P1, and output pins to P1/P1/P1/P1 in the .cydwr file
However I don't know how to start on the .c file. I know I need to type in my "if" case but
how should I define the pins?
e.g. If p1 is off and p1 is on, P1/P1P1/P1 should be off/off/off/on