{"id":544,"date":"2015-04-20T22:43:05","date_gmt":"2015-04-20T13:43:05","guid":{"rendered":"https:\/\/hack.gpl.jp\/?p=544"},"modified":"2015-04-20T22:43:05","modified_gmt":"2015-04-20T13:43:05","slug":"post-544","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2015\/04\/20\/post-544.html","title":{"rendered":"\u30bf\u30c3\u30c1\u30bb\u30f3\u30b5\u30fc\u4ee3\u308f\u308a\u306b\u3057\u3066\u307f\u308b"},"content":{"rendered":"

FDD \u3092\u3088\u304f\u898b\u3066\u307f\u305f\u3089\u3001\u30bb\u30f3\u30b5\u30fc\u3063\u307d\u3044\u306e\u3092\u767a\u898b\u3002\u57fa\u76e4\u3092\u307f\u308b\u3068\u306a\u306b\u3084\u3089\u914d\u7dda\u304c\u3042\u3063\u3066\u3002\u4f7f\u3048\u308b\u304b\u3082\u3068\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<\/p>\n

\"IMG_0148\" <\/p>\n

\u88cf\u9762\u306b\u306f\u57fa\u76e4\u304c\u3042\u3063\u3066\u3001\u306a\u306b\u3084\u30893\u672c\u7dda\u304c\u51fa\u3066\u307e\u3059\u3002<\/p>\n

\"IMG_0149\" <\/p>\n

\u30d6\u30eb\u30fc\u3092GND\u306b\u3001\u9ec4\u8272\u3068\u8d64\u306e\u30a2\u30ca\u30ed\u30b0\u5024\u3092\u8aad\u3093\u3067\u30bb\u30f3\u30b5\u30fc\u4ee3\u308f\u308a\u306b\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n

 <\/p>\n

\u30b3\u30fc\u30c9\u306f\u3053\u3093\u306a\u306e\u3092\u30c6\u30b9\u30c8\u3067\u66f8\u304d\u307e\u3057\u305f\u3002<\/p>\n

\/*\n Junk FDD Stepper Motor Control Sample.\n Analog Censer?\n JunkHack 2015.04.19\n *\/\n \n#include <Stepper.h>\nint steps;\nint movement = 1400;\nint Delay = 200;\nint dirPin = 2;\nint stepPin = 3;\nint a0; \/\/ sencer ?\nint a1; \/\/ sencer ?\n\nvoid setup() {                \n  pinMode(dirPin, OUTPUT);\n  pinMode(stepPin, OUTPUT);\n  digitalWrite(dirPin, LOW);\n  digitalWrite(stepPin, LOW);\n  steps = 1;\n\/\/  Serial.begin(9600);      \/\/ debug\u7528\n  a0 = analogRead(0);\n  a1 = analogRead(1);\n}\n\nvoid loop() {\n  if ( a0 > 200 ){ \/\/ \u30bb\u30f3\u30b5\u30fc\u3063\u307d\u3044\u306e\u3092\u8aad\u307f\u53d6\u308a\n      digitalWrite(stepPin, HIGH);\n      delayMicroseconds(Delay);\n      digitalWrite(stepPin, LOW); \n      delayMicroseconds(Delay);\n      steps += 1;\n      \n\/\/      Serial.println("A0");\n\/\/      Serial.println(a0);\n\n  }\n\n  if ( steps < movement ) {        \/\/ \u79fb\u52d5\u91cf\u3092\u8d85\u3048\u3066\u306a\u3051\u308c\u3070\n      digitalWrite(dirPin, HIGH);\n      a0 = analogRead(0);\n      a1 = analogRead(1);\n  } \n  if ( steps > movement  ) {    \/\/ \u79fb\u52d5\u91cf\u3092\u8d85\u3048\u305f\u3089\n      digitalWrite(dirPin, LOW);\n      a0 = analogRead(0);\n      a1 = analogRead(1);\n  }\n\n  if ( steps > movement * 2 ) {    \/\/ \u5f80\u5fa9\u3057\u305f\u3089\n     steps = 1;\n  }\n}<\/pre>\n

 <\/p>\n

\u3059\u308b\u3068\u3001\u7b50\u4f53\u306b\u89e6\u308b\u3068\u30b9\u30a4\u30c3\u30c1\u4ee3\u308f\u308a\u306b\u52d5\u4f5c\uff01<\/p>\n

 <\/p>\n

\u52d5\u753b\u3092\u8f09\u305b\u305f\u307b\u3046\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u3093\u3067\u3059\u304c\u3001\u666e\u6bb5\u7de8\u96c6\u3057\u306a\u3044\u306e\u3067\u6271\u3044\u304c\u3001\u3001\u3001\u3001\u52c9\u5f37\u3057\u3066\u304a\u304d\u307e\u3059<\/strike>\u3002\u3067\u3001\u52d5\u753b\u3064\u304f\u308a\u307e\u3057\u305f\u3002<\/p>\n

\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u30bf\u30c3\u30c1\u30bb\u30f3\u30b5\u30fc\u3063\u307d\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n

[youtube https:\/\/www.youtube.com\/watch?v=CoXw4ywPP0g]<\/p>\n

 <\/p>\n

\u3053\u306e\u30bb\u30f3\u30b5\u30fc\u306f\u306a\u3093\u3066\u3044\u3046\u3084\u3064\u306a\u3093\u3067\u3057\u3087\u3046\u304b\u306d\u3002\u3050\u3050\u3063\u3066\u3082\u51fa\u3066\u3053\u306a\u3044\u306e\u3067\u3001\u306a\u3093\u3068\u3044\u3046\u540d\u79f0\u306e\u30bb\u30f3\u30b5\u30fc\u306a\u306e\u304b\u306f\u4e0d\u660e\u3067\u3059\u304c\u3001\u30b9\u30a4\u30c3\u30c1\u3089\u3057\u304d\u306a\u306e\u306f\u78ba\u304b\u3067\u3001\u539f\u7406\u7684\u306b\u9759\u96fb\u5bb9\u91cf\u3068\u304b\u898b\u3066\u3044\u308b\u3093\u3067\u3057\u3087\u3046\u304b\u306d\uff1f \u624b\u3092\u63a5\u8fd1\u3055\u305b\u308b\u3068\u3001\u5024\u304c\u3042\u304c\u308a\u307e\u3059\u3002\u30bf\u30c3\u30c1\u30bb\u30f3\u30b5\u30fc\u306e\u3088\u3046\u306a\u539f\u7406\u306a\u3093\u3067\u3059\u304b\u306d\uff1f\u3069\u306a\u305f\u304b\u3054\u5b58\u77e5\u306e\u65b9\u3001\u901a\u308a\u304c\u304b\u308a\u307e\u3057\u305f\u3089\u30b3\u30e1\u30f3\u30c8\u3092\u3088\u308d\u3057\u304f\u3067\u3059\u3002<\/p>\n

 <\/p>\n

\u3068\u306b\u304b\u304f\u3001\u3053\u306e\u30e2\u30fc\u30bf\u30fc\u3068\u7a3c\u52d5\u90e8\u5206\u306f\u30d7\u30ed\u30c3\u30bf\u30fc\u306e\u3069\u3053\u304b\u306b\u4f7f\u3048\u305d\u3046\u3067\u3059\u3002\u3042\u3068\uff12\u3064FDD\u3092\u3070\u3089\u3057\u30663\u8ef8\u4f5c\u308c\u3070\u3001FDD\u30d7\u30ed\u30c3\u30bf\u30fc\u304c\u3067\u304d\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n

 <\/p>\n

\u305d\u3046\u3001\u3053\u308c\u3092arduino \u3067\u4f5c\u308a\u305f\u3044\u3093\u3067\u3059\u3088\u3002<\/p>\n

[youtube https:\/\/www.youtube.com\/watch?v=Z0vQIaUZGu4]<\/p>\n","protected":false},"excerpt":{"rendered":"

FDD \u3092\u3088\u304f\u898b\u3066\u307f\u305f\u3089\u3001\u30bb\u30f3\u30b5\u30fc\u3063\u307d\u3044\u306e\u3092\u767a\u898b\u3002\u57fa\u76e4\u3092\u307f\u308b\u3068\u306a\u306b\u3084\u3089\u914d\u7dda\u304c\u3042\u3063\u3066\u3002\u4f7f\u3048\u308b\u304b\u3082\u3068\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u88cf\u9762\u306b\u306f\u57fa\u76e4\u304c\u3042\u3063\u3066\u3001\u306a\u306b\u3084\u30893\u672c\u7dda\u304c\u51fa\u3066\u307e\u3059\u3002 \u30d6\u30eb\u30fc\u3092GND\u306b\u3001\u9ec4\u8272\u3068\u8d64\u306e\u30a2\u30ca\u30ed\u30b0\u5024\u3092\u8aad\u3093\u3067\u30bb\u30f3\u30b5\u30fc\u4ee3 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[6,9,45],"tags":[],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"JunkHack","author_link":"https:\/\/hack.gpl.jp\/author\/junkhack\/"},"uagb_comment_info":0,"uagb_excerpt":"FDD \u3092\u3088\u304f\u898b\u3066\u307f\u305f\u3089\u3001\u30bb\u30f3\u30b5\u30fc\u3063\u307d\u3044\u306e\u3092\u767a\u898b\u3002\u57fa\u76e4\u3092\u307f\u308b\u3068\u306a\u306b\u3084\u3089\u914d\u7dda\u304c\u3042\u3063\u3066\u3002\u4f7f\u3048\u308b\u304b\u3082\u3068\u8a66\u3057\u3066\u307f\u307e\u3057\u305f…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/544"}],"collection":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}