Jim Cordwell
/
Segments_01_Simple
A stripped down simple seven segement example for RedBED
Diff: main.cpp
- Revision:
- 2:91808e29f193
- Parent:
- 1:1336ea4dd725
- Child:
- 3:6b50a41e54f3
diff -r 1336ea4dd725 -r 91808e29f193 main.cpp --- a/main.cpp Sat May 24 09:29:43 2014 +0000 +++ b/main.cpp Sat May 24 09:33:29 2014 +0000 @@ -30,7 +30,7 @@ DigitalOut seg_a(P1_23), seg_b(P1_28), seg_c(P0_16), seg_d(P1_31), seg_e(P1_13), seg_f(P1_16), seg_g(P1_19), seg_p(P0_23), com(P1_25); /****************************************************** -* Set each of the segments for a desired led * +* Set each of the segments for a desired LED * ******************************************************/ void SetSegments(uint8_t led, uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t p) { @@ -44,6 +44,7 @@ com = led; //Update it in a loop otherwise it's too fast + //and the display blurs across the LEDs for(uint8_t i = 0; i < 100; i++) { seg_a = 1 - a; //setting a segment to 1 means off