Student lab skeleton code to test color LCD, 4 pushbuttons, and speaker setup. Moves a robot image on 4G sys LCD.
Dependencies: 4DGL-uLCD-SE PinDetect mbed
Robot.h
00001 class Robot 00002 { 00003 public: 00004 void draw() { 00005 //needs code here 00006 } 00007 void erase() { 00008 //needs code here 00009 } 00010 void moveForward(int distance) { 00011 //needs code here 00012 } 00013 void moveBackward(int distance) { 00014 //needs code here 00015 } 00016 void moveLeft(int distance) { 00017 //needs code here 00018 } 00019 void moveRight(int distance) { 00020 //needs code here 00021 } 00022 //needs code to init x,y 00023 Robot() { 00024 } 00025 private: 00026 int xPosition; 00027 int yPosition; 00028 };
Generated on Wed Jul 27 2022 00:22:05 by
1.7.2