{"id":383,"date":"2020-03-28T20:00:10","date_gmt":"2020-03-28T20:00:10","guid":{"rendered":"http:\/\/www.linuxsystems.ovh\/?p=383"},"modified":"2021-10-17T13:00:37","modified_gmt":"2021-10-17T13:00:37","slug":"voltomierz-na-arduino-uno","status":"publish","type":"post","link":"https:\/\/www.linuxsystems.ovh\/?p=383","title":{"rendered":"Voltomierz na Arduino UNO"},"content":{"rendered":"\n<p>Schemat:<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/bucket.linuxsystems.ovh\/ArduinoVoltmeter\/schemat.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Kod Arduino:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;LiquidCrystal.h&gt;\nLiquidCrystal lcd(12, 11, 5, 4, 3, 2);\nint i=0, j=0;\nfloat value=0;\n\nvoid setup() {\n  \/\/ put your setup code here, to run once:\n  lcd.begin(16,2);\n  lcd.clear();\n  lcd.setCursor(0,0);\n  lcd.print(\"NAPIECIE: \");\n  lcd.setCursor(14,0);\n  lcd.print(\"V\");\n  lcd.setCursor(0,1);\n  lcd.print(\"linuxsystems.ovh\");\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  \/\/ put your main code here, to run repeatedly:\n  lcd.setCursor(10,0);\n  lcd.print(value);\n  value = analogRead(A0) * (5.0\/1024.0);\n  Serial.println(value);\n  delay(1000);\n}<\/code><\/pre>\n\n\n\n<p>Do niego potrzebujemy bibliotek\u0119 LiquidCrystal.<\/p>\n\n\n\n<p class=\"has-drop-cap has-very-light-gray-color has-vivid-red-background-color has-text-color has-background\"><strong>UUWAGA!<br>!! MO\u017bEMY MIERZY\u0106 MAKSYMALNIE 5V, POWY\u017bEJ TEJ WARTO\u015aCI, ARDUINO, ORAZ KOMPUTER DO KT\u00d3REGO JEST POD\u0141\u0104CZONY, MO\u017bE ULEC USZKODZENIU  !!<\/strong><\/p>\n\n\n\n<p>efekt widoczny na zdj\u0119ciu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-1024x768.jpg\" alt=\"\" class=\"wp-image-384\" srcset=\"https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-1024x768.jpg 1024w, https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-300x225.jpg 300w, https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-768x576.jpg 768w, https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-1536x1152.jpg 1536w, https:\/\/www.linuxsystems.ovh\/wp-content\/uploads\/2020\/03\/IMG_20200328_205225-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Zapraszam do komentowania wpisu i nowe pomys\u0142y na temat wykorzystania Arduino.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Schemat:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-arduino"],"_links":{"self":[{"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=383"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":778,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions\/778"}],"wp:attachment":[{"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxsystems.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}