solved workshop exercise
Embed:
(wiki syntax)
Show/hide line numbers
main.h
00001 #include "mbed.h" 00002 00003 #include <stdlib.h> 00004 #include <string> 00005 #define TURN 5 00006 00007 using namespace std; 00008 00009 typedef struct question { 00010 string answer; 00011 bool shown; 00012 int shown_as; 00013 } question_t; 00014 00015 //Global variable 00016 Serial pc(SERIAL_TX, SERIAL_RX); 00017 DigitalOut led(LED1); 00018 Timeout timeout; 00019 00020 InterruptIn mybutton(USER_BUTTON); 00021 00022 int number_of_participants = 0; 00023 bool expired = false, paused = false, answering = false; 00024 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!"; 00025 string read_questions = ""; 00026 00027 string readline_serial();
Generated on Wed Jul 27 2022 22:37:37 by
1.7.2