fork download
  1. char volatile one [ ] ="00000000.11111111.00000000";
  2. void setup()
  3. {
  4. DDRD = B00010000;
  5. for(int i = 0;i < 4;i++)
  6. {
  7. for(int i = 0; i < 27; i++)
  8. {
  9. if(one[i] == '1')
  10. {
  11. PORTD = B00010000;
  12. asm volatile (
  13. "nop \n\t"
  14. "nop \n\t"
  15. "nop \n\t"
  16. "nop \n\t"
  17. "nop \n\t"
  18. "nop \n\t"
  19. "nop \n\t"
  20. "nop \n\t"
  21. "nop \n\t"
  22. );
  23.  
  24. PORTD = B00000000;
  25. asm volatile (
  26. "nop \n\t"
  27. "nop \n\t"
  28. "nop \n\t"
  29. "nop \n\t"
  30. "nop \n\t"
  31. "nop \n\t"
  32. "nop \n\t"
  33. );
  34. }
  35. if(one[i] == '0')
  36. {
  37. PORTD = B00010000;
  38. asm volatile (
  39. "nop \n\t"
  40. "nop \n\t"
  41. "nop \n\t"
  42. );
  43. PORTD = B00000000;
  44. asm volatile (
  45. "nop \n\t"
  46. "nop \n\t"
  47. "nop \n\t"
  48. "nop \n\t"
  49. "nop \n\t"
  50. "nop \n\t"
  51. "nop \n\t"
  52. );
  53. }
  54. }
  55. delayMicroseconds(40);
  56. }
  57. }
  58. void loop() {
  59. // put your main code here, to run repeatedly:
  60. }
  61.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void setup()’:
prog.cpp:4:1: error: ‘DDRD’ was not declared in this scope
 DDRD = B00010000;
 ^~~~
prog.cpp:4:8: error: ‘B00010000’ was not declared in this scope
 DDRD = B00010000;
        ^~~~~~~~~
prog.cpp:11:1: error: ‘PORTD’ was not declared in this scope
 PORTD = B00010000;
 ^~~~~
prog.cpp:24:9: error: ‘B00000000’ was not declared in this scope
 PORTD = B00000000;
         ^~~~~~~~~
prog.cpp:37:1: error: ‘PORTD’ was not declared in this scope
 PORTD = B00010000;
 ^~~~~
prog.cpp:43:9: error: ‘B00000000’ was not declared in this scope
 PORTD = B00000000;
         ^~~~~~~~~
prog.cpp:55:21: error: ‘delayMicroseconds’ was not declared in this scope
 delayMicroseconds(40);
                     ^
stdout
Standard output is empty