{"id":3073,"date":"2026-05-26T08:00:00","date_gmt":"2026-05-26T06:00:00","guid":{"rendered":"https:\/\/www.fuhselab.de\/?p=3073"},"modified":"2026-05-05T08:30:31","modified_gmt":"2026-05-05T06:30:31","slug":"arduino-binaerzahlenquiz","status":"publish","type":"post","link":"https:\/\/www.fuhselab.de\/index.php\/2026\/05\/26\/arduino-binaerzahlenquiz\/","title":{"rendered":"Arduino Bin\u00e4rzahlenquiz"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Das ganze Leben ist bekanntlich ein Quiz und unser Arduino wird jetzt zu einem Bin\u00e4rzahlenquiz&#8230;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Programmierung:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#define DATA 6\n#define LATCH 8\n#define CLOCK 10\n\nint number =0;\nint answer = 0;\n\nvoid setup()\n{\npinMode(LATCH, OUTPUT);\npinMode(CLOCK, OUTPUT);\npinMode(DATA, OUTPUT);\nSerial.begin(9600);\nrandomSeed(analogRead(0));\ndisplayNumber(0);\n}\n\nvoid displayNumber(byte a)\n{\ndigitalWrite(LATCH, LOW);\nshiftOut(DATA, CLOCK, MSBFIRST, a);\ndigitalWrite(LATCH, HIGH);\n}\n\nvoid getAnswer()\n{\nint z = 0;\nSerial.flush();\nwhile (Serial.available() == 0)\n{\n}\n\n\nwhile (Serial.available() > 0)\n{\nanswer = answer * 10;\n\nz = Serial.read() -'0';\n\nanswer = answer + z;\n\ndelay(5);\n}\n\nSerial.print(\"Sie haben eingegeben: \");\nSerial.println(answer);\n}\n\n\nvoid checkAnswer()\n{\nif (answer ==number)\n{\nSerial.print(\"Richtig! \");\nSerial.print(answer, BIN);\nSerial.print(\" entspricht \");\nSerial.println(number);\nSerial.println();\n}\n\nelse\n{\nSerial.print(\"Falsch! \");\nSerial.print(number, BIN);\nSerial.print(\" entspricht \");\nSerial.println(number);\nSerial.println();\n}\nanswer = 0;\ndelay(10000);\n\n}\n\nvoid loop()\n{\nnumber = random(256);\ndisplayNumber(number);\nSerial.println(\"Was ist die dezimale Entsprechung der angezeigten Bin\u00e4rzahl? \");\ngetAnswer();\ncheckAnswer();\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Das ganze Leben ist bekanntlich ein Quiz und unser Arduino wird jetzt zu einem Bin\u00e4rzahlenquiz&#8230;<\/p>\n","protected":false},"author":1,"featured_media":48,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[22],"class_list":["post-3073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","tag-arduino-gruppe-peine"],"_links":{"self":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/3073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/comments?post=3073"}],"version-history":[{"count":1,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/3073\/revisions"}],"predecessor-version":[{"id":3074,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/3073\/revisions\/3074"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media\/48"}],"wp:attachment":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media?parent=3073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/categories?post=3073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/tags?post=3073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}