Advertisement
Guest User

Quiz

a guest
Apr 19th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 18.05 KB | None | 0 0
  1. #include <SD.h>
  2.  
  3. #include <SPI.h>
  4.  
  5. #include <Wire.h>
  6. #include <Keypad.h>
  7.  
  8. const byte rows = 4;
  9. const byte cols = 4;
  10.  
  11. char keys[rows][cols] = {
  12.   {'1','2','3','A'},
  13.   {'4','5','6','B'},
  14.   {'7','8','9','C'},
  15.   {'*','0','#','D'}
  16. };
  17.  
  18. byte rowPins[rows] = {11,10,9,8};
  19. byte colPins[cols] = {7,6,5,4};
  20.  
  21. Keypad key = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
  22.  
  23. #include <Adafruit_GFX.h>    // Core graphics library
  24. //#include <Adafruit_TFTLCD.h> // Hardware-specific library
  25. //Adafruit_TFTLCD tft(A3, A2, A1, A0, A4);
  26. #include <MCUFRIEND_kbv.h>
  27. MCUFRIEND_kbv tft;       // hard-wired for UNO shields anyway.
  28. #include <TouchScreen.h>
  29.  
  30. #if defined(__SAM3X8E__)
  31. #undef __FlashStringHelper::F(string_literal)
  32. #define F(string_literal) string_literal
  33. #endif
  34.  
  35.  
  36. // most mcufriend shields use these pins and Portrait mode:
  37. uint8_t YP = A1;  // must be an analog pin, use "An" notation!
  38. uint8_t XM = A2;  // must be an analog pin, use "An" notation!
  39. uint8_t YM = 7;   // can be a digital pin
  40. uint8_t XP = 6;   // can be a digital pin
  41. uint8_t SwapXY = 0;
  42.  
  43. // Assign human-readable names to some common 16-bit color values:
  44. #define  BLACK   0x0000
  45. #define BLUE    0x001F
  46. #define RED     0xF800
  47. #define GREEN   0x07E0
  48. #define CYAN    0x07FF
  49. #define MAGENTA 0xF81F
  50. #define YELLOW  0xFFE0
  51. #define WHITE   0xFFFF
  52.  
  53. void show_tft(void)
  54. {
  55.  tft.begin(9600);
  56.  tft.setCursor(9, 7);
  57.  tft.setTextSize(4);
  58.  tft.setTextColor(CYAN, BLACK);
  59.  tft.print('Moje ime je Gospodin Limeni. Uskoro pocinjemo kviz.');
  60. }
  61. char keypressed = ' ';
  62. File myFile;
  63. int TacniOdgovori = 0;
  64. int NeTacniOdgovori = 0;
  65. void setup() {
  66.  
  67. }
  68.  
  69. void loop() {
  70.  
  71.  for (int x = 1; x<16; x++) {
  72.   if (x == 1){
  73.     File myFile = SD.open("1. Pitanje.txt");
  74.   if (myFile) {
  75.     tft.print("1. Pitanje.txt");
  76.   while (myFile.available()) {
  77.     tft.print(myFile.read());
  78.     char keypressed = key.getKey();
  79.   }
  80.  
  81. }
  82.   }
  83.     if (keypressed = 'A') {
  84.           myFile.close();
  85.          tft.reset();
  86.          tft.println('Vas odgovor nije tacan');
  87.          tft.println('Tacan odgovor je pod C');
  88.          NeTacniOdgovori = NeTacniOdgovori + 1;
  89.     }
  90.     if (keypressed = 'B') {
  91.          myFile.close();
  92.          tft.reset();
  93.          tft.println('Vas odgovor nije tacan');
  94.          tft.println('Tacan odgovor je pod C');
  95.          NeTacniOdgovori = NeTacniOdgovori + 1;    
  96. }
  97. if (keypressed = 'C') {
  98.          myFile.close();
  99.          tft.reset();
  100.          tft.println('Vas odgovor je tacan');
  101.          TacniOdgovori = TacniOdgovori + 1;
  102.          }
  103. if (keypressed = 'D') {
  104.           myFile.close();
  105.          tft.reset();
  106.          tft.println('Vas odgovor nije tacan');
  107.          tft.println('Tacan odgovor je pod C');
  108.         NeTacniOdgovori = NeTacniOdgovori + 1;
  109. }
  110.  
  111.  if (x == 2){
  112.     File myFile = SD.open("2. Pitanje.txt");
  113.   if (myFile) {
  114.     tft.print("2. Pitanje.txt");
  115.   while (myFile.available()) {
  116.     tft.print(myFile.read());
  117.     char keypressed = key.getKey();
  118.   }
  119.  
  120. }
  121.   }
  122.     if (keypressed = 'A') {
  123.           myFile.close();
  124.          tft.reset();
  125.          tft.println('Vas odgovor nije tacan');
  126.          tft.println('Tacan odgovor je pod B');
  127.          NeTacniOdgovori = NeTacniOdgovori + 1;
  128.           }
  129.     if (keypressed = 'B') {
  130.          myFile.close();
  131.          tft.reset();
  132.          tft.println('Vas odgovor je tacan');
  133.          TacniOdgovori = TacniOdgovori + 1;
  134.              
  135. }
  136. if (keypressed = 'C') {
  137.           myFile.close();
  138.          tft.reset();
  139.          tft.println('Vas odgovor nije tacan');
  140.          tft.println('Tacan odgovor je pod B');
  141.          NeTacniOdgovori = NeTacniOdgovori + 1;
  142. }
  143. if (keypressed = 'D') {
  144.          myFile.close();
  145.          tft.reset();
  146.          tft.println('Vas odgovor nije tacan');
  147.          tft.println('Tacan odgovor je pod B');
  148.         NeTacniOdgovori = NeTacniOdgovori + 1;
  149. }
  150. if (x == 3){
  151.     File myFile = SD.open("3. Pitanje.txt");
  152.   if (myFile) {
  153.     tft.print("3. Pitanje.txt");
  154.   while (myFile.available()) {
  155.     tft.print(myFile.read());
  156.     char keypressed = key.getKey();
  157.   }
  158.  
  159. }
  160.   }
  161.     if (keypressed = 'A') {
  162.           myFile.close();
  163.          tft.reset();
  164.          tft.println('Vas odgovor nije tacan');
  165.          tft.println('Tacan odgovor je pod D');
  166.          NeTacniOdgovori = NeTacniOdgovori + 1;
  167.           }
  168.     if (keypressed = 'B') {
  169.          myFile.close();
  170.          tft.reset();
  171.          tft.println('Vas odgovor je tacan');
  172.          tft.println('Tacan odgovor je pod D');
  173.            NeTacniOdgovori = NeTacniOdgovori + 1;    
  174. }
  175. if (keypressed = 'C') {
  176.           myFile.close();
  177.          tft.reset();
  178.          tft.println('Vas odgovor nije tacan');
  179.          tft.println('Tacan odgovor je pod D');
  180.        NeTacniOdgovori = NeTacniOdgovori + 1;
  181. }
  182. if (keypressed = 'D') {
  183.          myFile.close();
  184.          tft.reset();
  185.          tft.println('Vas odgovor je tacan');
  186.          TacniOdgovori = TacniOdgovori + 1;
  187.          
  188. }
  189. if (x == 4){
  190.     File myFile = SD.open("4. Pitanje.txt");
  191.   if (myFile) {
  192.     tft.print("4. Pitanje.txt");
  193.   while (myFile.available()) {
  194.     tft.print(myFile.read());
  195.     char keypressed = key.getKey();
  196.   }
  197.  
  198. }
  199.   }
  200.     if (keypressed = 'A') {
  201.           myFile.close();
  202.          tft.reset();
  203.          tft.println('Vas odgovor nije tacan');
  204.          tft.println('Tacan odgovor je pod B');
  205.          NeTacniOdgovori = NeTacniOdgovori + 1;
  206.           }
  207.     if (keypressed = 'B') {
  208.          myFile.close();
  209.          tft.reset();
  210.          tft.println('Vas odgovor je tacan');
  211.          TacniOdgovori = TacniOdgovori + 1;
  212.        
  213.                
  214. }
  215. if (keypressed = 'C') {
  216.           myFile.close();
  217.          tft.reset();
  218.          tft.println('Vas odgovor nije tacan');
  219.          tft.println('Tacan odgovor je pod B');
  220.        NeTacniOdgovori = NeTacniOdgovori + 1;
  221. }
  222. if (keypressed = 'D') {
  223.          myFile.close();
  224.          tft.reset();
  225.          tft.println('Vas odgovor nije tacan');
  226.          tft.println('Tacan odgovor je pod B');
  227.          NeTacniOdgovori = NeTacniOdgovori + 1;
  228. }
  229. if (x == 5){
  230.     File myFile = SD.open("5. Pitanje.txt");
  231.   if (myFile) {
  232.     tft.print("5. Pitanje.txt");
  233.   while (myFile.available()) {
  234.     tft.print(myFile.read());
  235.     char keypressed = key.getKey();
  236.   }
  237.  
  238. }
  239.   }
  240.     if (keypressed = 'A') {
  241.           myFile.close();
  242.          tft.reset();
  243.          tft.println('Vas odgovor nije tacan');
  244.          tft.println('Tacan odgovor je pod D');
  245.          NeTacniOdgovori = NeTacniOdgovori + 1;
  246.           }
  247.     if (keypressed = 'B') {
  248.          myFile.close();
  249.          tft.reset();
  250.          tft.println('Vas odgovor je tacan');
  251.          tft.println('Tacan odgovor je pod D');
  252.          NeTacniOdgovori = NeTacniOdgovori + 1;      
  253. }
  254. if (keypressed = 'C') {
  255.           myFile.close();
  256.          tft.reset();
  257.          tft.println('Vas odgovor nije tacan');
  258.          tft.println('Tacan odgovor je pod D');
  259.        NeTacniOdgovori = NeTacniOdgovori + 1;
  260. }
  261. if (keypressed = 'D') {
  262.          myFile.close();
  263.          tft.reset();
  264.          tft.println('Vas odgovor je tacan');
  265.          TacniOdgovori = TacniOdgovori + 1;
  266.          
  267. }
  268. if (x == 6){
  269.     File myFile = SD.open("6. Pitanje.txt");
  270.   if (myFile) {
  271.     tft.print("6. Pitanje.txt");
  272.   while (myFile.available()) {
  273.     tft.print(myFile.read());
  274.     char keypressed = key.getKey();
  275.   }
  276.  
  277. }
  278.   }
  279.     if (keypressed = 'A') {
  280.           myFile.close();
  281.          tft.reset();
  282.          tft.println('Vas odgovor je tacan');
  283.          TacniOdgovori = TacniOdgovori + 1;
  284.          
  285.          
  286.           }
  287.     if (keypressed = 'B') {
  288.          myFile.close();
  289.          tft.reset();
  290.          tft.println('Vas odgovor nije tacan');
  291.          tft.println('Tacan dogovor je pod A');
  292.          NeTacniOdgovori = NeTacniOdgovori + 1;      
  293. }
  294. if (keypressed = 'C') {
  295.           myFile.close();
  296.          tft.reset();
  297.          tft.println('Vas odgovor je tacan');
  298.          tft.println('Tacan odgovor je pod A');
  299.        NeTacniOdgovori = NeTacniOdgovori + 1;
  300. }
  301. if (keypressed = 'D') {
  302.          myFile.close();
  303.          tft.reset();
  304.          tft.println('Vas odgovor je tacan');
  305.          tft.println('Tacan odgovor je pod A');
  306.          NeTacniOdgovori = NeTacniOdgovori + 1;
  307. }
  308. if (x == 7){
  309.     File myFile = SD.open("7. Pitanje.txt");
  310.   if (myFile) {
  311.     tft.print("7. Pitanje.txt");
  312.   while (myFile.available()) {
  313.     tft.print(myFile.read());
  314.     char keypressed = key.getKey();
  315.   }
  316.  
  317. }
  318.   }
  319.     if (keypressed = 'A') {
  320.           myFile.close();
  321.          tft.reset();
  322.          tft.println('Vas odgovor nije tacan');
  323.          tft.println('Tacan odgovor je pod C');
  324.          NeTacniOdgovori = NeTacniOdgovori + 1;
  325.     }
  326.     if (keypressed = 'B') {
  327.          myFile.close();
  328.          tft.reset();
  329.          tft.println('Vas odgovor nije tacan');
  330.          tft.println('Tacan odgovor je pod C');
  331.          NeTacniOdgovori = NeTacniOdgovori + 1;
  332.              
  333. }
  334. if (keypressed = 'C') {
  335.          myFile.close();
  336.          tft.reset();
  337.          tft.println('Vas odgovor je tacan');
  338.          TacniOdgovori = TacniOdgovori + 1;
  339.          }
  340. if (keypressed = 'D') {
  341.           myFile.close();
  342.          tft.reset();
  343.          tft.println('Vas odgovor nije tacan');
  344.          tft.println('Tacan odgovor je pod C');
  345.          NeTacniOdgovori = NeTacniOdgovori + 1;
  346.        
  347. }
  348. if (x == 8){
  349.     File myFile = SD.open("8. Pitanje.txt");
  350.   if (myFile) {
  351.     tft.print("8. Pitanje.txt");
  352.   while (myFile.available()) {
  353.     tft.print(myFile.read());
  354.     char keypressed = key.getKey();
  355.   }
  356.  
  357. }
  358.   }
  359.     if (keypressed = 'A') {
  360.           myFile.close();
  361.          tft.reset();
  362.          tft.println('Vas odgovor nije tacan');
  363.          tft.println('Tacan odgovor je pod D');
  364.          NeTacniOdgovori = NeTacniOdgovori + 1;
  365.          
  366.           }
  367.     if (keypressed = 'B') {
  368.          myFile.close();
  369.          tft.reset();
  370.          tft.println('Vas odgovor nije tacan');
  371.          tft.println('Tacan odgovor je pod D');
  372.          NeTacniOdgovori = NeTacniOdgovori + 1;
  373.                
  374. }
  375. if (keypressed = 'C') {
  376.           myFile.close();
  377.          tft.reset();
  378.          tft.println('Vas odgovor nije tacan');
  379.          tft.println('Tacan odgovor je pod D');
  380.          NeTacniOdgovori = NeTacniOdgovori + 1;
  381.        
  382. }
  383. if (keypressed = 'D') {
  384.          myFile.close();
  385.          tft.reset();
  386.          tft.println('Vas odgovor je tacan');
  387.          TacniOdgovori = TacniOdgovori + 1;
  388. }
  389. if (x == 9){
  390.     File myFile = SD.open("9. Pitanje.txt");
  391.   if (myFile) {
  392.     tft.print("9. Pitanje.txt");
  393.   while (myFile.available()) {
  394.     tft.print(myFile.read());
  395.     char keypressed = key.getKey();
  396.   }
  397.  
  398. }
  399.   }
  400.     if (keypressed = 'A') {
  401.           myFile.close();
  402.          tft.reset();
  403.          tft.println('Vas odgovor nije tacan');
  404.          tft.println('Tacan odgovor je pod D');
  405.          NeTacniOdgovori = NeTacniOdgovori + 1;
  406.          
  407.           }
  408.     if (keypressed = 'B') {
  409.          myFile.close();
  410.          tft.reset();
  411.          tft.println('Vas odgovor nije tacan');
  412.          tft.println('Tacan odgovor je pod D');
  413.          NeTacniOdgovori = NeTacniOdgovori + 1;
  414.                
  415. }
  416. if (keypressed = 'C') {
  417.           myFile.close();
  418.          tft.reset();
  419.          tft.println('Vas odgovor nije tacan');
  420.          tft.println('Tacan odgovor je pod D');
  421.          NeTacniOdgovori = NeTacniOdgovori + 1;
  422.        
  423. }
  424. if (keypressed = 'D') {
  425.          myFile.close();
  426.          tft.reset();
  427.          tft.println('Vas odgovor je tacan');
  428.          TacniOdgovori = TacniOdgovori + 1;
  429. }
  430. if (x == 10){
  431.     File myFile = SD.open("10. Pitanje.txt");
  432.   if (myFile) {
  433.     tft.print("10. Pitanje.txt");
  434.   while (myFile.available()) {
  435.     tft.print(myFile.read());
  436.     char keypressed = key.getKey();
  437.   }
  438.  
  439. }
  440.   }
  441.     if (keypressed = 'A') {
  442.           myFile.close();
  443.          tft.reset();
  444.          tft.println('Vas odgovor nije tacan');
  445.          tft.println('Tacan odgovor je pod C');
  446.          NeTacniOdgovori = NeTacniOdgovori + 1;
  447.     }
  448.     if (keypressed = 'B') {
  449.          myFile.close();
  450.          tft.reset();
  451.          tft.println('Vas odgovor nije tacan');
  452.          tft.println('Tacan odgovor je pod C');
  453.          NeTacniOdgovori = NeTacniOdgovori + 1;
  454.              
  455. }
  456. if (keypressed = 'C') {
  457.          myFile.close();
  458.          tft.reset();
  459.          tft.println('Vas odgovor je tacan');
  460.          TacniOdgovori = TacniOdgovori + 1;
  461.          }
  462. if (keypressed = 'D') {
  463.           myFile.close();
  464.          tft.reset();
  465.          tft.println('Vas odgovor nije tacan');
  466.          tft.println('Tacan odgovor je pod C');
  467.          NeTacniOdgovori = NeTacniOdgovori + 1;
  468.        
  469. }
  470. if (x == 11){
  471.     File myFile = SD.open("11. Pitanje.txt");
  472.   if (myFile) {
  473.     tft.print("11. Pitanje.txt");
  474.   while (myFile.available()) {
  475.     tft.print(myFile.read());
  476.     char keypressed = key.getKey();
  477.   }
  478.  
  479. }
  480.   }
  481.     if (keypressed = 'A') {
  482.           myFile.close();
  483.          tft.reset();
  484.          tft.println('Vas odgovor nije tacan');
  485.          tft.println('Tacan odgovor je pod B');
  486.          NeTacniOdgovori = NeTacniOdgovori + 1;
  487.           }
  488.     if (keypressed = 'B') {
  489.          myFile.close();
  490.          tft.reset();
  491.          tft.println('Vas odgovor je tacan');
  492.          TacniOdgovori = TacniOdgovori + 1;
  493.        
  494.                
  495. }
  496. if (keypressed = 'C') {
  497.           myFile.close();
  498.          tft.reset();
  499.          tft.println('Vas odgovor nije tacan');
  500.          tft.println('Tacan odgovor je pod B');
  501.        NeTacniOdgovori = NeTacniOdgovori + 1;
  502. }
  503. if (keypressed = 'D') {
  504.          myFile.close();
  505.          tft.reset();
  506.          tft.println('Vas odgovor nije tacan');
  507.          tft.println('Tacan odgovor je pod B');
  508.          NeTacniOdgovori = NeTacniOdgovori + 1;
  509. }
  510. if (x == 12){
  511.     File myFile = SD.open("12. Pitanje.txt");
  512.   if (myFile) {
  513.     tft.print("12. Pitanje.txt");
  514.   while (myFile.available()) {
  515.     tft.print(myFile.read());
  516.     char keypressed = key.getKey();
  517.   }
  518.  
  519. }
  520.   }
  521.     if (keypressed = 'A') {
  522.           myFile.close();
  523.          tft.reset();
  524.          tft.println('Vas odgovor nije tacan');
  525.          tft.println('Tacan odgovor je pod D');
  526.          NeTacniOdgovori = NeTacniOdgovori + 1;
  527.          
  528.           }
  529.     if (keypressed = 'B') {
  530.          myFile.close();
  531.          tft.reset();
  532.          tft.println('Vas odgovor nije tacan');
  533.          tft.println('Tacan odgovor je pod D');
  534.          NeTacniOdgovori = NeTacniOdgovori + 1;
  535.                
  536. }
  537. if (keypressed = 'C') {
  538.           myFile.close();
  539.          tft.reset();
  540.          tft.println('Vas odgovor nije tacan');
  541.          tft.println('Tacan odgovor je pod D');
  542.          NeTacniOdgovori = NeTacniOdgovori + 1;
  543.        
  544. }
  545. if (keypressed = 'D') {
  546.          myFile.close();
  547.          tft.reset();
  548.          tft.println('Vas odgovor je tacan');
  549.          TacniOdgovori = TacniOdgovori + 1;
  550. }
  551. if (x == 13){
  552.     File myFile = SD.open("13. Pitanje.txt");
  553.   if (myFile) {
  554.     tft.print("13. Pitanje.txt");
  555.   while (myFile.available()) {
  556.     tft.print(myFile.read());
  557.     char keypressed = key.getKey();
  558.   }
  559.  
  560. }
  561.   }
  562.     if (keypressed = 'A') {
  563.           myFile.close();
  564.          tft.reset();
  565.          tft.println('Vas odgovor je tacan');
  566.          TacniOdgovori = TacniOdgovori + 1;
  567.          
  568.          
  569.           }
  570.     if (keypressed = 'B') {
  571.          myFile.close();
  572.          tft.reset();
  573.          tft.println('Vas odgovor nije tacan');
  574.          tft.println('Tacan dogovor je pod A');
  575.          NeTacniOdgovori = NeTacniOdgovori + 1;      
  576. }
  577. if (keypressed = 'C') {
  578.           myFile.close();
  579.          tft.reset();
  580.          tft.println('Vas odgovor je tacan');
  581.          tft.println('Tacan odgovor je pod A');
  582.        NeTacniOdgovori = NeTacniOdgovori + 1;
  583. }
  584. if (keypressed = 'D') {
  585.          myFile.close();
  586.          tft.reset();
  587.          tft.println('Vas odgovor je tacan');
  588.          tft.println('Tacan odgovor je pod A');
  589.          NeTacniOdgovori = NeTacniOdgovori + 1;
  590. }
  591. if (x == 14){
  592.     File myFile = SD.open("14. Pitanje.txt");
  593.   if (myFile) {
  594.     tft.print("14. Pitanje.txt");
  595.   while (myFile.available()) {
  596.     tft.print(myFile.read());
  597.     char keypressed = key.getKey();
  598.   }
  599.  
  600. }
  601.   }
  602.     if (keypressed = 'A') {
  603.           myFile.close();
  604.          tft.reset();
  605.          tft.println('Vas odgovor je tacan');
  606.          TacniOdgovori = TacniOdgovori + 1;
  607.          
  608.          
  609.           }
  610.     if (keypressed = 'B') {
  611.          myFile.close();
  612.          tft.reset();
  613.          tft.println('Vas odgovor nije tacan');
  614.          tft.println('Tacan dogovor je pod A');
  615.          NeTacniOdgovori = NeTacniOdgovori + 1;      
  616. }
  617. if (keypressed = 'C') {
  618.           myFile.close();
  619.          tft.reset();
  620.          tft.println('Vas odgovor je tacan');
  621.          tft.println('Tacan odgovor je pod A');
  622.        NeTacniOdgovori = NeTacniOdgovori + 1;
  623. }
  624. if (keypressed = 'D') {
  625.          myFile.close();
  626.          tft.reset();
  627.          tft.println('Vas odgovor je tacan');
  628.          tft.println('Tacan odgovor je pod A');
  629.          NeTacniOdgovori = NeTacniOdgovori + 1;
  630. }
  631. if (x == 15){
  632.     File myFile = SD.open("15. Pitanje.txt");
  633.   if (myFile) {
  634.     tft.print("15. Pitanje.txt");
  635.   while (myFile.available()) {
  636.     tft.print(myFile.read());
  637.     char keypressed = key.getKey();
  638.   }
  639.  
  640. }
  641.   }
  642.     if (keypressed = 'A') {
  643.           myFile.close();
  644.          tft.reset();
  645.          tft.println('Vas odgovor nije tacan');
  646.          tft.println('Tacan odgovor je pod B');
  647.          NeTacniOdgovori = NeTacniOdgovori + 1;
  648.           }
  649.     if (keypressed = 'B') {
  650.          myFile.close();
  651.          tft.reset();
  652.          tft.println('Vas odgovor je tacan');
  653.          TacniOdgovori = TacniOdgovori + 1;
  654.        
  655.                
  656. }
  657. if (keypressed = 'C') {
  658.           myFile.close();
  659.          tft.reset();
  660.          tft.println('Vas odgovor nije tacan');
  661.          tft.println('Tacan odgovor je pod B');
  662.        NeTacniOdgovori = NeTacniOdgovori + 1;
  663. }
  664. if (keypressed = 'D') {
  665.          myFile.close();
  666.          tft.reset();
  667.          tft.println('Vas odgovor nije tacan');
  668.          tft.println('Tacan odgovor je pod B');
  669.          NeTacniOdgovori = NeTacniOdgovori + 1;
  670. }
  671. }
  672. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement