![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
main.cpp@0:0dcf08db8d61, 2019-03-18 (annotated)
- Committer:
- adambakerwa
- Date:
- Mon Mar 18 09:34:47 2019 +0000
- Revision:
- 0:0dcf08db8d61
- Child:
- 1:a3cce487dffe
Initial Commit - simple test to make sure LCD is working. Time to get coding !!!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
adambakerwa | 0:0dcf08db8d61 | 1 | #include "mbed.h" |
adambakerwa | 0:0dcf08db8d61 | 2 | #include "Gamepad.h" |
adambakerwa | 0:0dcf08db8d61 | 3 | #include "N5110.h" |
adambakerwa | 0:0dcf08db8d61 | 4 | |
adambakerwa | 0:0dcf08db8d61 | 5 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
adambakerwa | 0:0dcf08db8d61 | 6 | Gamepad pad; |
adambakerwa | 0:0dcf08db8d61 | 7 | |
adambakerwa | 0:0dcf08db8d61 | 8 | int main() { |
adambakerwa | 0:0dcf08db8d61 | 9 | |
adambakerwa | 0:0dcf08db8d61 | 10 | int fps = 8; |
adambakerwa | 0:0dcf08db8d61 | 11 | |
adambakerwa | 0:0dcf08db8d61 | 12 | pad.init(); |
adambakerwa | 0:0dcf08db8d61 | 13 | lcd.init(); |
adambakerwa | 0:0dcf08db8d61 | 14 | |
adambakerwa | 0:0dcf08db8d61 | 15 | while(1) { |
adambakerwa | 0:0dcf08db8d61 | 16 | |
adambakerwa | 0:0dcf08db8d61 | 17 | lcd.clear(); |
adambakerwa | 0:0dcf08db8d61 | 18 | |
adambakerwa | 0:0dcf08db8d61 | 19 | lcd.drawLine(0,40,84,40,1); |
adambakerwa | 0:0dcf08db8d61 | 20 | |
adambakerwa | 0:0dcf08db8d61 | 21 | lcd.refresh(); |
adambakerwa | 0:0dcf08db8d61 | 22 | |
adambakerwa | 0:0dcf08db8d61 | 23 | wait(1.0f/fps); |
adambakerwa | 0:0dcf08db8d61 | 24 | |
adambakerwa | 0:0dcf08db8d61 | 25 | } |
adambakerwa | 0:0dcf08db8d61 | 26 | } |