Initial publish

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
17:69a85c909566
Parent:
14:e8de27c4d0d4
Child:
18:6becc9f9de5e
--- a/main/main.cpp	Mon Mar 18 21:26:12 2019 +0000
+++ b/main/main.cpp	Tue Mar 19 10:41:51 2019 +0000
@@ -22,6 +22,7 @@
 AnalogIn pot(PTB2);
 AnalogIn x_dir(PTB11);
 AnalogIn y_dir(PTB10);
+AnalogIn rand_y(PTB3);
 
 Menu menu;
 Game game;
@@ -33,7 +34,6 @@
 void pointer(int x, int y);
 void pointer_position(int menu_number);
 void ship_movement();
-
 //char line_buffer[MAX_LINE_LENGTH];
 
 
@@ -45,8 +45,11 @@
 int main(){
     lcd.init();
     gamepad.init();
+    //gamepad.leds_on();
+    gamepad.led(1,1.0);
     
     intro();
+    srand(rand_y * 1000000);                            //Makeing the generated y position for the enemy to be trully random.
     
     while(1){                                           //Waiting for the option "start game" to be selected and for the button B to be pressed
         lcd.clear();