![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
Diff: main.cpp
- Revision:
- 22:8218092c2e4b
- Parent:
- 21:f82573f3e40e
- Child:
- 23:4b1abf659467
--- a/main.cpp Wed Apr 10 11:39:11 2019 +0000 +++ b/main.cpp Wed Apr 10 15:21:33 2019 +0000 @@ -30,6 +30,8 @@ int r2 = 0; int d3 = 0; int d4 = 0; + int g = 0; + pad.init(); lcd.init(); @@ -92,18 +94,19 @@ d4 = runner.onVer2Check(move, pos); + g = runner.spikeHit(lcd, pos); + move = runner.onPlatform(lcd, move, d, r, l, d2, r2, l2, d3, d4); char buffer[14]; - sprintf(buffer,"%i %i %i %i" ,d, d2, d3, d4); + sprintf(buffer,"%i", g); lcd.printString(buffer,0,0); - char buffer1[14]; + /** char buffer1[14]; sprintf(buffer1,"%i %i %i %i %i",pos.vx, pos. vy, pos.vd, pos.vc, pos.vl); lcd.printString(buffer1,0,1); - - //sleep(); //sleep untill next refresh - + */ + lcd.refresh(); } else {