{"id":1766,"date":"2019-10-30T03:52:25","date_gmt":"2019-10-30T03:52:25","guid":{"rendered":"https:\/\/bitcows.com\/?p=1766"},"modified":"2024-05-10T18:12:23","modified_gmt":"2024-05-10T18:12:23","slug":"sao-instructions","status":"publish","type":"post","link":"https:\/\/bitcows.com\/?p=1766","title":{"rendered":"SAO Instructions"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/bitcows.com\/wp-content\/uploads\/2019\/12\/animatedrick.gif\" alt=\"\" width=\"600\" class=\"alignnone size-full wp-image-1858\" \/><\/p>\n<p><a href=\"https:\/\/www.tindie.com\/stores\/djmason9\/?ref=offsite_badges&#038;utm_source=sellers_djmason9&#038;utm_medium=badges&#038;utm_campaign=badge_large\" target=\"_new\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/d2ss6ovg47m0r5.cloudfront.net\/badges\/tindie-larges.png\" alt=\"I sell on Tindie\" width=\"200\" height=\"104\"><\/a><\/p>\n<h1>\nPinout for version 1.0.2<br \/>\n<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/bitcows.com\/wp-content\/uploads\/2019\/10\/rick-768x1024.png\" alt=\"\" width=\"768\" height=\"1024\" class=\"alignnone size-large wp-image-1835\" \/><\/p>\n<h1>\nArduino<br \/>\n<\/h1>\n<p>You can use the Arduino to program the board. However in order to program this directly you will need a 8mhz crystal on pin 2 and 3 of the ATtiny85.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/bitcows.com\/wp-content\/uploads\/2019\/10\/pinout-arduiono.png\" alt=\"\" width=\"972\" height=\"604\" class=\"alignnone size-full wp-image-1780\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/bitcows.com\/wp-content\/uploads\/2019\/10\/attiny85_pinout.jpg\" alt=\"\" width=\"4919\" height=\"1142\" class=\"alignnone size-full wp-image-1778\" \/><\/p>\n<h1>\nATtiny Header AVR<br \/>\n<\/h1>\n<p>You might want to look at these articals for more information on prgraming an ATTiny84<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"tYsJ81z9ST\"><p><a href=\"https:\/\/bitcows.com\/atiny85-breathing-light-using-an-arduinio\/\">Program a ATtiny85 SOIC 8 using an Arduino<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" title=\"&#8220;Program a ATtiny85 SOIC 8 using an Arduino&#8221; &#8212; Bitcows\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/bitcows.com\/atiny85-breathing-light-using-an-arduinio\/embed\/#?secret=tYsJ81z9ST\" data-secret=\"tYsJ81z9ST\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe> <\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"ua6GrNWdOg\"><p><a href=\"https:\/\/bitcows.com\/attiny-breadboard-headers-attiny-452585\/\">ATtiny breadboard headers (ATtiny 45\/25\/85)<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" title=\"&#8220;ATtiny breadboard headers (ATtiny 45\/25\/85)&#8221; &#8212; Bitcows\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/bitcows.com\/attiny-breadboard-headers-attiny-452585\/embed\/#?secret=ua6GrNWdOg\" data-secret=\"ua6GrNWdOg\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h1>\nArduino Code<br \/>\n<\/h1>\n<pre class=\"prettyprint\">\n\/*\nRick Head\n\nDarren Mason\nbitcows.com\n10\/29\/2019\n\n*\/\nunsigned long csSum;\nint looptype = 1;\nint touchPad = 4;\nint orange = 3; \/\/IO1 pin 7\nint green = 2; \/\/IO3 pin 2\n\nint state = HIGH;\nint r;\nint p = LOW;    \nlong time = 0;       \nlong debounce = 200;\n\nvoid setup()\n{   \n    pinMode(orange, OUTPUT);\n    pinMode(green, OUTPUT);\n}\n\nvoid loop()\n{\n\n\/\/8mhz\n        if (looptype == 0) { \/\/blink orange and green\n            digitalWrite(orange, HIGH);\n            delay(20);\n            digitalWrite(orange, LOW);\n            delay(20);\n            digitalWrite(green, HIGH);\n            delay(20);\n            digitalWrite(green, LOW); \n    \n        } else if (looptype == 1) { \/\/hyperflash both\n            digitalWrite(orange, HIGH);\n            delay(5);\n            digitalWrite(orange, LOW);\n            delay(0);\n            digitalWrite(green, HIGH);\n            delay(5);\n            digitalWrite(green, LOW);\n        } else if (looptype == 2) { \/\/blink Green\n            digitalWrite(green, HIGH);\n            delay(10);\n            digitalWrite(green, LOW);\n            delay(10);\n        } else if (looptype == 3) { \/\/slow flash both\n            digitalWrite(orange, HIGH);\n            delay(10);\n            digitalWrite(orange, LOW);\n            delay(10);\n        }else if (looptype == 4){\n          digitalWrite(green, HIGH);        \n        }else {\n          digitalWrite(orange, HIGH);\n        }\n\n\n     r = digitalRead(touchPad);\n    if (r == HIGH && p == LOW && millis() - time > debounce) {\n      if (state == HIGH && looptype <= 5)\n        looptype = looptype + 1;\n      else \n        looptype = 0;\n        \n      time = millis();    \n\t  delay(200);\n    }\n    \n    p = r;      \n}\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Pinout for version 1.0.2 Arduino You can use the Arduino to program the board. However in order to program this directly you will need a 8mhz crystal on pin 2 and 3 of the ATtiny85. ATtiny Header AVR You might want to look at these articals for more information on prgraming an ATTiny84 Program a&hellip;<\/p>\n<p class=\"more-link\"><a href=\"https:\/\/bitcows.com\/?p=1766\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":2287,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,12],"tags":[33,34,39],"class_list":["post-1766","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-badge","category-electronics","tag-arduino","tag-badges","tag-defcon"],"_links":{"self":[{"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/posts\/1766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcows.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1766"}],"version-history":[{"count":1,"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/posts\/1766\/revisions"}],"predecessor-version":[{"id":2283,"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/posts\/1766\/revisions\/2283"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcows.com\/index.php?rest_route=\/wp\/v2\/media\/2287"}],"wp:attachment":[{"href":"https:\/\/bitcows.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcows.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcows.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}