{"id":71,"date":"2015-11-16T23:33:58","date_gmt":"2015-11-16T23:33:58","guid":{"rendered":"http:\/\/kennethrowe.com\/Blog\/?p=71"},"modified":"2015-11-17T00:18:35","modified_gmt":"2015-11-17T00:18:35","slug":"project-ichi","status":"publish","type":"post","link":"http:\/\/kennethrowe.com\/Blog\/project-ichi\/","title":{"rendered":"Project: Ichi"},"content":{"rendered":"<p><strong>Project: Ichi<\/strong><\/p>\n<p>Project Ichi is my first attempt at building a robotic device. \u00a0Ichi means one in Japanese and represents my first attempt. \u00a0Ichi is hybrid manually controlled toy rover that will also implement some autonomous systems. \u00a0The main goal of this project is to learn more about Arduino and sensor systems to lay the groundwork for eventually constructing an outdoor rover.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-83 aligncenter\" src=\"https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg?resize=300%2C225\" alt=\"IMG_1696\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg?resize=300%2C225 300w, https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg?resize=1024%2C768 1024w, https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg?w=1632 1632w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><span style=\"text-decoration: underline;\">Project Specs:<\/span><\/p>\n<ul>\n<li>Rover Design<\/li>\n<li>Arduino based control system<\/li>\n<li>Ability to take weather measurements<\/li>\n<li>Obstacle Avoidance using ultrasonic range-finding<\/li>\n<li>Wireless Control<\/li>\n<li>Onboard Display<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\">Components:<\/span><\/p>\n<ul>\n<li>Tamiya Dual Motor Drive<\/li>\n<li>Tamiya Track System<\/li>\n<li>Arduino Uno R3<\/li>\n<li>Arduino Motor Shield R3<\/li>\n<li>HC-SR04 Ultrasonic Range-Finder<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\">Status:<\/span><\/p>\n<p>The temperature and humidity sensor is currently operational as is the rangefinder. \u00a0I&#8217;m now waiting on some mounting hardware to lock everything done and begin the motor coding.<\/p>\n<p>I ran in to a problem with the motor drive which is documented in another post. \u00a0I seem to have found a solution with an error in the code and need for a better power supply. \u00a0I&#8217;ll update once the new parts come in.<\/p>\n<p>Arduino Code:<\/p>\n<p><code><br \/>\n\/*<br \/>\n  Weather Bot<br \/>\n *\/<\/p>\n<p>\/\/Library Inclkudes<br \/>\n#include <dht11.h><br \/>\n#include \"Ultrasonic.h\"  \/\/included but not implemented<\/p>\n<p>dht11 DHT;<br \/>\nUltrasonic ultrasonic(5, 6);<\/p>\n<p>#define DHT11_PIN 2<\/p>\n<p>\/\/Motor A Config<br \/>\nconst int<br \/>\n  PWM_A = 3,<br \/>\n  DIR_A = 12,<br \/>\n  BRAKE_A = 9;<\/p>\n<p>\/\/Motor A Config<br \/>\nconst int<br \/>\n  PWM_B = 11,<br \/>\n  DIR_B = 13,<br \/>\n  BRAKE_B = 8;<\/p>\n<p>\/\/---------------------------------------------------------------------------<\/p>\n<p>\/\/ the setup function runs once when you press reset or power the board<br \/>\nvoid setup() {<\/p>\n<p>  int chkDHT;<\/p>\n<p>  \/\/ initialize digital pin 13 as an output for Heartbeat.<br \/>\n  pinMode(13, OUTPUT);<br \/>\n  Serial.begin(9600);<br \/>\n  delay(1500);  \/\/ Delay to make sure serial monitor is clean<br \/>\n  Serial.println();<br \/>\n  Serial.println(\"Ichi System Test\");<br \/>\nSerial.println(\"--------------------------------------------------\");<\/p>\n<p>  Serial.print(\"HC-SR04 Ultrasonic Rangefinder: \\t\");<br \/>\n  if (ultrasonic.Ranging(INC))<br \/>\n    Serial.println(\"OK\\t\");<br \/>\n  else<br \/>\n    Serial.println(\"Unknown error\\t\");<\/p>\n<p>  Serial.print(\"DHT11 Temperature and Humidity Sensor: \\t\");<br \/>\n  chkDHT = DHT.read(DHT11_PIN);    \/\/ READ DATA<br \/>\n  switch (chkDHT){<br \/>\n    case DHTLIB_OK:<br \/>\n                Serial.println(\"OK\\t\");<br \/>\n                break;<br \/>\n    case DHTLIB_ERROR_CHECKSUM:<br \/>\n                Serial.println(\"Checksum error\\t\");<br \/>\n                break;<br \/>\n    case DHTLIB_ERROR_TIMEOUT:<br \/>\n                Serial.println(\"Time out error\\t\");<br \/>\n                break;<br \/>\n    default:<br \/>\n                Serial.println(\"Unknown error\\t\");<br \/>\n                break;<br \/>\n  }<\/p>\n<p>  Serial.print(\"DHT11 LIBRARY VERSION: \");<br \/>\n  Serial.println(DHT11LIB_VERSION);<\/p>\n<p>  Serial.println();<br \/>\n  Serial.println(\"DHT11\\tHumidity (%)\\tTemp. \\t\\tRange\");<br \/>\n  Serial.println(\"--------------------------------------------------\");<\/p>\n<p>}<\/p>\n<p>\/\/ the loop function runs over and over again forever<br \/>\nvoid loop() {<br \/>\n  digitalWrite(13, HIGH);   \/\/ turn the LED on (HIGH is the voltage level)<br \/>\n  delay(500);              \/\/ wait for a second<br \/>\n  digitalWrite(13, LOW);    \/\/ turn the LED off by making the voltage LOW<br \/>\n  delay(100);              \/\/ wait for a second<\/p>\n<p>  digitalWrite(13, HIGH);   \/\/ turn the LED on (HIGH is the voltage level)<br \/>\n  delay(500);              \/\/ wait for a second<br \/>\n  digitalWrite(13, LOW);    \/\/ turn the LED off by making the voltage LOW<br \/>\n  delay(1000);              \/\/ wait for a second<\/p>\n<p>\/\/ Temperature \/ Humidity Check<br \/>\n int chk;<br \/>\n  chk = DHT.read(DHT11_PIN);    \/\/ READ DATA<br \/>\n  switch (chk){<br \/>\n    case DHTLIB_OK:<br \/>\n                Serial.print(\"OK\\t\");<br \/>\n                break;<br \/>\n    case DHTLIB_ERROR_CHECKSUM:<br \/>\n                Serial.print(\"Checksum error\\t\");<br \/>\n                break;<br \/>\n    case DHTLIB_ERROR_TIMEOUT:<br \/>\n                Serial.print(\"Time out error\\t\");<br \/>\n                break;<br \/>\n    default:<br \/>\n                Serial.print(\"Unknown error\\t\");<br \/>\n                break;<br \/>\n  }<br \/>\n \/\/ DISPLAY DATA<br \/>\n  Serial.print(DHT.humidity,1);<br \/>\n  Serial.print(\"% \\t\\t\");<br \/>\n  Serial.print(DHT.temperature,1);<br \/>\n  Serial.print(\"C\/\");<br \/>\n  Serial.print(Fahrenheit(DHT.temperature),1);<br \/>\n  Serial.print(\"F \\t\");<br \/>\n  Serial.print(ultrasonic.Ranging(INC));<br \/>\n  Serial.println(\" in.\");<\/p>\n<p>  delay(1000);<br \/>\n}<\/p>\n<p>\/\/ Functions<br \/>\n\/\/ -----------------------------------<br \/>\ndouble Fahrenheit(double celsius)<br \/>\n{<br \/>\n        return 1.8 * celsius + 32;<br \/>\n}<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project: Ichi Project Ichi is my first attempt at building a robotic device. \u00a0Ichi means one in Japanese and represents my first attempt. \u00a0Ichi is hybrid manually controlled toy rover that will also implement some autonomous systems. \u00a0The main goal of this project is to learn more about Arduino and sensor systems to lay the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":83,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","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":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":{"0":"post-71","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-engineering","9":"fallback-thumbnail"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/kennethrowe.com\/Blog\/wp-content\/uploads\/2015\/11\/IMG_1696.jpg?fit=1632%2C1224","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5YiG5-19","_links":{"self":[{"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":2,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":88,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/posts\/71\/revisions\/88"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/media\/83"}],"wp:attachment":[{"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kennethrowe.com\/Blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}