Arduinoã¯ãç§ã®ãããªåªããèªå®¶è£œãã©ãããã©ãŒã ã§ãã
å¿«é©ã§ããã¹ãŠããã§ã«ããã«ãããŸãã
åé¡ã¯äœã§ããïŒ
誰ãããœãããŠã§ã¢ã®éšåãæ°ã«å ¥ã£ãŠããããã§ã¯ãããŸããã Arduino IDEã¯ç¹ã«ã²ã©ãã§ãã åãã¡ã€ã«ã¯æ°ãããŠã£ã³ããŠã§éãã空ã®å®è¡äžã®IDEãŠã£ã³ããŠãæ®ããŸãã ãããŠãVisual StudioãBorland / Embarcadero RAD IDEã®å©äŸ¿æ§ã«æ £ããŠããä»ã®ãã€ããŒãªãã³ã»ã³ã¹ã¯ãäžæºãåŒãèµ·ãããäžå¿«æãåŒãèµ·ãããŸãã
ããããã奜ããªIDEã䜿çšã§ããŸãã ã³ã³ãã€ã«ããŠãã©ãã·ã¥ããã ãã®æ¢æã®ãããžã§ã¯ãããç¬èªã®ãã©ã€ã¢ã«ã¯ã©ããã®å ŽåãArduino IDEã§ã³ã³ãã€ã«ãããWiringã¹ã¿ããéåžžã«é©ããŠããŸãã
䟿å®äžãVisual Micro Arduinoã䜿çšããŸã-Visual Studioã®äŸ¿å©ããé«éã³ã³ãã€ã«ãæšæºçãªæ段ã«ãããã¡ãŒã ãŠã§ã¢ã
Arduino IDEãªãã®Arduino
ãã€ã¯ãã³ã³ãããŒã©ã䜿çšããçŽæ¥æäœã¯1ã¹ãããé«ããããèªç±ã«äœã§ãã§ããŸãã å€ãã®å Žåãããã¯Arduinoã©ã€ãã©ãªã®è©°ã蟌ã¿ãç解ããããã䟿å©ã§ãã ãã ããAVR StudioãŸãã¯ãµãŒãããŒãã£ã®IDEããã³Atmelã³ã³ãã€ã©ã®ããããã䜿çšããå¿ èŠããããŸãïŒãããããããšã«ãå®å šã«ç¡æã§AVRããŒã«ã«å«ãŸããŠããŸãïŒã
ãã¹ãŠã¯åé¡ãªãã§ããããã圌ãã¯Arduinoã«ã€ããŠäœãç¥ãããããããã©ãã·ã¥ã§ããŸããã ãããŠãããããäžäŸ¿ãå§ãŸããŸãã
詳现ã«èå³ããªãå Žåã¯ããã€ã³ãã«çŽæ¥é²ã¿ã ããŠã³ããŒãããŠæ§æããŸã ã
AVR Studioã¯è¯ãç°å¢ã§ãããããŒãžã§ã³4ã¯ããªãåå§çã§ã5çªç®ã¯éãã§ãã ãã¡ãŒã ãŠã§ã¢ããã°ã©ã以å€ã¯ããã©ãã·ã¥ã®æ¹æ³ãç¥ããŸããã åŸ ã¡äŒãã
AVRISPããã°ã©ããŒã®ãµããããŠãAVR Studioãšäºææ§ã®ããããŒãããŒããŒãããžã§ã¯ããåããŸããã AVR Studioã§ã®ã€ã³ã¿ãŒãã§ãŒã¹ã¯ãæãæåãããã®ãšã¯ã»ã©é ããã®ã§ããã
ã©ããã
AVRDUDEããããŸã-ATMELãã€ã¯ãã³ã³ãããŒã©ãŒã®ã»ãŒãã¹ãŠã®ããã°ã©ããŒã§åäœããç¡æã®ãã©ãã·ã£ãŒã§ãã ãããã圌ã¯ã³ã³ãœãŒã«ã§ãã ããã¯åé¡ã§ã¯ãªãããã§ãcmdãã¡ã€ã«ãŸãã¯batãã¡ã€ã«ãªã©ãäœæããã³ã³ãã€ã«ããã³ããžãã¹å šäœã®åŸã«å®è¡ããŸãã ããããç§ã¯ãããããå€ãã®äººãšåæ§ã«ãè€æ°ã®ããŒããæã£ãŠããŸãã ãŸããåArduinoããŒãã¯ãã·ã¹ãã å ã§åå¥ã®COMããŒããšããŠèªèãããŸãã ãã¹ãŠã®ããã°ã©ããã ããŒãã«ã¯ç°ãªããã€ã¯ãã³ã³ãããŒã©ãŒïŒAtmega168PãAtmega328PïŒããããŸãã èªå®¶è£œã®Arduinoäºæã®ãã¶ãŒããŒããšã¯å¥ã«ã裞ã®ãã€ã¯ãã³ã³ãããŒã©ãŒãšããŒãã¹ãåããŠããŸãã
batãã¡ã€ã«ã«ç»ããç°ãªãããŒãã®èšå®ãç·šéããããå¥ã®ã¢ããªã±ãŒã·ã§ã³ã«åãæ¿ããŠãã¡ãŒã ãŠã§ã¢çšã«å®è¡ãããã³ã«ãã³ãŒãå ã®æ°ãã€ããå€æŽãããã©ããã確èªãããã³ã«ãç§ã¯éå±ããå€ãã®ãšã©ãŒããããã³ã³ãããŒã©ãŒã¯é·ç¶ãããŸããã ããã«æªãããšã«ãFTBBããã°ã©ããŒã§åäœããavrdudeã®åå¥ããŒãžã§ã³ã®ã¿ãããããããarduinoã«ã€ããŠäœãç¥ããªãã ãããã£ãŠããã©ãã·ã¥ããå Žåã¯ãå¥ã®batãã¡ã€ã«ãä¿æããå¿ èŠããããŸãã
æžåŒèšå®æ©èœãšã³ãŒãæäœã®å©äŸ¿æ§ã®ç¹ã§ç§ãæ°ã«å ¥ã£ãCode :: Blocks IDEã§ã¯ãå€éšãŠãŒãã£ãªãã£ã«ãã©ã¡ãŒã¿ãŒãæž¡ãããšãã§ããªãéããç¶æ³ã¯ãããã«æ¹åãããŸãã
èªååã¯å¿ èŠãªãã©ã¡ãŒã¿ãŒã§avrdudeãéå§ããŸã
ãã®ç¶æ³ã«ããããããŠããã®ã§ãã³ãã³ãã©ã€ã³ã§2ã€ã®ãã©ã¡ãŒã¿ãŒãåãåãå°ããªããã°ã©ã ãäœæããŸããã
-æ§æãã¡ã€ã«ã®åå
-ãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«å
ãŠãŒãã£ãªãã£ãŒèªäœã¯ãæ§æãã¡ã€ã«ã§æå®ããããã©ã¡ãŒã¿ãŒïŒãã©ãã·ã¥çšã®æ¢æã®èšå®ãæã€ãã¡ã€ã«ã®ã¿ïŒã§avrdudeãèµ·åãããã¡ãŒã ãŠã§ã¢ãåŸ æ©ããŠéããŸãã ããã«ããããããã°äžã«ã³ãŒã::ãããã¯ããçŽæ¥2ã¯ãªãã¯ã§ãããžã§ã¯ããæ¢åã®ãã€ã¯ãã³ã³ãããŒã©ãŒã«ãã©ãã·ã¥ã§ããŸãã
1ã€ã®ãã©ã¡ãŒã¿ãŒã§éå§ããå Žåã察å¿ããæ§æãã¡ã€ã«ãèªã¿åããŸãã2ã€ã®ãã©ã¡ãŒã¿ãŒã§éå§ããå Žåã2çªç®ã®ãã©ã¡ãŒã¿ãŒãããã¡ãŒã ãŠã§ã¢ãèªåçã«å ¥åããããšããŸãã
èå³ãããå Žåã¯ã AVRDudeRãããŠã³ããŒãããŠãã ãã
IDEã«çµ±åããã®ã¯éåžžã«ç°¡åã§ãïŒè¡ããããé·ã話ããŸãïŒã
[ããŒã«]ã¡ãã¥ãŒã«2ã€ã®ã¡ãã¥ãŒé ç®ãè¿œå -èšå®ã®å€æŽãšãã¡ãŒã ãŠã§ã¢çš
èšå®ãå€æŽããã«ã¯ã以äžãèŠå®ããŸãã
ãã¡ãŒã ãŠã§ã¢ã®å ŽåïŒ
å®éããããã¯èšå®ã«ç»é²ãããŠããŸãã æåã®ãã©ã¡ãŒã¿ãŒã¯avrdude.iniãã¡ã€ã«ã§ããããžã§ã¯ããã©ã«ããŒã«ã»ããã¢ãããããšãã«ä¿åããŸãã2çªç®ã®ãã©ã¡ãŒã¿ãŒã¯ãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã®ååã§ãã
ã»ããã¢ããããã»ã¹ã¯æ¬¡ã®ããã«ãªããŸãã
- ããã°ã©ããŒãŸãã¯ArduinoããŒããæ¥ç¶ããŠãç®çã®COMããŒããã·ã¹ãã ã«è¡šç€ºãããããã«ããŸãã
- [ããŒã«]-> [R AVRduderïŒã»ããã¢ãã]ãå®è¡ããèšå®ãéžæããŠããããžã§ã¯ãã®ãã£ã¬ã¯ããªã«avrduder.iniïŒãŸãã¯èšå®ã§æå®ãããååïŒã®äžã«èšå®ãã¡ã€ã«ãä¿åããŸãã ãŠãŒãã£ãªãã£ãéããŸã
ãããžã§ã¯ããã³ã³ãã€ã«ããããã¡ãã¥ãŒã®ããŒã«-> R AVRDudeRïŒFlashãéžæããŠå®äºã§ãã
avrdudeã®äž¡æ¹ã®ããŒãžã§ã³ã¯ãã§ã«ã¢ãŒã«ã€ãã«å«ãŸããŠãããããAVRDudeRã§äœããæ§æãŸãã¯ç»é²ããå¿ èŠã¯ãããŸããã
èšå®ã«ã€ããŠå°ãïŒ
MCU-ãã€ã¯ãã³ã³ãããŒã©ãŒïŒã³ãã³ãã©ã€ã³avrdudeããã°ã©ã ã®åãããããååãšã³ãŒãã¯mcu.lstããååŸïŒ
ããã°ã©ããŒã¯ããã°ã©ããŒã§ãã FTBBãISPããã°ã©ããŒãšããŠé©åãªãã¡ãŒã ãŠã§ã¢ïŒArduinoISPïŒãåããArduinoããŸãã¯çŽæ¥æ¥ç¶ãããArduinoã ïŒprograms.lstãã¡ã€ã«ã®ããã°ã©ããŒè¡ã®ã¡ãã¥ãŒé ç®ãšã³ãŒãã®ããã¹ãïŒ
ããŒã ïŒå®éã«ã¯ãããã°ã©ããŒãŸãã¯Arduinoã®COMããŒãïŒãããã£ãŠãæ§æäžã«ããŒããæ¥ç¶ããå¿ èŠããããŸãïŒã
ããŒã¬ãŒã ïŒããŒãé床ã UNO-57600ãUNO-115200ãŸã§ã®Arduinoã®å ŽåãããŒãããŒããŒã§èšå®ãããã®ãããããŸãããFTBBã¢ãŒãã§ã¯ãã®ãã©ã¡ãŒã¿ãŒã¯ç¡èŠãããŸãã
ãã¥ãŒãã¿ã€ã ïŒããã§ã䜿çšããavrdude-éåžžãŸãã¯FTBBããã°ã©ããŒãéžæããŸãã
Jackdaw Show Result-ãã¡ãŒã ãŠã§ã¢ããã»ã¹ã衚瀺ãããŠãããã¡ãŒã ãŠã§ã¢ã§ãŠã£ã³ããŠãéããŸããèå³ããªãããã¹ãŠãæ£åžžã«æ©èœããŠãããšç¢ºä¿¡ããŠããå Žåãããã眮ããªãã§ãã ãããavrdudeãçµäºããŠçµäºãããšãããã°ã©ã ã¯ã¡ãã»ãŒãžã衚瀺ããŸãã
ããã°ã©ã èªäœã䜿çšããŠãåã蟌ã¿ãªãã§ãã¡ãŒã ãŠã§ã¢ãçŽæ¥ã¢ããããŒãã§ããŸãã
[ãã¡ãŒã ãŠã§ã¢]ãã£ãŒã«ããããã«ã¯ãªãã¯ãããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ãéžæããïŒãŸãã¯åã«ãã¡ã€ã«ãžã®ãã¹ãæã§æ¿å ¥ããïŒã ãã§ã[ãã¡ãŒã ãŠã§ã¢ã®ãã©ãã·ã¥]ãã¯ãªãã¯ããŸãã ãã®å Žåãæ§æãã¡ã€ã«ãæ©èœããŸãã
ã³ã³ãããŒã©ãŒãå€æŽããããå¥ã®ããã°ã©ããŒãä»ããŠå¥ã®ããŒãã«æ¥ç¶ããå Žåã¯ãïŒããŒã«ïŒ->ïŒR AVRDuderïŒã»ããã¢ããïŒãéžæããã ãã§ããã®ãããžã§ã¯ãã®èšå®ïŒãŸãã¯ãããžã§ã¯ããã©ã«ããŒã«avrduder.iniããªãå Žåã¯ããã©ã«ãèšå®ïŒã®ãã¡ã€ã«ãéããŸãã ããŒããŸãã¯ããã°ã©ããŒãã³ã³ãããŒã©ãŒããŸãã¯ããã§å€æŽããããã®ãå€æŽããavrduder.iniããããžã§ã¯ããã©ã«ããŒã«ä¿åããŸãã ããã ãã§ã
ã¯ããåãããŒã/ããã°ã©ããŒã§äœæ¥ããŠããå Žåãavrdude.iniããããžã§ã¯ãéã§ç°¡åã«ãã©ãã°ã§ããŸãã ãããæ°ãããããžã§ã¯ãã®ãã©ã«ãã«ã³ããŒããã ãã§ãäœãèšå®ã§ããŸããã
ãããç§ã¯å°ãå¿ããŠããŸãããCodeïŒBlocksã§GNU AVR GCC CompilerãéžæããAVR Toolsã®ãã©ã«ããŒã®ã¿ãæå®ããŸããã ãããŠããããžã§ã¯ãã¯æ¬¡ã®ããã«èšå®ãããŸããã
次ã«ãã³ã³ãã€ã©ãŒã¯.elf.hexãã¡ã€ã«ãäœæããŸãããããã¯ãã©ãã·ã¥ããŠããŸãã ç°ãªãå Žåã¯ãAVRDudeRã«æž¡ã2çªç®ã®ãã©ã¡ãŒã¿ãŒãå€æŽããŠããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã®ååã転éããããã«ããŸãã
ããã«ããããããžã§ã¯ããã³ã³ãã€ã«ããŠåãããã³ã«ããããã®pã¿ããããã®ã§ã¯ãªãã誰ãã®ç¥çµãç¯çŽããçç£æ§ãé«ããã¢ã€ãã¢ã®å®éã®äœæ¥ã«éäžã§ããããã«ãªããŸãã
ãŠãŒãã£ãªãã£ãæçšã§ãããšå€æããå Žåã¯ãå¥åº·ç¶æ ã§äœ¿çšããŠãã ããã
UPDãŠãŒãã£ãªãã£ã¯ãŸã 䟿å©ã§ã ã
Googleã³ãŒãã§å©çšå¯èœãªæ°ããããŒãžã§ã³