{"id":4382,"date":"2021-01-15T21:33:18","date_gmt":"2021-01-15T12:33:18","guid":{"rendered":"https:\/\/now0930.pe.kr\/wordpress\/?p=4382"},"modified":"2021-01-25T20:40:56","modified_gmt":"2021-01-25T11:40:56","slug":"%eb%9d%bc%ec%a6%88%eb%b2%a0%eb%a6%ac-%ed%8c%8c%ec%9d%b44-%ec%98%a8%eb%8f%84-%ec%8a%b5%eb%8f%84%ec%84%bc%ec%84%9c-%ed%99%88%ed%8e%98%ec%9d%b4%ec%a7%80%ec%97%90-%ec%97%b0%ea%b2%b0","status":"publish","type":"post","link":"https:\/\/now0930.pe.kr\/wordpress\/%eb%9d%bc%ec%a6%88%eb%b2%a0%eb%a6%ac-%ed%8c%8c%ec%9d%b44-%ec%98%a8%eb%8f%84-%ec%8a%b5%eb%8f%84%ec%84%bc%ec%84%9c-%ed%99%88%ed%8e%98%ec%9d%b4%ec%a7%80%ec%97%90-%ec%97%b0%ea%b2%b0\/","title":{"rendered":"\ub77c\uc988\ubca0\ub9ac \ud30c\uc7744 \uc628\ub3c4\/\uc2b5\ub3c4\uc13c\uc11c \ud648\ud398\uc774\uc9c0\uc5d0 \uc5f0\uacb0(\uadf8\ub798\ud504 \ucd94\uac00)"},"content":{"rendered":"\n<p>\ud504\ub9b0\ud130 \uc11c\ubc84\ub85c \ub3d9\uc791\ud558\ub294 \ub77c\uc988\ubca0\ub9ac \ud30c\uc774\uc5d0 \uc628\ub3c4, \uc2b5\ub3c4\ub97c \uce21\uc815\ud558\ub294 dht11 \uc13c\uc11c\ub97c \ub2ec\uc558\ub2e4. \uc13c\uc11c\ub294 1,500\uc6d0\uc778\ub370 \ubc30\uc1a1\ube44 \ud3ec\ud568 4,000\uc6d0\uc5d0 \uad6c\ub9e4\ud588\ub2e4. \uc778\ud130\ub137\uc5d0\uc11c \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 python \ucf54\ub4dc\ub97c \ucc3e\uc558\uc9c0\ub9cc \ub3d9\uc791\ud558\uc9c0 \uc54a\uc544  <a href=\"https:\/\/blog.naver.com\/PostView.nhn?blogId=roboholic84&amp;logNo=220360435768\">gcc\ub85c \ub41c \ucf54\ub4dc<\/a>\ub97c \uc0ac\uc6a9\ud588\ub2e4. \uc544\ub798 \uadf8\ub9bc\uacfc \uac19\uc774 \uad6c\uc131\ud588\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"308\" src=\"https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/flowRoot5403-1.png\" alt=\"\" class=\"wp-image-4397\"\/><\/figure>\n\n\n\n<p>111\uc5d0\ub7ec\uac00 \ud648 \uc11c\ubc84 \uc811\uc18d \uc2dc\ub3c4\ub97c \ucc28\ub2e8\ud588\ub2e4. <a href=\"https:\/\/stackoverflow.com\/questions\/1420839\/cant-connect-to-mysql-server-error-111\">\ucc3e\uc544\ubcf4\ub2c8<\/a> \uc11c\ubc84 \ub0b4 my.cnf \ud30c\uc77c bind \uc124\uc815\uc744 \uc218\uc815\ud574\uc57c \ud568\uc744 \uc54c\uc558\ub2e4.<\/p>\n\n\n\n<p>\uc6cc\ub4dc \ud504\ub808\uc2a4 \ud14c\ub9c8 \ub514\ub809\ud1a0\ub9ac \uc548 functions.php\ub97c \ubcf4\uba74 <a href=\"https:\/\/www.cosmosfarm.com\/threads\/document\/14542\">\uc0ac\uc6a9\uc790 \uc815\uc758 \ud568\uc218\ub97c \ub9cc\ub4e4\uace0, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc870\ud68c<\/a>\ud560 \uc218 \uc788\ub2e4. functions.php \ud30c\uc77c\uc744 \uc218\uc815\ud558\uae30 \ubcf4\ub2e4, header.php\ub97c \uac04\ub2e8\ud558\uac8c \uc218\uc815\ud588\ub2e4. \uc2a4\ud0c0\uc77c \ub4f1 html\uc744 \uc798 \ubaa8\ub974\uae30 \ub54c\ubb38\uc5d0 \uac00\uc7a5 \uac04\ub2e8\ud55c \uc815\ubcf4\ub9cc \ud45c\uc2dc\ud588\ub2e4. \uc544\ub798\ub294 header.php \ud30c\uc77c\uc774\ub2e4. \ub9c8\uc9c0\ub9c9\uc5d0 4\uc904 \uc815\ub3c4\ub9cc \ub123\uc5c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/**\n * The header for our theme\n *\n * This is the template that displays all of the &lt;head> section and everything up until &lt;div id=\"content\">\n *\n * @link https:\/\/developer.wordpress.org\/themes\/basics\/template-files\/#template-partials\n *\n * @package WordPress\n * @subpackage Twenty_Seventeen\n * @since Twenty Seventeen 1.0\n * @version 1.0\n *\/\n\n?>&lt;!DOCTYPE html>\n&lt;html &lt;?php language_attributes(); ?> class=\"no-js no-svg\">\n&lt;head>\n&lt;meta charset=\"&lt;?php bloginfo( 'charset' ); ?>\">\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n&lt;link rel=\"profile\" href=\"https:\/\/gmpg.org\/xfn\/11\">\n\n&lt;?php wp_head(); ?>\n&lt;\/head>\n\n&lt;body &lt;?php body_class(); ?>>\n&lt;?php wp_body_open(); ?>\n&lt;div id=\"page\" class=\"site\">\n\t&lt;a class=\"skip-link screen-reader-text\" href=\"#content\">&lt;?php _e( 'Skip to content', 'twentyseventeen' ); ?>&lt;\/a>\n\n\t&lt;header id=\"masthead\" class=\"site-header\" role=\"banner\">\n\n\t\t&lt;?php get_template_part( 'template-parts\/header\/header', 'image' ); ?>\n\n\t\t&lt;?php if ( has_nav_menu( 'top' ) ) : ?>\n\t\t\t&lt;div class=\"navigation-top\">\n\t\t\t\t&lt;div class=\"wrap\">\n\t\t\t\t\t&lt;?php get_template_part( 'template-parts\/navigation\/navigation', 'top' ); ?>\n\t\t\t\t&lt;\/div>&lt;!-- .wrap -->\n\t\t\t&lt;\/div>&lt;!-- .navigation-top -->\n\t\t&lt;?php endif; ?>\n\n\t&lt;\/header>&lt;!-- #masthead -->\n\n\t&lt;?php\n\n\t\/*\n\t * If a regular post or page, and not the front page, show the featured image.\n\t * Using get_queried_object_id() here since the $post global may not be set before a call to the_post().\n\t *\/\n\tif ( ( is_single() || ( is_page() &amp;&amp; ! twentyseventeen_is_frontpage() ) ) &amp;&amp; has_post_thumbnail( get_queried_object_id() ) ) :\n\t\techo '&lt;div class=\"single-featured-image-header\">';\n\t\techo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );\n\t\techo '&lt;\/div>&lt;!-- .single-featured-image-header -->';\n\tendif;\n\t?>\n\n\n\t&lt;div class=\"site-content-contain\">\n\t\t&lt;div id=\"content\" class=\"site-content\">\n\n\/*\uc5ec\uae30 \ucd94\uac00*\/\n&lt;div align=\"center\">\n&lt;?php\n$mydb = new wpdb('????','?????','???','???');$results = $mydb->get_results(\"SELECT * FROM `dataTemperatureAndHumidity` ORDER BY `dataTemperatureAndHumidity`.`time` DESC limit 1\");foreach($results as $result){echo \"\uc628\ub3c4: \"; echo $result->temperature; echo \", \uc2b5\ub3c4: \"; echo $result->humidity;echo \", \uc218\uc9d1\uc2dc\uac01: \";echo $result->time;}\n?>&lt;\/div>\n<\/pre>\n\n\n\n<p>\ub2e4\uc74c\uc740 \ub77c\uc988\ubca0\ub9ac\uc548\uc5d0\uc11c \ub3cc\uc544\uac00\ub294 gcc \ud30c\uc77c\uc774\ub2e4. \uc778\ud130\ub137 \ud30c\uc77c \uadf8\ub300\ub85c \uc0ac\uc6a9\ud588\uace0, crobtab\uc73c\ub85c 30\ubd84\uc5d0 \ud55c\ubc88 \uc2e4\ud589\ud558\ub3c4\ub85d \ud588\ub2e4. \ub2e4\uc74c \ucef4\ud30c\uc77c \ud560 \ub54c mysql\uacfc wiringPi \uc635\uc158\uc744 \uc8fc\uc5b4\uc57c \ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/* mysql connect and query sample *\/\n#include &lt;stdio.h>\n#include &lt;stdlib.h>\n#include &lt;mysql.h>\n#include &lt;time.h>\n#include &lt;unistd.h>\n#include &lt;wiringPi.h>\n#include &lt;stdint.h>\n#define MAXTIMINGS 83\n#define DHTPIN 0 \nint dht11_dat[5] = {0, } ;\n\nvoid read_dht11_dat()\n{\n\tuint8_t laststate = HIGH ;\n\tuint8_t counter = 0 ;\n\tuint8_t j = 0, i ;\n\tuint8_t flag = HIGH ;\n\tuint8_t state = 0 ;\n\tfloat f ;\n\tdht11_dat[0] = dht11_dat[1] = dht11_dat[2] = dht11_dat[3] = dht11_dat[4] = 0 ;\n\tpinMode(DHTPIN, OUTPUT) ;\n\tdigitalWrite(DHTPIN, LOW) ;\n\tdelay(18) ;\n\tdigitalWrite(DHTPIN, HIGH) ;\n\tdelayMicroseconds(30) ;\n\tpinMode(DHTPIN, INPUT) ;\n\tfor (i = 0; i &lt; MAXTIMINGS; i++) {\n\t\tcounter = 0 ;\n\t\twhile ( digitalRead(DHTPIN) == laststate) {\n\t\t\tcounter++ ;\n\t\t\tdelayMicroseconds(1) ;\n\t\t\tif (counter == 200) break ;\n\t\t}\n\t\tlaststate = digitalRead(DHTPIN) ;\n\t\tif (counter == 200) break ; \/\/ if while breaked by timer, break for\n\t\tif ((i >= 4) &amp;&amp; (i % 2 == 0)) {\n\t\t\tdht11_dat[j \/ 8] &lt;&lt;= 1 ;\n\t\t\tif (counter > 20) dht11_dat[j \/ 8] |= 1 ;\n\t\t\tj++ ;\n\t\t}\n\t}\n\tif ((j >= 40) &amp;&amp; (dht11_dat[4] == ((dht11_dat[0] + dht11_dat[1] + dht11_dat[2] +\n\t\t\t\t\t\tdht11_dat[3]) &amp; 0xff))) {\n\t\tprintf(\"humidity = %d.%d %% Temperature = %d.%d *C \\n\", dht11_dat[0],\n\t\t\t\tdht11_dat[1], dht11_dat[2], dht11_dat[3]) ;\n\t}\n\telse printf(\"Data get failed\\n\") ;\n}\n\nfloat RandomFloat(float a, float b) {\n\t\/\/seed \uac12 \ud604\uc7ac \uc2dc\uac01\uc73c\ub85c \ucd08\uae30\ud654\n\tsrand(time(NULL));\n    float random = ((float) rand()) \/ (float) RAND_MAX;\n\n    float diff = b - a;\n    float r = random * diff;\n    return a + r;\n}\n \nint main(int argc, char **argv)\n{\n\t\tif (wiringPiSetup() == -1) exit(1) ;\n\t\tchar temp[10];\n\t\tchar humidity[10];\n\n\t\tread_dht11_dat();\n\n\t\tsprintf(temp, \"%d.%d\", dht11_dat[2], dht11_dat[3]);\n\t\tsprintf(humidity, \"%d.%d\",dht11_dat[0], dht11_dat[1]);\n\n\t\tMYSQL mysql;\n\t\tMYSQL *conn;\n        MYSQL_RES *result;\n        MYSQL_ROW row;\n\n\t\t\/\/printf(\"now: %d-%d-%d %d:%d:%d\\n\",tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,tm.tm_hour,tm.tm_min, tm.tm_sec);\n \n        char query_buffer[2048];\n\t\tconn = mysql_init(&amp;mysql);\n\n\t\t\/\/float temper, centerVal;\t\t\/\/\uc628\ub3c4, \uc911\uc2ec\uac12.\n\t\t\/\/centerVal=25;\n\t\t\/\/\ud55c\uae00\uc744 \uc0ac\uc6a9\ud558\uae30 \uc704\ud574 utf-8\ub85c \uc124\uc815.\n\t\tmysql_options(conn, MYSQL_SET_CHARSET_NAME, \"utf8\");\n\t\tmysql_options(conn, MYSQL_INIT_COMMAND, \"SET NAMES utf8\");\n\t\t\/\/18, 19\ud589\uc740 \ud55c\uae00 \uc0ac\uc6a9\ud558\uae30 \uc704\ud574, mysql  \uc635\uc158 \uc218\uc815..\n\t\t\/\/\uc544\ub798\ub294 \uc11c\ubc84 \uc124\uc815\uc5d0 \ub9de\ub3c4\ub85d \uc218\uc815..\n\t\tif(!mysql_real_connect(conn, \"????\", \"????\", \"????\", NULL, 3306, NULL, 0)){\n\t\t\t\tfprintf(stderr,\"error %s\", mysql_error(conn));\n\t\t\t\tprintf(\"cannot connect\");\n\t\t\t\texit(1);\n\t\t}\n\t\telse{\n\t\t\t\/\/\uc544\ub798\ub294 test_db\ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d \uc218\uc815..\n\t\t\t\tif (mysql_select_db(conn, \"????\")){\n\t\t\t\t\t\tprintf(\"cannot use databases\");\n\t\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t}\n\n\t\t\ttime_t t =time(NULL);\n\t\t\tstruct tm tm = *localtime(&amp;t);\n\n\t\t\tsprintf(query_buffer, \"select * from dataTemperatureAndHumidity\");\n\t\t\tmysql_query(conn, query_buffer);\n\t\t\tresult = mysql_store_result(conn);\n\n\t\t\twhile( (row = mysql_fetch_row(result)) != NULL){\n\t\t\t\tprintf(\"row[0],%s, %s, %s\",row[0], row[1], row[2]);\n\t\t\t}\n\t\t\tsprintf(query_buffer, \"INSERT INTO `dataTemperatureAndHumidity`(`time`, `temperature`, `humidity`) VALUES ('%d-%d-%d %d:%d:%d', %s, %s);\",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min, tm.tm_sec, temp, humidity);\n\n\n\n\t\t\tif (mysql_query(conn, query_buffer)){\n\t\t\t\t\tprintf(\"query faild : %s\\n\", query_buffer);\n\t\t\t\t\texit(1);\n\t\t\t}\n\n\t\tmysql_close(conn);\n \n}<\/pre>\n\n\n\n<p>\ub9c8\ub204\ub77c\uc5d0\uac8c \uc790\ub791\ud558\ub2c8, \uc65c \ub9cc\ub4e4\uc5c8\ub0d0\uace0 \ud55c\ub2e4. \uc544\ub798 \uadf8\ub9bc\uacfc \uac19\uc774 \uc798 \ub098\uc628\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2562\" height=\"1050\" src=\"https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/temp.png\" alt=\"\" class=\"wp-image-4408\" srcset=\"https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/temp.png 2562w, https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/temp-2048x839.png 2048w, https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/temp-768x315.png 768w, https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/temp-1536x630.png 1536w\" sizes=\"auto, (max-width: 2562px) 100vw, 2562px\" \/><\/figure>\n\n\n\n<p>(\uc5c5\ub370\uc774\ud2b8)\uadf8\ub798\ud504\ub97c \uadf8\ub9b4 \uc218\ub3c4 \uc788\ub2e4. <\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/stackoverflow.com\/questions\/32005229\/how-do-i-generate-a-graph-in-mysql-and-php-based-on-my-sql-statement-result\n<\/div><\/figure>\n\n\n\n<p>jpgraph \ubaa8\ub4c8\uc744 \uc124\uce58\ud574\uc57c \ud55c\ub2e4. \uc544\ub798 \uc0ac\uc774\ud2b8\uc5d0\uc11c jpgraph\ub97c \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\uc544 \uc801\ub2f9\ud55c web page\uc5d0 \ub123\uc5b4 \uc900\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/jpgraph.net\/doc\/\n<\/div><\/figure>\n\n\n\n<p>header.php\uc5d0 graph\ub97c \uc9c1\uc811 \ub123\uc73c\uba74 \uc548\ub41c\ub2e4. <a href=\"https:\/\/stackoverflow.com\/questions\/10487796\/jpgraph-error-http-headers-have-already-been-sent\">JpGraph Error: HTTP headers have already been sent<\/a> \uc774\ub7f0 \uc5d0\ub7ec\uac00 \ub09c\ub2e4. php\uac00 \ud30c\uc77c\ub85c \ubcc0\ud658 \ud6c4 html\uc774 \uc774\ubbf8\uc9c0\ub85c \ud45c\uc2dc\ud558\uac8c \ud55c\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/stackoverflow.com\/questions\/10487796\/jpgraph-error-http-headers-have-already-been-sent\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">header.php<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/**\n * The header for our theme\n *\n * This is the template that displays all of the &lt;head> section and everything up until &lt;div id=\"content\">\n *\n * @link https:\/\/developer.wordpress.org\/themes\/basics\/template-files\/#template-partials\n *\n * @package WordPress\n * @subpackage Twenty_Seventeen\n * @since Twenty Seventeen 1.0\n * @version 1.0\n *\/\n\n?>&lt;!DOCTYPE html>\n&lt;html &lt;?php language_attributes(); ?> class=\"no-js no-svg\">\n&lt;head>\n&lt;meta charset=\"&lt;?php bloginfo( 'charset' ); ?>\">\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n&lt;link rel=\"profile\" href=\"https:\/\/gmpg.org\/xfn\/11\">\n\n&lt;?php wp_head(); ?>\n&lt;\/head>\n\n&lt;body &lt;?php body_class(); ?>>\n&lt;?php wp_body_open(); ?>\n&lt;div id=\"page\" class=\"site\">\n\t&lt;a class=\"skip-link screen-reader-text\" href=\"#content\">&lt;?php _e( 'Skip to content', 'twentyseventeen' ); ?>&lt;\/a>\n\n\t&lt;header id=\"masthead\" class=\"site-header\" role=\"banner\">\n\n\t\t&lt;?php get_template_part( 'template-parts\/header\/header', 'image' ); ?>\n\n\t\t&lt;?php if ( has_nav_menu( 'top' ) ) : ?>\n\t\t\t&lt;div class=\"navigation-top\">\n\t\t\t\t&lt;div class=\"wrap\">\n\t\t\t\t\t&lt;?php get_template_part( 'template-parts\/navigation\/navigation', 'top' ); ?>\n\t\t\t\t&lt;\/div>&lt;!-- .wrap -->\n\t\t\t&lt;\/div>&lt;!-- .navigation-top -->\n\t\t&lt;?php endif; ?>\n\n\t&lt;\/header>&lt;!-- #masthead -->\n\n\t&lt;?php\n\n\t\/*\n\t * If a regular post or page, and not the front page, show the featured image.\n\t * Using get_queried_object_id() here since the $post global may not be set before a call to the_post().\n\t *\/\n\tif ( ( is_single() || ( is_page() &amp;&amp; ! twentyseventeen_is_frontpage() ) ) &amp;&amp; has_post_thumbnail( get_queried_object_id() ) ) :\n\t\techo '&lt;div class=\"single-featured-image-header\">';\n\t\techo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );\n\t\techo '&lt;\/div>&lt;!-- .single-featured-image-header -->';\n\tendif;\n\t?>\n\n\n\t&lt;div class=\"site-content-contain\">\n\t\t&lt;div id=\"content\" class=\"site-content\">\n\n&lt;div align=\"center\">\n&lt;?php\n\n\n\t\t$ydata = array();\n\t\t$y2data = array();\n\t\t$xdata = array();\n\t\t$mydb = new wpdb('???','???','???','???');\n\t\t$results = $mydb->get_results(\"SELECT * FROM `dataTemperatureAndHumidity` ORDER BY `dataTemperatureAndHumidity`.`time` DESC limit 30\");\n\t\tforeach($results as $result){\n\t\t\t$ydata[] = $result->temperature;\n\t\t\t$y2data[] = $result->humidity;\n\t\t\t$xdata[] = strtotime($result->time);\n\t\t\t#echo $result->time;\n\t\t};\n\t\t#echo gettype($xdata[0]);\n\n\/\/ Create graph instance\nrequire_once ('jpgraph\/src\/jpgraph.php');\nrequire_once ('jpgraph\/src\/jpgraph_line.php');\nrequire_once ('jpgraph\/src\/jpgraph_date.php');\n\n\/\/ Some (random) data\n#$ydata = array(11,3,8,12,5,1,9,13,5,7);\n\n\/\/ Size of the overall graph\n$width=400;\n$height=100;\n\n\/\/ Create the graph and set a scale.\n\/\/ These two calls are always required\n$graph = new Graph($width,$height);\n$graph->SetScale('datlin');\n$graph->title->Set(\"Temperature\");\n\n$graph2 = new Graph($width,$height);\n$graph2->SetScale('datlin');\n$graph2->title->Set(\"Humidity\");\n\n\/\/ Create the linear plot\n$lineplot=new LinePlot($ydata, $xdata);\n$lineplot2=new LinePlot($y2data, $xdata);\n\n\/\/ Add the plot to the graph\n$graph->Add($lineplot);\n$graph2->Add($lineplot2);\n\n\/\/ Display the graph\n$graph->Stroke(\".\/temperature.jpg\");\n$graph2->Stroke(\".\/humidity.jpg\");\n\n?>&lt;\/div>\n&lt;div align = \"center\">&lt;img src = \".\/temperature.jpg\"\/> &lt;img src = \".\/humidity.jpg\" \/> &lt;\/div>\n<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1614\" height=\"784\" src=\"https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/page.png\" alt=\"\" class=\"wp-image-4439\" srcset=\"https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/page.png 1614w, https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/page-768x373.png 768w, https:\/\/now0930.pe.kr\/wordpress\/wp-content\/uploads\/2021\/01\/page-1536x746.png 1536w\" sizes=\"auto, (max-width: 1614px) 100vw, 1614px\" \/><\/figure>\n\n\n\n<p>\uc798 \ud45c\uc2dc\ub41c\ub2e4. \ud648 \ud398\uc774\uc9c0\uac00 \uac08\uc218\ub85d \uad34\uc0c1\ud558\uac8c \ubcc0\ud55c\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud504\ub9b0\ud130 \uc11c\ubc84\ub85c \ub3d9\uc791\ud558\ub294 \ub77c\uc988\ubca0\ub9ac \ud30c\uc774\uc5d0 \uc628\ub3c4, \uc2b5\ub3c4\ub97c \uce21\uc815\ud558\ub294 dht11 \uc13c\uc11c\ub97c \ub2ec\uc558\ub2e4. \uc13c\uc11c\ub294 1,500\uc6d0\uc778\ub370 \ubc30\uc1a1\ube44 \ud3ec\ud568 4,000\uc6d0\uc5d0 \uad6c\ub9e4\ud588\ub2e4. \uc778\ud130\ub137\uc5d0\uc11c \ubc14\ub85c \uc0ac\uc6a9\ud560 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[861,152,798,151,849,848],"class_list":["post-4382","post","type-post","status-publish","format-standard","hentry","category-12","tag-jpgraph","tag-php","tag-raspberry","tag-wordpress","tag-849","tag-848"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=4382"}],"version-history":[{"count":14,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4382\/revisions"}],"predecessor-version":[{"id":4440,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4382\/revisions\/4440"}],"wp:attachment":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=4382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=4382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=4382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}