adoniaamir
Newbie level 3
- Joined
- May 27, 2015
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 28
1. Where to find out that where is the words specified for pin configuration on the Launchpad board.
Such as RED_LED, GREEN_LED. Is there any header file explaining the denotions?
2. Immediately, when the program is downloaded into the Launch Pad. The LEDS are not working, since I press the reset or bsl button which makes the leds blinks?
3. The LEDS are working in following manner: Can you tell why is it like that?
1. RED - 1 GREEN - 1
2. RED - 1 GREEN -0
3. RED - 0 GREEN -0
4. RED - 0 GREEN - 1
Such as RED_LED, GREEN_LED. Is there any header file explaining the denotions?
2. Immediately, when the program is downloaded into the Launch Pad. The LEDS are not working, since I press the reset or bsl button which makes the leds blinks?
3. The LEDS are working in following manner: Can you tell why is it like that?
1. RED - 1 GREEN - 1
2. RED - 1 GREEN -0
3. RED - 0 GREEN -0
4. RED - 0 GREEN - 1
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 //#define LED RED_LED void setup() { // put your setup code here, to run once: pinMode(GREEN_LED, OUTPUT); pinMode(RED_LED, OUTPUT); } void loop() { led1(); led2(); } void led1() { digitalWrite(RED_LED,HIGH); delay(1000); digitalWrite(GREEN_LED,LOW); delay(1000); } void led2() { digitalWrite(RED_LED,LOW); delay(1000); digitalWrite(GREEN_LED,HIGH); delay(1000); }
Last edited by a moderator: