State machine

Dependencies:   mbed Adafruit_GFX BioroboticsMotorControl MODSERIAL BioroboticsEMGFilter

Revision:
50:5d2176b93a65
Parent:
42:cafa56da9ed2
--- a/Screen.h	Mon Nov 05 05:59:14 2018 +0000
+++ b/Screen.h	Mon Nov 05 10:14:31 2018 +0000
@@ -14,7 +14,7 @@
 class Screen
 {
 private:
-    I2C i2c;
+    I2C i2c;                // Communicates to the OLED screen
     Adafruit_SSD1306_I2c oled;
 public:
     // The screen we use doesn't have a reset pin, but it needs one anyway.
@@ -23,7 +23,7 @@
         i2c(sda, scl),
         oled(i2c, reset) {
             
-        // according to the spec the max bitrate for the SSD1308 is 400 kbit/s
+        // According to the spec the max bitrate for the SSD1308 is 400 kbit/s
         i2c.frequency(400000);
 
         clear_display();
@@ -101,7 +101,7 @@
         int y_start = oled.height() - size_y;
         int y_end = y_start + size_y;
         
-        oled.fillRect(x_start, y_start, size_x, size_y, BLACK);
+        oled.fillRect(x_start, y_start, size_x, size_y, BLACK);     // Deletes triangle in order to make a new one
         
         if (is_right) {
             oled.fillTriangle(x_start, y_end, x_end, y_start + size_y/2, x_start, y_start, WHITE);