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