Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 314B

12345678910111213141516171819
  1. #include "mbed.h"
  2. DigitalOut out(p5);
  3. #if defined(TARGET_LPC1114)
  4. AnalogIn in(p20);
  5. #else
  6. AnalogIn in(p19);
  7. #endif
  8. volatile float w, x, y, z;
  9. int main() {
  10. while(1) {
  11. z = x * y / w;
  12. printf("Hello World %d %f\n", out.read(), z);
  13. if(in > 0.5) {
  14. out = !out;
  15. }
  16. }
  17. }