![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
app3
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
Fork of Code_APP1 by
header.h@5:1a60144f7163, 2017-01-16 (annotated)
- Committer:
- ericbisson
- Date:
- Mon Jan 16 20:52:12 2017 +0000
- Revision:
- 5:1a60144f7163
- Child:
- 6:2ec2a74c807f
reset cursor + moving average + separate SPI and UART code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ericbisson | 5:1a60144f7163 | 1 | /********************************/ |
ericbisson | 5:1a60144f7163 | 2 | // Configuration |
ericbisson | 5:1a60144f7163 | 3 | /********************************/ |
ericbisson | 5:1a60144f7163 | 4 | #define IS_USING_SPI true |
ericbisson | 5:1a60144f7163 | 5 | #define MOVING_AVG_SIZE 10 |
ericbisson | 5:1a60144f7163 | 6 | /********************************/ |
ericbisson | 5:1a60144f7163 | 7 | |
ericbisson | 5:1a60144f7163 | 8 | struct MovingAverage_t |
ericbisson | 5:1a60144f7163 | 9 | { |
ericbisson | 5:1a60144f7163 | 10 | int buffer[MOVING_AVG_SIZE]; |
ericbisson | 5:1a60144f7163 | 11 | char cursor; |
ericbisson | 5:1a60144f7163 | 12 | bool bFilled; |
ericbisson | 5:1a60144f7163 | 13 | }; |
ericbisson | 5:1a60144f7163 | 14 | MovingAverage_t MovingAverage = { |
ericbisson | 5:1a60144f7163 | 15 | {}, |
ericbisson | 5:1a60144f7163 | 16 | 0, |
ericbisson | 5:1a60144f7163 | 17 | false |
ericbisson | 5:1a60144f7163 | 18 | }; |
ericbisson | 5:1a60144f7163 | 19 | |
ericbisson | 5:1a60144f7163 | 20 | void write_to_7segment(char d1, char d2, char d3, char d4); |
ericbisson | 5:1a60144f7163 | 21 | int moyenne_mobile(int newData); |
ericbisson | 5:1a60144f7163 | 22 | void calculer_angle(char bufferAngle[], int accZ); |
ericbisson | 5:1a60144f7163 | 23 | void change_dots(char dot); |
ericbisson | 5:1a60144f7163 | 24 | void chip_select(bool bSet); |
ericbisson | 5:1a60144f7163 | 25 | void SetClockAndMode(int Speed, char Mode); |
ericbisson | 5:1a60144f7163 | 26 | void ResetCursor(); |