{"id":811,"date":"2023-11-07T08:00:00","date_gmt":"2023-11-07T07:00:00","guid":{"rendered":"https:\/\/www.fuhselab.de\/?p=811"},"modified":"2023-09-25T09:35:30","modified_gmt":"2023-09-25T07:35:30","slug":"arduino-und-die-long-variablen","status":"publish","type":"post","link":"https:\/\/www.fuhselab.de\/index.php\/2023\/11\/07\/arduino-und-die-long-variablen\/","title":{"rendered":"Arduino und die long-Variablen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Der folgende Sketch akzeptiert eine Zahl aus vielen Stellen, multipliziert sie mit 2 und gibt das Ergebnis an den seriellen Monitor zur\u00fcck\u2026<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Vorbereitungen:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr dieses Projekt wird eigentlich nur der Arduino ben\u00f6tigt und der wird per USB-Kabel mit dem Computer verbunden\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Programmierung:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>long number = 0;\nlong a = 0;\nvoid setup()\n{\nSerial.begin(9600);\n}\nvoid loop()\n{\nnumber = 0;\nSerial.flush();\nwhile (Serial.available() == 0)\n{\n}\nwhile (Serial.available() > 0)\n{\nnumber = number * 10;\na = Serial.read() - '0';\nnumber = number + a;\ndelay(5);\n}\nSerial.print(\"Du hast eingegeben: \");\nSerial.println(number);\nSerial.print(number);\nSerial.print(\" multipliziert mit zwei ergibt \");\nnumber = number *2;\nSerial.println(number);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Der folgende Sketch akzeptiert eine Zahl aus vielen Stellen, multipliziert sie mit 2 und gibt das Ergebnis an den seriellen Monitor zur\u00fcck\u2026<\/p>\n","protected":false},"author":1,"featured_media":48,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[22],"class_list":["post-811","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\/811","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=811"}],"version-history":[{"count":1,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":812,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/811\/revisions\/812"}],"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=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/categories?post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/tags?post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}