Blinking LED example 1 questions | Cypress Semiconductor
Blinking LED example 1 questions
I followed the example for the blinking LED 1 video.I have a couple questions
1. I dont know th Vddio. Most importantly, i dont know how to search for it. I only know how to read component documentation.
2. I have an input pin called SW. What does SW_Read(); return; The datasheet says it returns "The current value for the pins in the component as a right justified number. " Well, what is it. When my switch is presse what number is that? Is there i can use a console log in the API to see it?
3. I tried to experiment with the code and use LED_Write();
It requires an input. I dont know what the input should be and i cannot understand from the datasheet. The datasheet says it should be a uint8 value. I tried LED_Write(1); but didn't work
I saw the previous examples, whre things worked. I used:
LED_Write( !LED_Read() ); The problem with this is i dont know what LED_Read(); returned exactly
LED_Write( SW_Read() ); Same thing here. I dont know what SW_Read(); returned
finally i tried:
state = SW1_Read();
CyDelay( 500 ); //500 milis
That didnt work either