11 Replies Latest reply on Mar 24, 2014 9:37 AM by RaAl_264636

    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[4]/P1[5], and output pins to P1[0]/P1[1]/P1[2]/P1[3] 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[4] is off and p1[5] is on, P1[0]/P1[1]P1[2]/P1[3] should be off/off/off/on