Starting/stopping a loop when SW1 or SW2 is pressed | Cypress Semiconductor
Starting/stopping a loop when SW1 or SW2 is pressed
I am currently working on a board designed by a professor at my university using the microcontroller CY8C29466-24PXI, this board controls 12 motors (12 8bit PWMs), has 4 LEDs, 2 switches and 1 LCD display.
So far, using ¨PWMs I've made the robot walk on a straight line but without control, it begins walking as the board and the power source are both ON, so I need to use the two switches to start and stop the motion of the robot, and for that we thought to use one for each action, but I don't know how to integrate the button action to the Block diagram and the main.c code.
Also, I've assigned LED_1 and LED_2 to ports P1_2 and P1_3 respectively, but when i try to iniciate them from the main.c, they don't appear, I begin writting "LED_1_Start();" but the code helper does not show any LED connected.
Thanks beforehand to anyone that could help.