[ create a new paste ] login | about

Link: http://codepad.org/OiMRuC7J    [ raw code | output | fork ]

C++, pasted on Oct 30:
#include <M5StickC.h>

void setup() {
  M5.begin();
}

void loop() {
  M5.Axp.ScreenBreath(10);
  M5.Lcd.setRotation(1);
  M5.Lcd.setTextSize(3);
  M5.Lcd.fillScreen(BLACK);
  M5.update();

  int i = random (9);
  int j = random (9);
  int k = i + j + 2;
  while (M5.BtnA.wasPressed() != true) {
  M5.Lcd.setCursor(5, 5, 2);
  M5.Lcd.print(i + 1);
  M5.Lcd.print("+");
  M5.Lcd.print(j + 1);
  M5.Lcd.print("=");
  }
  M5.Lcd.setCursor(100, 5, 2);
  M5.Lcd.print(k);
  delay (1 * 1000);
  //    }
  //  }
}


Output:
1
2
3
4
Line 21: error: M5StickC.h: No such file or directory
In function 'void setup()':
Line 4: error: 'M5' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: