solved workshop exercise

main.h

Committer:
marcozecchini
Date:
2019-03-12
Revision:
0:f4a1a7ba4cdc

File content as of revision 0:f4a1a7ba4cdc:

#include "mbed.h"

#include <stdlib.h>
#include <string>
#define TURN 5

using namespace std;

typedef struct question {
    string answer;
    bool shown;
    int shown_as;
} question_t;

//Global variable
Serial pc(SERIAL_TX, SERIAL_RX);
DigitalOut led(LED1);
Timeout timeout;

InterruptIn mybutton(USER_BUTTON);

int number_of_participants = 0;
bool expired = false, paused = false, answering = false;
string questions = "When was Linux invented? ; 1991 ; 2005 ; 1965 ; 1999!Which one of the following is NOT open source? ; Skype ; Docker ; Python ; PHP ; LibreOffice!What does the 'A' stand for in the term LAMP stack? ; Apache ; Ajax ; ActiveX ; ASP.NET!Firefox was made by what community? ; Mozilla ; Apple ; IBM ; Oracle!What animal is Tux, the Linux mascot? ; Penguin ; Mouse ; Horse ; Spider!Which Linux OS is commonly recommended for beginners? ; Ubuntu ; Gentoo ; FreeBSD ; Fedora!What is Audacity used for? ; Audio ; Art ; Programming ; Gaming!Which one of the following is open source? ; MySQL ; Windows ; iTunes ; Photoshop!What language was the Linux kernel written in? ; C ; Java ; C++ ; Ruby!Which one of the following is an open source license? ; GPL ; FTP ; GUID ; API!";
string read_questions = "";

string readline_serial();