¥Ú¡¼¥¸¹¹¿·: 2020-04-29 (¿å) (1062ÆüÁ°)

´ØÏ¢: ÁȤ߹þ¤ß/NVIDIA Jetson

(2015-02-10 ¿·µ¬ºîÀ®)

Raspberry Pi 2 Model B ¤Ë¤Ä¤¤¤Æ¤Î¥á¥â¡£

(´û¸¤Î PC/RaspberryPi ¥Ú¡¼¥¸¤Ï¡¢¤³¤Î¥Ú¡¼¥¸¤Ë½ç¼¡Åý¹ç¤¹¤ë)

Ìܼ¡

[ÊÔ½¸]

¾ðÊó¸» #

[ÊÔ½¸]

Raspberry Pi #

[ÊÔ½¸]

Raspberry Pi 3 #

[ÊÔ½¸]

Raspberry Pi 2 #

[ÊÔ½¸]

Raspberry Pi #

[ÊÔ½¸]

BCM2835/BCM2836, LAN9514, GPIO, SPI, I2C, UART #

BCM2835 SoC:

BCM2836 SoC:

LAN9514:

  • Raspberry Pi Model B ¤Î USB¤ÈLAN¤Ï¡¢BCM2835 SoC ¤ÎUSB ¤Ë LAN9514 ¤òÀܳ¤·¤Æ¤¤¤ë¡£
  • LAN9514 - USB to Ethernet

GPIO:

I2C bug:

etc:

[ÊÔ½¸]

Raspbian #

2015-04-16 »þÅÀ¤Ç¤Ï¡¢ÆüËܤΥߥ顼¥µ¥¤¥È¤Ë¤Ï°Ê²¼¤Î¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¡£

ISO¥¤¥á¡¼¥¸:

¥Ñ¥Ã¥±¡¼¥¸:

2015-04-15 ¤¿¤á¤·¤Ë°Ê²¼¤ÎÀßÄê¤Ë¤·¤Æ¡¢¤É¤Á¤é¤éÊÒÊý¤òÍ­¸ú¤Ë¤·¤Æ¤·¤Ð¤é¤¯ÍͻҤò¸«¤Æ¤ß¤ë¡£ /etc/apt/sources.list

#deb http://ftp.yz.yamagata-u.ac.jp/pub/linux/raspbian/raspbian/ wheezy main contrib non-free rpi
#deb http://ftp.jaist.ac.jp/raspbian/ wheezy main contrib non-free rpi
[ÊÔ½¸]

MINIBIAN (2016-02-01) #

[ÊÔ½¸]

Ubuntu (2020-04-29) #

[ÊÔ½¸]

Windows 10 IoT Core #

[ÊÔ½¸]

RaspBSD #

[ÊÔ½¸]

TOPPERS/ssp #

[ÊÔ½¸]

¦ÌT-Kernel for Raspberry Pi #

¦ÌT-Kernel for Raspberry Pi ¤ª¤Ü¤¨¤¬¤­ (2012-11-06/13)¡§

[ÊÔ½¸]

ARM #

[ÊÔ½¸]

Cortex-A53 (Raspberry Pi 3) (̤Ĵºº) #

[ÊÔ½¸]

Cortex-A7 (Raspberry Pi 2) #

[ÊÔ½¸]

ARM1176JZFS (Raspberry Pi 1) #

[ÊÔ½¸]

³ÈÄ¥¥Ü¡¼¥É #

ü»Ò¤ÎÁḫɽ:

GPIO¤ò°ú¤­½Ð¤¹ (GPIO Breakout):

¤¤¤í¤¤¤í:

³ÈÄ¥¥Ü¡¼¥É HAT (Hardware Attached on Top) µ¬³Ê:

[ÊÔ½¸]

½ñÀÒ #

[ÊÔ½¸]

BareMetal¤ÇÍ·¤ÖRaspberry Pi #

Ãí°ÕÅÀ:

  • Raspberry Pi 1 Type B ¤òÂоݤȤ·¤Æ¤¤¤ë¡£¤¿¤À¤·¡¢¡ÖÉÕÏ¿ D Raspberry Pi Type B+ ¤Ø¤ÎÂбþ¾õ¶·¤Ë¤Ä¤¤¤Æ¡×¤¬¤¢¤ë¡£
[ÊÔ½¸]

Raspberry Pi¤Ç³Ø¤ÖÅŻҹ©ºî #

[ÊÔ½¸]

À©ºîµ­»ö #

[ÊÔ½¸]

¤½¤Î¾ #

[ÊÔ½¸]

¼ºÇÔ¥á¥â #

²ò·èºÑ¤ß:

  • 2015-04-13 ¥·¥ê¥¢¥ëUSB¥³¥ó¥Ð¡¼¥¿¤ò·Ò¤°¤È¤­¡¢Raspberry Pi ¦¤ÎGND¤Ë·Ò¤°¤Ù¤­Àþ¤ò GPIO 4 ¤Ë·Ò¤¤¤Ç¥·¥ê¥¢¥ë¥³¥ó¥½¡¼¥ë¤ò»È¤Ã¤¿¤é¡¢ÃæÅÓȾü¤Ëʸ»ú²½¤±¤·¤¿¡£¿®¹æ¥ì¥Ù¥ë¤¬ÉÔ°ÂÄê¤Ë¤Ê¤Ã¤¿¤Î¤À¤í¤¦¡£
  • 2015-04-13 /etc/rc.local ¤ò½¤Àµ¤·¤¿¤È¤­¡¢´Ö°ã¤Ã¤Æ #! ¤ò£²¤Ä½ñ¤¤¤Æ¤·¤Þ¤¤¡Ê#!#!¤È½ñ¤¤¤¿)¡¢µ¯Æ°»þ¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬½Ð¤Æ¤¿¡£
    /etc/init.d/rc.local: 22: /etc/init.d/rc.local: /etc/rc.local: not found
  • I2C ¤òÍ­¸ú¤Ë¤¹¤ë¤È¤­¡¢rpi-config ¤ÎÀßÄê°Ê³°¤Ë /etc/modules ¤Ë i2c-dev ¤ÎÄɲä¬É¬Íפʤ³¤È¤òÃΤé¤Ê¤«¤Ã¤¿¡£raspi-config ¤ÎÀßÄê¤À¤±¤ÇÎɤ¤¤«¤È»×¤Ã¤Æ¤¤¤¿¡£
  • Raspberry Pi 2 Model B ¤ò 2015-02-07 ¤ËÆþ¼ê¤·¤¿¤Î¤À¤¬¡¢Raspbian 2015-02-16 ÈÇ (Release Note) ¤¬¤Ç¤ë¤Þ¤Ç¡¢¤¤¤í¤¤¤í¤È¤Ï¤Þ¤Ã¤¿¡£

̤²ò·è¡¢Ì¤Ãå¼ê:

  • SPI¡£¥·¥ê¥¢¥ëSRAM¥â¥¸¥å¡¼¥ë 23K256 ¤ò²õ¤·¤Á¤ã¤Ã¤¿¤é¤·¤¤ (GND¤ò·Ò¤¤¤Ç¤ë¤Î¤Ë¿®¹æ¥ì¥Ù¥ë¤¬°ÂÄꤷ¤Ê¤¤) ¤Î¤Ç¡¢¤·¤Ð¤é¤¯¼ê¤òÉÕ¤±¤Æ¤Ê¤¤¡£SRAM ¥Á¥Ã¥×¤ÏÆþ¼êºÑ¤ß¤Çmbed Nucleo F411,L152¤Ç¤Ï¤Á¤ã¤ó¤Èư¤¤¤Æ¤ë¤Î¤À¤¬¡¢Raspberry Pi¤Ç»î¤¹¤Î¤¬¤ª¤Ã¤¯¤¦¡£¤¢¤È EEPROM ¤âÆþ¼ê¤·¤Æ¤¤¤ë¤¬¡¢»î¤·¤Æ¤¤¤Ê¤¤¡£
  • I2C ¤Î¾ÈÅÙ¥»¥ó¥µ¡¼¤ò»î¤·¤Æ¤Ê¤¤¡£mbed ¤Ç¤â³ä¤ÈÌÌÅݤÀ¤Ã¤¿¤Î¤Ç¡£I2C ¤Î EEPROM ¤âÆþ¼êºÑ¤ß¤À¤¬»î¤·¤Æ¤¤¤Ê¤¤¡£¤³¤Á¤é¤â mbed ¤Ç»È¤¦Êý¤¬Ìò¤ËΩ¤Ä¤·¡£
[ÊÔ½¸]

¥á¥â #

[ÊÔ½¸]

DSI (Display Serial Interface) #

[ÊÔ½¸]

Raspberry Pi 7" Touch Screen LCD (2015-09-28) #

7¥¤¥ó¥ÁLCD¥¿¥Ã¥Á¥Ñ¥Í¥ë¡£DPI-DSI ÊÑ´¹¥Ü¡¼¥ÉÉÕ¤­¡£

¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤ËºÜ¤Ã¤Æ¤¤¤ëIC

ÁȤßΩ¤Æ¼ê½ç¡£¤Ê¤ª¡¢RS¥³¥ó¥Ý¡¼¥Í¥ó¥È¤«¤éÆþ¼ê¤·¤¿¤Î¤Ç¡¢È¢¤ÏÇòÈ¢¤Ç¡¢¥Þ¥Ë¥å¥¢¥ë¤ÏÉÕ°¤»¤º¡£

(1) ¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤ÎPANEL 2¥³¥Í¥¯¥¿¤Î¹õ¤¤ÉôÉʤò°ú¤¤¤Æ¡¢LCD¤Î¥±¡¼¥Ö¥ë¤òº¹¤·¹þ¤ó¤Ç¡¢¹õ¤¤ÉôÉʤò¸µ¤ËÌ᤹:

LCD7-PANEL_2.jpg LOD7-Interface-Board.jpg

(2) ¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤ÎPANEL 1¥³¥Í¥¯¥¿¤òÃã¿§¤ÎÉôÉʤò°ú¤¤¤Æ¡¢LCD¤Î¥±¡¼¥Ö¥ë¤òº¹¤·¹þ¤ó¤Ç¡¢Ãã¿§¤ÎÉôÉʤò¸µ¤ËÌ᤹:

LCD7-PANEL_1.jpg

(3) ¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤ÎRPI-DISPLAY¥³¥Í¥¯¥¿¤Î¹õ¤¤ÉôÉʤò°ú¤¤¤Æ¡¢¥±¡¼¥Ö¥ë¤òº¹¤·¹þ¤ó¤Ç¡¢¹õ¤¤ÉôÉʤò¸µ¤ËÌ᤹:

LCD7-Interface-Board-DSI.jpg

(4) LCD¤Î΢¤Ë¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤òÃÖ¤­¡¢¥¹¥Ú¡¼¥µ¡¼4ËܤǤͤ¸Î±¤á¤¹¤ë¡£¥¹¥Ú¡¼¥µ¡¼¤ò²ó¤¹¤¿¤á¤Ë¥Ê¥Ã¥È¥É¥é¥¤¥Ð¡¼(5mm)¤òÍѤ¤¤¿¡£PCÍÑ¥Þ¥¶¡¼¥Ü¡¼¥É¤ÈƱ¤¸·Â¤À¤Ã¤¿:

LCD7-Interface-Board-With-Spacer.jpg LCD7-nut-driver-5mm.jpg

¥¹¥Ú¡¼¥µ¡¼¤Î¤Í¤¸·Â¤Ï2.5¡Á2.6mm¤¯¤é¤¤¡£Ä¹¤µ¤Ï12mm¤À¤¬¡¢7¡Á8mm¤¯¤é¤¤¤Ç¤âÎɤµ¤½¤¦¡£

(5) Raspberry Pi¤ò¥¹¥Ú¡¼¥µ¡¼¤Î¾å¤ËÃÖ¤­¡¢¤Í¤¸Î±¤á¤¹¤ë:

LCD7-RPi.jpg

(6) Raspberry Pi¤ÎDISPLAY¥³¥Í¥¯¥¿¤ÎÇò¤¤ÉôÉʤò°ú¤¤¤Æ¡¢¥±¡¼¥Ö¥ë¤òº¹¤·¹þ¤ó¤Ç¡¢Çò¤¤ÉôÉʤò¸µ¤ËÌ᤹:

LCD7-DSI-Open.jpg LCD7-Rpi-DSI-Close.jpg

(7) ¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤Î 5V½ÐÎϤÈGND¤ò¡¢ÉÕ°¤Î¥¸¥ã¥ó¥Ñ¡¼¥±¡¼¥Ö¥ëÀÖ¡¦¹õ¤Ç Raspberry Pi ¤Î GPIO ¤Î 5V¤ÈGND¤ËÀܳ¤¹¤ë (¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤òRaspberry Pi¤ÎÅŸ»¤È¤·¤ÆÍѤ¤¤ë):

LCD7-Power-5V-GND.jpg

Âå¤ï¤ê¤Ë¡¢¥Ç¥£¥¹¥×¥ì¥¤ÊÑ´¹¥Ü¡¼¥É¤ÎPWR OUT (USB-A) ¤È Raspberry Pi¤ÎPWR IN (microUSB) ¤ò·Ò¤¤¤Ç¤â¤è¤¤¡£

LCD7-Power-USB.jpg

(8) ÅŸ»¤òÅêÆþ¤·¤¿¡£Raspberry Pi 2 Model B, WiFi, LCD¡£Å۵4.80V¡¢ÅÅή 0.76A¡£¤Á¤ç¤Ã¤ÈÅ۵¤¬Ä㤤¡£

LCD7-Console.jpg LCD7-X.jpg LCD7-WiFi-VA.jpg

[ÊÔ½¸]

³ÈÄ¥´ðÈÄ #

[ÊÔ½¸]

UUGear Witty Pi (2015-09-13) #

UUGear Witty Pi ¤Ï¡¢Raspberry Pi ¤òÉáÄ̤ÎPC¤Î¤è¤¦¤Ë¡¢¥¹¥¤¥Ã¥Á¤Çµ¯Æ°¡¢¥¹¥¤¥Ã¥Á¤ä¥³¥Þ¥ó¥É¤Ç¡Ö¥·¥ã¥Ã¥È¥À¥¦¥ó¡×½ÐÍè¤ë¤è¤¦¤Ë¤¹¤ë³ÈÄ¥¥Ü¡¼¥É¡£¤Þ¤¿¡¢¥¿¥¤¥Þ¡¼¤ÇÅŸ»on/off¤â¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£

UUGear (¥Á¥§¥³¶¦Ï¹ñ¡¢¥×¥é¥Ï) ¤«¤éľÀÜÃíʸ¤·¤¿¡£°Â¤¤¤·Web¥µ¥¤¥È¤Îshop¤Î½ÐÍ褬¤è¤«¤Ã¤¿¤Î¤Ç¡£2015-09-13 Ãíʸ¡Êºß¸Ë̵¤·¡Ë¡¢2015-09-22 ½Ð²Ù¡¢2015-09-27 ÆüËÜÃå¡¢2015-09-29 ÇÛãôÅöÍ¹ÊØ¶É¤ËÅþÃå¡£Á¥Êذ·¤¤¤Î¤Ï¤º¤Ê¤Î¤Ç¥·¥Ù¥ê¥¢Å´Æ»·Ðͳ¤«¤Ê¡©

ÆÃħ:

  • Raspberry Pi A+/B+/2 ÍѤγÈÄ¥¥Ü¡¼¥É¡£
  • ²Á³Ê 380.00 CZK + Á÷ÎÁ 100.00 CZK (CZK = ¥Á¥§¥³ ¥³¥ë¥Ê)
  • ÅŸ»¤Ï¤³¤Î¥Ü¡¼¥É¤ËÀܳ¤·¡¢Raspberry Pi¤Ë¤Ï¥Ø¥Ã¥À¥Ô¥ó¤Ç¶¡µë¤µ¤ì¤ë¡£
  • ÅŸ»on/off¥Ü¥¿¥ó
  • ¥ê¥¢¥ë¥¿¥¤¥à¥¯¥í¥Ã¥¯ ¥Ð¥Ã¥Æ¥ê¥Ð¥Ã¥¯¥¢¥Ã¥×ÉÕ¤­
  • ¥¿¥¤¥Þ¡¼¤ÇÅŸ»On, ¥·¥ã¥Ã¥È¥À¥¦¥ó¡£
  • À©¸æ¤Ë¤Ï I2C ¤òÍѤ¤¤ë¡£¥¤¥ó¥¹¥È¡¼¥ë¥¹¥¯¥ê¥×¥È installWittyPi.sh ¤¬ i2c-tools, WiringPi (GPIO,I2C¥é¥¤¥Ö¥é¥ê) ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
  • ¥·¥ã¥Ã¥È¥À¥¦¥ó(HALT)¤ËÍѤ¤¤ëGPIO¤Î¥Ý¡¼¥È¤ÏÊѹ¹¤Ç¤­¤ë¤è¤¦¤À¡£¥¸¥ã¥ó¥Ñ + ¥½¥Õ¥È¥¦¥§¥¢¤ÇÀßÄêÊѹ¹¤é¤·¤¤¡£
  • ÅŸ»¤¬¶¡µë¤µ¤ì¤¿¤È¤­¤Ë¡¢µ¯Æ°¤¹¤ë¤«¤É¤¦¤«¥¸¥ã¥ó¥Ñ¤ÇÁª¤Ù¤ë¤«¤â¡£¤³¤ì¤¬¤¢¤ì¤ÐUPS¤Ë·Ò¤¤¤Ç¡¢ÄäÅŤ«¤éÉüµ¢¤·¤¿¤È¤­¤Ë¼«Æ°Åª¤Ëµ¯Æ°¤¹¤ë¤Ï¤º¡£

¾ðÊó¸»:

¥á¥â

Witty Pi, ÉÕ°ÉÊ:

WittyPi.jpg

ÉÕ°¤Î¥¹¥Ú¡¼¥µ¡¼¤òÉÕ¤±¤ÆWitty Pi¤òÀܳ¤·¤¿¡£ÅŸ»¤Ï Witty Pi¤«¤é ¥Ô¥ó¥Ø¥Ã¥À¤ò²ð¤·¤ÆRaspberry Pi¤Ë¶¡µë¤µ¤ì¤ë:

WittyPi-Rpi.jpg

RS¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¥±¡¼¥¹¤ÎÄì¤À¤±¤òÍѤ¤¤¿¡£¥¹¥Ú¡¼¥µ¡¼¤òΩ¤Æ¤ë¤È¥±¡¼¥¹¤È´³¾Ä¤¹¤ë¤Î¤Ç¡¢¥±¡¼¥¹¤òºï¤Ã¤¿:

WittyPiSpacerCase1.jpg WittyPiSpacerCase2.jpg

Witty Pi ¤Ï2¤ÄÆþ¼ê¤·¤¿¤Î¤Ç¡¢¤â¤¦°ìÂæ¤Ï7inch¥¿¥Ã¥Á¥¹¥¯¥ê¡¼¥óLCD¤È·Ò¤°¡£LCD¤ÎÅŸ»¤âWitty Pi¤Î¥Ô¥ó¥Ø¥Ã¥À¤«¤é¶¡µë¤Ç¤­¤¿:

WittyPiLCD71.jpg

2ÃʽŤͤÀ¤È¥¹¥Ú¡¼¥µ¡¼ÉÕ°¤Î¥Í¥¸¤ò»È¤¨¤Ê¤¤¤Î¤Ç¡¢¥¹¥Ú¡¼¥µ¡¼¤Ê¤·¤Ç»ÈÍÑÃæ:

WittyPiLCD72.jpg WittyPiLCD73.jpg

¥Þ¥Ë¥å¥¢¥ë¤Ë¤è¤ë¤È¡¢¥½¥Õ¥È¥¦¥§¥¢¤Ê¤·¤Ç¤â¥Ü¥¿¥ó¤Ç¤Îµ¯Æ°¤Èshutdown -h¤Ç¤ÎÅŸ»Off¤Ïưºî¤¹¤ë¤È¤Î¤³¤È¡£

2015-10-04

ÉÔ¶ñ¹ç(1) 2Âæ¤Î Witty Pi ¤Î¤¦¤Á¡¢1Âæ¤¬ÉÔÄ´¡£ÌäÂê¡§µ¯Æ°¸å¿ôʬ¤Ç¾¡¼ê¤Ë¥·¥ã¥Ã¥È¥À¥¦¥ó¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£1²óȯÀ¸¤¹¤ë¤È¡¢5²óÄøÅÙ·«¤êÊÖ¤·¤Æ¤âƱ¤¸¡£¤·¤«¤·°ìÅÙȯÀ¸¤·¤Ê¤¯¤Ê¤ë¤È¡¢5²ó·«¤êÊÖ¤·¤Æ¤âȯÀ¸¤·¤Ê¤¤¡£

  • Witty Pi ¤Î¥½¥Õ¥È¥¦¥§¥¢ (GPIO 4 ¤ò¸«¤Æ¡¢fall edge ¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó½èÍý¤ò³«»Ï¤¹¤ë) ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¸å¡¢°Õ¿Þ¤·¤Ê¤¤¥¿¥¤¥ß¥ó¥°¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£ Witty Pi ¤¬¥·¥ã¥Ã¥È¥À¥¦¥ó¤Ë»È¤¦ GP4 ¥¸¥ã¥ó¥Ñ (GPIO 4) ¤ò̵¸ú (CUSTOM¤ËÀÚÂØ) ¤Ë¤¹¤ë¤ÈȯÀ¸¤·¤Ê¤¤¤Î¤Ç¡¢GP4 ¤Î¿®¹æ¥ì¥Ù¥ë¤¬ÉÔ°ÂÄê¤Ê¤è¤¦¤À¡£
  • Raspberry Pi ¤È Witty Pi¤ò·Ò¤¤¤À¸å¡¢¥ª¥·¥í¥¹¥³¡¼¥×¤Ç¥Ø¥Ã¥À¥Ô¥ó¤Î7ÈÖ(GPIO 4) ¤È9ÈÖ(GND)¤Î´Ö¤ÎÅ۵ÇÈ·Á¤ò´Ñ¬¤·¤¿¡£
    • GP4 jumper ¤òÈ´¤¤¤¿¤È¤­¡¢3.3V
    • GP4 jumper ¤ò»Ø¤·¤¿¤È¤­¡¢2.280V
    • Witty Pi ¤ÎÅŸ»¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢2.280V ¤À¤¬¡¢¤·¤Ð¤é¤¯(¿ô½½É䯤餤) ¤Ï¡¢¤¿¤Þ¤Ë 1.240V ¤¯¤é¤¤¤Þ¤Ç¥Ñ¥ë¥¹¾õ¤Ë²¼¤¬¤ë¡£
    • ¥È¥ê¥¬¡¼¤ò fall edge, 1.320V ¤Ë¤·¤¿¤È¤³¤í¡¢10¡Á50us¤ÎÉý¤Ç1.200V¤Þ¤ÇÅ۵¤¬Äã²¼¤¹¤ë¡£¤Þ¤¿¡¢¤³¤ì¤¬130msÄøÅ٤λþ´Ö¡¢·«¤êÂØ¤¨¤µ¤ì¤ë¡£ ¤³¤Î¤É¤³¤«¤ÇLow¥ì¥Ù¥ë(ÉÔÌÀ¤À¤¬0.8V¤¯¤é¤¤?) ¤Ë㤷¤ÆGPIO 4¤¬LOW¤Ë¤Ê¤ê¡¢¥·¥ã¥Ã¥È¥À¥¦¥ó¤¬³«»Ï¤µ¤ì¤ë¡£¤â¤·¤«¤¹¤ë¤È¡¢ÅŸ»Onľ¸å¤Î¥Ñ¥ë¥¹¤ÈƱ¤¸?
[ÊÔ½¸]

LCD, SW, LED ´ðÈÄ (ºîÀ®Ãæ) (2015-05-31) #

(ºîÀ®Ãæ)

LCD(16·å2¹Ô), USB¥·¥ê¥¢¥ë, ¥¿¥¯¥È¥¹¥¤¥Ã¥Á (¥·¥ã¥Ã¥È¥À¥¦¥óÍÑ), ÅŸ»LED, GPIOÀ©¸æLED ¤òºÜ¤»¤¿´ðÈĤò¡¢Raspberry Pi 2 ¤Î¾å¤ËºÜ¤»¤é¤ì¤ëÂ礭¤µ¤Çºî¤ë¡£

LCD¤Ë¤ÏÄ̾ï¤ÏIP¥¢¥É¥ì¥¹¤òɽ¼¨¤·¤¿¤¤¡£µ¯Æ°¡¢¥·¥ã¥Ã¥È¥À¥¦¥ó¡¢ºÆµ¯Æ°¤Î¤È¤­¤Ï¤½¤Î»Ý¤òɽ¼¨¤·¤¿¤¤¡£

USB¥·¥ê¥¢¥ë¤ÏɬÍפʤȤ­¤À¤±¼è¤êÉÕ¤±¤ë¤Î¤Ç¥Ô¥ó¥½¥±¥Ã¥È¤òÉÕ¤±¤ë¡£LCD¤â¥Ô¥ó¥½¥±¥Ã¥È¤ò²ð¤·¤ÆºÜ¤»¤ë¤«¤â¡£

40¥Ô¥ó¥±¡¼¥Ö¥ë¤âÀܳ¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¡£¤Þ¤¿¡¢´ðÈĤÏÊ£¿ôËç¡¢ÀѤ߽Ťͤé¤ì¤ë¤è¤¦¤Ë¤·¤¿¤¤¡£

¤Ç¤­¤ì¤Ð¡¢¥±¡¼¥¹¤ËÆþ¤ì¤Æ¤â»È¤¨¤ë¤â¤Î¤âºî¤ê¤¿¤¤¡£

¥Ñ¡¼¥Ä:

ÇÛÀþ¿Þ:

  • ÉôÉʤÏɽ¤ËÇÛÃÖ¤·¡¢ÇÛÀþ¤ÏJ1¦¤Î¥¹¥ë¡¼¥Û¡¼¥ë¤Ë¤Ï¤ó¤À¥Ö¥ê¥Ã¥¸¤äÅÅÀþ¤Ç΢¦¤Ø²ó¤¹¡£

    raspi-hat-lcd_board.png

²¾ÁȤß: Ï¢·ë¥Ô¥ó¥½¥±¥Ã¥È 2¡ß20(40P) ¤È ξÌÌ¥¹¥ë¥Û¡¼¥ë¡¦¥¬¥é¥¹¡¦¥æ¥Ë¥Ð¡¼¥µ¥ë´ðÈÄ C¥¿¥¤¥×:

raspi-hat-lcd-001.jpg raspi-hat-lcd-005.jpg

²¾ÁȤß: Ï¢·ë¥Ô¥ó¥½¥±¥Ã¥È 2¡ß20(40P), ´ðÈÄ, LCD, ¥¿¥¯¥È¥¹¥¤¥Ã¥Á, USB¥·¥ê¥¢¥ë, ¥ê¥Ü¥ó¥±¡¼¥Ö¥ë:

raspi-hat-lcd-002.jpg raspi-hat-lcd-003.jpg

²¾ÁȤß: ¥±¡¼¥¹¤Î¾å¤ËºÜ¤»¤Æ¤ß¤¿¡£´ðÈĤ¬¼ã´³Â礭¤¤:

raspi-hat-lcd-004.jpg

²¾ÁȤß: ¥±¡¼¥¹¤ËÆþ¤ë¤è¤¦¤Ë´ðÈĤò¥«¥Ã¥È¤·¤¿¡£¥é¥ó¥É¤Î¸Ä¿ô¤Ï20¡ß17¸Ä¡£Ï¢·ë¥Ô¥ó¥½¥±¥Ã¥È¤¬¥±¡¼¥¹¾åÌ̤«¤é¤Ï¤ß½Ð¤ë¤Î¤Ç³¸¤òÊĤá¤ë¤Î¤Ï¤¢¤­¤é¤á¤¿:

raspi-hat-lcd-006.jpg raspi-hat-lcd-007.jpg

[ÊÔ½¸]

GPIO ¥¨¥¯¥¹¥Æ¥ó¥·¥ç¥ó¥Ü¡¼¥É (2015-04-30) #

¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ò¤È¤Ã¤«¤¨¤Ò¤Ã¤«¤¨¤¹¤ë¤È¤­¤ËÊØÍø¤«¤â¤È»×¤Ã¤Æ¹ØÆþ¤·¤¿¡£

¾ðÊó¸»:

1. ¥é¥º¥Ù¥ê¡¼¥Ñ¥¤£Â¡Ü¡¿£Á¡ÜÍÑ¥Ö¥ì¥Ã¥É¥Ü¡¼¥ÉÀܳ¥­¥Ã¥È - ½©·îÅÅ»ÒÄ̾¦

  • Raspberry Pi Model B+, A+, Raspberry Pi 2 Model B ÍÑ¡£
  • ¥·¥ë¥¯°õºþ¤Ï¡ÖAE-RBPI-BOB40¡×
  • ¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¦¤ÎÉý¤Ï 12.2 mm (¼Â¬) ¤Ç¡¢¤ï¤º¤«¤Ë¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤Î·ê¤ËÈ蘆¤Ã¤Æ¤¤¤ë¡£
  • ´ðÈĤÀ¤±¤À¤È¡ï300-¤Ê¤Î¤À¤±¤É¡¢¤µ¤é¤Ë £²£ø£²£°¡Ê£´£°£Ð¡Ëξü¥³¥Í¥¯¥¿Éգɣģåê¥Ü¥ó¥±¡¼¥Ö¥ë¡Ê¥Õ¥é¥Ã¥È¡¦¥±¡¼¥Ö¥ë¡Ë ¤òÇ㤦¤è¤ê¤â¤³¤Î¥­¥Ã¥È¤ÎÊý¤¬°Â¤¤¡£
  • ¼Â¤Ï¡¢DNC¥Ô¥ó(Don't Connect?) Éôʬ¤ÇÀޤäÆ26pin¤Ç»È¤ª¤¦¤È¤·¤¿¤Î¤À¤±¤É¡¢ÇÛÀþ¤ò¸«¤ë¤È¤¤¤Ã¤¿¤óÀèÆ¬¤Ë¹Ô¤Ã¤Æ¤«¤éÀÞ¤êÊÖ¤·¤Æ¤ë¤è¤¦¤Ç¡¢ÀÞ¤ë¤È2Îó¤Î¤¦¤ÁÊÒ¦¤¬»È¤¨¤Ê¤¯¤Ê¤ê¤½¤¦¤Ê¤Î¤ÇÃÇǰ¤·¤¿¡£

AE-RBPI-BOB40KIT-001.jpg

2. Raspberry Pi GPIO¥¨¥¯¥¹¥Æ¥ó¥·¥ç¥ó - aitendo (V2.2¡£2015-05-04 »þÅÀ¤Ç¤Ïºß¸ËÀÚ¤ì), Raspberry Pi GPIO¥¨¥¯¥¹¥Æ¥ó¥·¥ç¥ó¡ÊV3.0¡Ë - aitendo

  • Raspberry Pi Model A, B ÍÑ¡£
  • Ʊ¤¸Êª¤Ï "Extension Board V2.2" - Google ¸¡º÷ ¤ä "Raspberry Pi GPIO Extension Board" - Google ¸¡º÷ ¤Ç¸«¤Ä¤«¤ë¡£Â¾¤Ë V1.0 ¤ä V2.0, V2.1, V3.0 ¤â¸«¤Ä¤«¤ë¤¬º¹¤ÏÉÔÌÀ¡£
  • ¥·¥ë¥¯°õºþ¤Ï¡ÖRaspberry-Pi-GPIO Extension Board V2.2¡×¡ÖDesigned by ArduinoKing¡×¡ÖSupport By: WiringPi & ArduPi¡×
  • ¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¦¤ÎÉý¤Ï 10.6 mm (¼Â¬)
  • GPIO ¦¤Ï P0¡ÁP7 ¤Î8ËÜ¡£¥Æ¥¹¥¿¡¼¤ÇÄ´¤Ù¤¿¤È¤³¤í¡¢P0 ¡Á P6 ¤Ï Raspberry Pi 1 Model B ¤Î²óÏ©¿Þ Raspberry-Pi-R2.0-Schematics-Issue2.2_027.pdf ¤Î 2B4 (2¥Ú¡¼¥¸ÌÜB4) ¤ä 2E4 ¤Î GPIO_GEN0 ¡Á GPIO_GEN6 ¤ÈƱ¤¸½ç¤À¤Ã¤¿¡£P7 ¤Ï°Û¤Ê¤ë¤¬¡£(GPIO 4 = GPIO_GCLK)
  • ¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ÎÃæ±û¤ËÁÞ¤¹¸Ä½ê¤Ë9pin ¡ß2Îó¤ÈºÇ¾®¸Â¤À¤¬ Raspberry Pi Model B¤Î26¥Ô¥óʬ¤Î¿®¹æ¤Ï¤¹¤Ù¤ÆÍѰդµ¤ì¤Æ¤¤¤ë¡£B+/A+/2B¤Î40¥Ô¥ó¤¹¤Ù¤Æ¤ò»È¤ï¤Ê¤¤ÍÑÅӤ⿤¤¤·¡¢¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ËÁÞ¤¹ËÜ¿ô¤â¾¯¤Ê¤¤¤Î¤ÇÈ´¤­º¹¤·¤·¤ä¤¹¤¤¤Î¤ÇÊØÍø¤À¡£
    • ¤È¤Ï¤¤¤¨¡¢¤¢¤È4pin¡ß2Îó¤À¤±Áý¤ä¤»¤Ð¡¢»Ä¤ê¤ÎGPIO 9¤Ä(5,6,12,13,16,19,20,21,26)¤òǼ¤á¤é¤ì¤ë¤Î¤À¤¬¡£
  • Raspberry Pi Model B (26pin) ÍѤʤΤǡ¢¼ê»ý¤Á¤Î Raspberry Pi 2 Model B ÍѤ˲ù©¤·¤¿¡£¥Ô¥ó¥½¥±¥Ã¥È¤ò³°¤·¤Æ 13¡ß2 ¥Ô¥ó¥Ø¥Ã¥À¤òÉÕ¤±Ä¾¤·¡¢²¼¸þ¤­¤Î3V3/5V/GND¤ò³°¤·¤Æ¾å¦¤Ë¥Ô¥ó¥Õ¥ì¡¼¥à 2x2 ¤òÉÕ¤±Ä¾¤·¤¿¡£¥±¡¼¥Ö¥ë¤Ï¼ê»ý¤Á¤Î40pin¥Õ¥é¥Ã¥È¥±¡¼¥Ö¥ë(¥ê¥Ü¥ó¥±¡¼¥Ö¥ë)¤òÍѤ¤¤¿¡£

·ëÀþ:

SPI CE1 (GPIO 7)P0 (GPIO 17)
SPI CE0 (GPIO 8)P1 (GPIO 18)
SPI SCLK (GPIO 11)P2 (GPIO 27)
SPI MISO (GPIO 9)P3 (GPIO 22)
SPI MOSI (GPIO 10)P4 (GPIO 23)
Serial RXD (GPIO 15)P5 (GPIO 24)
Serial TXD (GPIO 14)P6 (GPIO 25)
I2C SCL (GPIO 3)P7 (GPIO 4)
I2C SDA (GPIO 2)GND

Extension Board V2.2¡£ÅŸ»/GND ¤¬¤ï¤º¤«¤Ë¤º¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ËÁÞ¤·¤Ë¤¯¤¤:

GPIO-Extenstion-Board-V2_2-002.jpg GPIO-Extenstion-Board-V2_2-001.jpg

AE-RBPI-BOB40 ¤È¤ÎÈæ³Ó¡£ Extension Board V2.2 ¤Ë¤Á¤ç¤Ã¤È¼ê¤ò²Ã¤¨¤Æ¤ß¤¿¡£ ÅŸ»/GND¤ò¼è¤êµî¤Ã¤Æ¡¢¥Ô¥ó¥½¥±¥Ã¥È¼þÊÕ¤òÀÞ¤ê¼è¤Ã¤¿¡£ Extension Board V2.2 ¤ÎÊý¤¬¤ï¤º¤«¤ËÉý¤¬¶¹¤¤¤Î¤Ç¡¢´ðÈĤΦ¤Î¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤Î·ê¤Ë¥±¡¼¥Ö¥ë¤òÁÞ¤·¤ä¤¹¤¤¡£ ¤¿¤À¤·¡¢AE-RBPI-BOB40 ¤Ï¼þ°Ï¤ËGND¤¬¤¢¤ë¤·¡¢´ðÈĤÎü¤âåºÎï¤Ê¤Î¤À¤¬:

GPIO-Extenstion-Board-V2_2-003.jpg GPIO-Extenstion-Board-V2_2-013.jpg

´ðÈĤ¬¾®¤µ¤¤¤Î¤Ç¡¢¤«¤µ¤Ð¤é¤Ê¤¤²óÏ©¤Ê¤é¥ß¥Ë¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤Ç¤âÁȤ᤽¤¦:

GPIO-Extenstion-Board-V2_2-004.jpg GPIO-Extenstion-Board-V2_2-005.jpg

¥Ô¥ó¥½¥±¥Ã¥È¤ÈÅŸ»/GND¤ò¼è¤êµî¤ê¡¢13¡ß2¥Ô¥ó¥Ø¥Ã¥À¤È2¡ß2¥Ô¥ó¥½¥±¥Ã¥È¤ò¤Ä¤±¤¿:

GPIO-Extenstion-Board-V2_2-006.jpg GPIO-Extenstion-Board-V2_2-007.jpg GPIO-Extenstion-Board-V2_2-008.jpg

¥Õ¥é¥Ã¥È¥±¡¼¥Ö¥ë¤Ë¥³¥Í¥¯¥¿¤ò°µÃ夹¤ë¡£¹©¶ñ¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¤Î¤ÇËüÎϤò»È¤Ã¤¿:

GPIO-Extenstion-Board-V2_2-010.jpg GPIO-Extenstion-Board-V2_2-011.jpg

40¥Ô¥ó¥Õ¥é¥Ã¥È¥±¡¼¥Ö¥ë¤ò¤³¤Î¤è¤¦¤ËÉÕ¤±¤Æ»È¤¦¡£¤¢¤ë¤¤¤Ï¡¢¥¸¥ã¥ó¥Ñ¡¼¥±¡¼¥Ö¥ë(¥á¥¹-¥á¥¹)¤ÇRaspberry Pi¤È·Ò¤°:

GPIO-Extenstion-Board-V2_2-009.jpg GPIO-Extenstion-Board-V2_2-012.jpg

[ÊÔ½¸]

GPIO #

[ÊÔ½¸]

LED ÅÀÌÇ (2015-05-12) #

GPIO¤Ç2SC1815L-Y¤ò¥¹¥¤¥Ã¥Á¤·¤Æ¡¢2¿§LED(ÀÖ¡¦²«)¤òÅÀÌǤµ¤»¤Æ¤ß¤¿¡£

  • ¤³¤ÎLED¤Î½ô¸µ¤¬ÉÔÌÀ¤À¤¬¡¢¹âµ±ÅÙLED¤À¤Ã¤¿¤È»×¤¦¤Î¤ÇÄ̾ï15mA¡¢ºÇÂç30mA¤È²¾Äꤷ¤Æ¤¤¤ë¡£
  • GPIO ¤Çή¤»¤ëÅÅή¤Ï GPIO Electrical Specifications, Raspberry Pi Input and Output Pin Voltage and Current Capability ¤Ë¤è¤ë¤È¡¢¥Ô¥ó1¤Ä¤Ë¤Ä¤­ 2mA ¡Á 16mA ¤Ç¡¢¥×¥í¥°¥é¥à¤ÇÀßÄê²Äǽ¤È¤Î¤³¤È¡£¥Ç¥Õ¥©¥ë¥È¤Ï8mA¤È¤Î¤³¤È (GPIO Pads Control2)¡£
  • Raspberry Pi 2¤Î5V¤Ï¿ôÉ´mA, 3.3V¤ÏÉ´mA¤¯¤é¤¤¼è¤ì¤ë¤é¤·¤¤¡£¤Þ¤À²óÏ©¿Þ¤òÄ´¤Ù¤Æ¤¤¤Ê¤¤¤¬¡¢°Ê²¼¤À¤ÈͽÁÛ¤·¤Æ¤¤¤ë¡£
    • 3.3V¤Ï¥ì¥®¥å¥ì¡¼¥¿¤Ç¾å¸Â¤¬·è¤Þ¤Ã¤Æ¡¢¶¡µëÀè(SoC)¤Î»ÈÍÑÎ̤ò°ú¤¯
    • 5V¤Ï¶¡µë¸µ(USB)¤È¡¢¥Ý¥ê¥¹¥¤¥Ã¥Á¡Ê¾è¤Ã¤Æ¤¿¤è¤¦¤Ê¡Ë¤Ç¾å¸Â¤¬·è¤Þ¤ê¡¢3.3V¤äRaspberry Pi 2¤Ë¾è¤Ã¤Æ¤¤¤ëUSB¥Ï¥Ö¤È¤½¤ÎÀè¤Î¥Ç¥Ð¥¤¥¹¤Î»ÈÍÑÎ̤ò°ú¤¯¡£
  • ¤è¤Ã¤Æ¡¢3.3V¤Ï;͵¤¬¤Ê¤µ¤½¤¦¤Ê¤Î¤Ç¡¢LED¤ÎÅŸ»¤ÏRaspberry Pi 2¤Î5V¤«¤é¶¡µë¤·¤Æ¡¢GPIO¤Ç¥È¥é¥ó¥¸¥¹¥¿¡¦¥¹¥¤¥Ã¥Á¤ò¶îư¤·¤¿¡£

²óÏ©¿Þ (Fritzing ¤ÇºîÀ®):

BJT-LED-circuit.png

  • Éé²ÙÅÅή=30mA¡¢ÁýÉýΨ=120¤È¤¹¤ë¤È¡¢¥Ù¡¼¥¹ÅÅή¤Ï 30mA/120=0.25mA¡£¤è¤Ã¤Æ¥Ù¡¼¥¹Äñ¹³¤Ï (3.3V - 0.6V)/0.25mA = 10.8k¦¸¡£ Éé²ÙÅÅή=20mA¡¢ÁýÉýΨ=120¤È¤¹¤ë¤È¡¢¥Ù¡¼¥¹ÅÅή¤Ï 20mA/120=0.167mA¡£¤è¤Ã¤Æ¥Ù¡¼¥¹Äñ¹³¤Ï (3.3V - 0.6V)/0.167mA = 16.2k¦¸¡£ º£²ó¤Ï¼ê»ý¤Á¤Î12k¦¸¤ò»È¤Ã¤¿¤Î¤Ç¡¢¥Ù¡¼¥¹ÅÅή¤Ï (3.3-0.6)/12k¦¸=0.225mA¤¯¤é¤¤¡£
  • LED¤ÎÊý¤ÎÄñ¹³¤Ï220¦¸¤È¤¹¤ë¤¬¡¢Â¾¤Ë 100¦¸ ¤È ÄêÅÅή¥À¥¤¥ª¡¼¥É(15mA) ¤ò»È¤Ã¤Æ¤ß¤ë¡£

¥·¥ß¥å¥ì¡¼¥·¥ç¥ó(EveryCircuit, ¥È¥é¥ó¥¸¥¹¥¿¤ÎÁýÉýΨ¤ò120¤ËÀßÄê, Äñ¹³¤òÊѤ¨¤Æ3¼ïÎà¤ò»î¤·¤¿):

BJT-LED-everycircuit.png

ÅÀÌǤµ¤»¤ë¥×¥í¥°¥é¥à¤Ï2¤Äºî¤Ã¤Æ¤ß¤¿¡£

¥·¥§¥ë¥¹¥¯¥ê¥×¥ÈÈÇ:

[blink_led.sh]
#!/bin/bash

handler()
{
  echo 22 > /sys/class/gpio/unexport
  echo 23 > /sys/class/gpio/unexport
  exit 0
}

trap handler SIGINT

echo 22 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio22/direction

echo 23 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio23/direction

while true
do
  echo 1 > /sys/class/gpio/gpio22/value
  echo 0 > /sys/class/gpio/gpio23/value
  sleep 1
  echo 0 > /sys/class/gpio/gpio22/value
  echo 1 > /sys/class/gpio/gpio23/value
  sleep 1
done

Python ÈÇ:

[blink_led.py]
#!/usr/bin/python

import RPi.GPIO as GPIO
from time import sleep

GPIO_LED_RED=22
GPIO_LED_YELLOW=23

GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_LED_RED, GPIO.OUT)
GPIO.setup(GPIO_LED_YELLOW, GPIO.OUT)

try:
    while True:
        GPIO.output(GPIO_LED_RED, GPIO.HIGH)
        GPIO.output(GPIO_LED_YELLOW, GPIO.LOW)
        sleep(1.0)
        GPIO.output(GPIO_LED_RED, GPIO.LOW)
        GPIO.output(GPIO_LED_YELLOW, GPIO.HIGH)
        sleep(1.0)

except KeyboardInterrupt:
    pass

GPIO.cleanup(GPIO_LED_RED)
GPIO.cleanup(GPIO_LED_YELLOW)

°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¼Â¹Ô¤¹¤ë¤È¡¢LED¤¬1É䴤ȤËÅÀÌǤ¹¤ë¡£ctrl-C¤ò²¡¤¹¤ÈGPIO¤òÊĤ¸¤Æ¤«¤é½ªÎ»¤¹¤ë(LED¤¬¾ÃÅô¤¹¤ë):

(Shell¥¹¥¯¥ê¥×¥ÈÈÇ)

$ chmod +x blink_led.sh
$ sudo ./blink_led.sh

(PythonÈÇ)

$ chmod +x blink_led.py
$ sudo ./blink_led.py

BJT-LED-red.jpg BJT-LED-yellow.jpg

LED¦¤ÎÄñ¹³¤¬100¦¸¤Î¤È¤­¡¢¥Ù¡¼¥¹ÅÅή¤Ï 0.21mA¡¢¥³¥ì¥¯¥¿ÅÅή¤Ï 28.40mA(ÀÖ), 25.03mA(²«)¡£

BLT-LED-100ohm-red-Ic.jpg BLT-LED-100ohm-red-Ib.jpg BLT-LED-100ohm-yellow-Ic.jpg BLT-LED-100ohm-yellow-Ib.jpg

LED¦¤ÎÄñ¹³¤¬Ìó220¦¸¤Î¤È¤­:

  • LED(ÀÖ): R1=214.0¦¸, R2=11.72k¦¸¡¢¥³¥ì¥¯¥¿ÅÅή(If¤âƱ¤¸)¤Ï 14.67mA (ÀÖ), Vf ¤Ï 1.705V, ¥Ù¡¼¥¹ÅÅή¤Ï 0.21mA¡£
  • LED(²«): R3=214.8¦¸, R4=11.64k¦¸¡¢¥³¥ì¥¯¥¿ÅÅή(If¤âƱ¤¸)¤Ï 12.89mA (²«), Vf ¤Ï 2.092V, ¥Ù¡¼¥¹ÅÅή¤Ï 0.21mA¡£

    BLT-LED-red-If.jpg BLT-LED-red-Vf.jpg BLT-LED-red-Ib.jpg

    BLT-LED-yellow-If.jpg BLT-LED-yellow-Vf.jpg BLT-LED-yellow-Ib.jpg

ÄêÅÅή¥À¥¤¥ª¡¼¥É(15mA) ¤Ç¤Ï¡¢9.94mA(ÀÖ), 10.84mA(²«) ¤À¤Ã¤¿¡£LED¤Î½çÊý¸þÅ۵¤¬1.9¡Á2.1V¤È¤¹¤ë¤È¡¢5.0-(1.9¡Á2.1) = 3.1¡Á2.9V¤·¤«¤«³Ý¤«¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢ÄêÅÅή¥À¥¤¥ª¡¼¥É¤ò»È¤¦¤Ë¤ÏÅ۵¤¬Ä㤹¤®¤ë¤è¤¦¤À¡£

[ÊÔ½¸]

¥¿¥¯¥È¥¹¥¤¥Ã¥Á¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë (2015-04-19) #

¥¿¥¯¥È¥¹¥¤¥Ã¥Á¤ò°ìÄê»þ´Ö²¡¤¹¤È¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£

¾ðÊó¸»:

  1. Raspberry Pi¥Ö¥í¥° : [¥³¥é¥à] ¡Ø¥Ü¥¿¥óĹ²¡¤·¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ëÅŸ»¥Ü¥¿¥ó¤òºî¤í¤¦ £²¡Ù
  2. How2RaspberryPi - PukiWiki
  3. Debian JP Project - Debian ¥Ý¥ê¥·¡¼¥Þ¥Ë¥å¥¢¥ë - ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à, 9.3 ¥·¥¹¥Æ¥à¥é¥ó¥ì¥Ù¥ë¤È init.d ¥¹¥¯¥ê¥×¥È
  4. init.d ¥¹¥¯¥ê¥×¥È¤ò½ñ¤³¤¦
  5. RaspberryPi ¤Î GPIO ¤Î¥×¥ë¥¢¥Ã¥×/¥À¥¦¥óÀßÄê¤Ë¤Ä¤¤¤Æ - ¤Þ¤Ê¤Ó¥µ¥¤¥¨¥ó¥¹
    1. ¤¤¤ï¤¯¡Ö¥½¡¼¥¹¥³¡¼¥É¤òÆÉ¤ó¤À¤È¤³¤í¡¢¤³¤ì¤Ï"½ÐÎϥݡ¼¥È¤ËÀßÄꤷ¤¿¾å¤Ç½ÐÎÏÃͤò low ¤Þ¤¿¤Ï high ¤ËÀßÄꤹ¤ë"¤È¤¤¤¦Æ°ºî¤Î¥¨¥¤¥ê¥¢¥¹(ÊÌ̾)¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢¥Ï¥¤ ¥¤¥ó¥Ô¡¼¥À¥ó¥¹¤ÎÆþÎϥݡ¼¥È¤Ë¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¡×

1.¤Ç¤Ï 3.3V ¤È GPIO22 ¤ò»È¤¤¡¢¥×¥ë¥À¥¦¥ó¤·¤Æ¤¤¤ë¡£ 3.3V ü»Ò¤Ï¾¤Î¥Ç¥Ð¥¤¥¹¤Ø¤ÎÅŸ»¶¡µë¤Ë»È¤¤¤¿¤¤¤Î¤Ç¡¢¥×¥ë¥¢¥Ã¥×¤ËÊѹ¹¤·¡¢GPIO18 ¤È¤½¤Î¤È¤Ê¤ê¤ÎGND¤ò»È¤Ã¤¿¡£

shutdown-sw-001.jpg

ưºî³Îǧ¡£¥¿¥¯¥È¥¹¥¤¥Ã¥Á¤ò·Ò¤¤¤Ç¡¢¥¹¥¤¥Ã¥ÁOff¤Î¤È¤­GPIO18¤¬1¤Ë¤Ê¤ê¡¢¥¹¥¤¥Ã¥ÁOn¤Î¤È¤­0¤Ë¤Ê¤ë¤³¤È¤ò³Îǧ¤¹¤ë:

$ echo "18" > /sys/class/gpio/export
$ echo "in" > /sys/class/gpio/gpio18/direction
$ echo "high" > /sys/class/gpio/gpio18/direction  ¡ú2018-04-25Êä­ ¤³¤ì¤Ï¤À¤á¤Ã¤Ý¤¤(pull-upÀßÄꤵ¤ì¤Ê¤¤)
$ while true; do cat /sys/class/gpio/gpio18/value; sleep 1; done
1
1
0  ¡ú¥¹¥¤¥Ã¥ÁOn
0  ¡ú¥¹¥¤¥Ã¥ÁOn
1
1
^C

1. ¤Î¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò¼¡¤Î¤è¤¦¤ËÊѹ¹¤·¤¿¡£

$ diff -u shutdown-daemon2.sh.org shutdown-daemon2.sh
--- shutdown-daemon2.sh.org 2015-04-19 23:12:30.442544952 +0900
+++ shutdown-daemon2.sh 2015-04-19 23:14:47.442001359 +0900
@@ -1,11 +1,11 @@
 #!/bin/sh
-GPIO=22     #»ÈÍѤ¹¤ëGPIO¥Ý¡¼¥È
+GPIO=18     #»ÈÍѤ¹¤ëGPIO¥Ý¡¼¥È
 PUSHTIME=5  #¥·¥ã¥Ã¥È¥À¥¦¥ó¤ò¼Â¹Ô¤¹¤ëÉÿô

 ## ½é´üÀßÄê
 echo "$GPIO" > /sys/class/gpio/export
 echo "in" > /sys/class/gpio/gpio$GPIO/direction
-echo "low" > /sys/class/gpio/gpio$GPIO/direction
+echo "high" > /sys/class/gpio/gpio$GPIO/direction

 ## ACT LED¤ÎÀ©¸æ
 set_led_mode () {
@@ -18,7 +18,7 @@
 ## 5Éôֲ¡¤µ¤ì¤ë¤Þ¤ÇÂÔ¤Ä
 cnt=0
 while [ $cnt -lt $PUSHTIME ] ; do
-  if [ `cat /sys/class/gpio/gpio$GPIO/value` -eq "1" ] ; then
+  if [ `cat /sys/class/gpio/gpio$GPIO/value` -eq "0" ] ; then
     cnt=`expr $cnt + 1`
     [ $cnt -eq 1 ] && set_led_mode heartbeat
   else

¤µ¤é¤Ë¡Öshutdown -h now¡×¹Ô¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¡¢¡Ösh -x¡×¤Çµ¯Æ°¤·¤Æ¡¢Æ°ºî¤ò³Îǧ¤¹¤ë:

$ sh -x shutdown-daemon2.sh
+ GPIO=18
+ PUSHTIME=5
+ echo 18
+ echo in
+ echo high
+ cnt=0
+ [ 0 -lt 5 ]
+ cat /sys/class/gpio/gpio18/value
+ [ 1 -eq 0 ]
+ [ 0 -gt 0 ]
+ cnt=0
+ sleep 1
+ [ 0 -lt 5 ]
+ cat /sys/class/gpio/gpio18/value
+ [ 0 -eq 0 ]  ¡ú¥¹¥¤¥Ã¥ÁOn
+ expr 0 + 1
+ cnt=1
+ [ 1 -eq 1 ]
+ set_led_mode heartbeat
shutdown-daemon2.sh: 12: shutdown-daemon2.sh: cannot create /sys/class/leds/led0/trigger: Permission denied
+ echo heartbeat
+ sleep 1
+ [ 0 -lt 5 ]
+ cat /sys/class/gpio/gpio18/value
+ [ 1 -eq 0 ]  ¡ú¥¹¥¤¥Ã¥ÁOff
+ [ 0 -gt 0 ]
+ cnt=0
+ sleep 1
^C

ưºî¤ò³Îǧ¤Ç¤­¤¿¤Î¤Ç¡¢/usr/local/sbin ¤Ë¥³¥Ô¡¼¤·¤Æ¡¢chmod +x ¤Ç¼Â¹Ô°À­¤òÉÕ¤±¤Æ¤ª¤¯¡£

$ sudo cp shutdown-daemon2.sh /usr/local/sbin/
$ sudo chmod +x /usr/local/sbin/shutdown-daemon2.sh

º£²ó¤Ï¤È¤ê¤¢¤¨¤º /etc/rc.local ¤«¤é¸Æ¤Ó½Ð¤¹¤è¤¦¤Ë¤·¤¿¡£

$ sudo hg diff /etc/rc.local  (¡úetckeeper + mercurial ¤Ç¥Ð¡¼¥¸¥ç¥ó´ÉÍý¤·¤Æ¤¤¤ë¤Î¤Ç¡¢Ä¾Á°¤ÎÊѹ¹¤È¤Îº¹Ê¬¤ò½Ð¤»¤ë)
diff -r 9a974539e0f4 rc.local
--- a/rc.local  Sun Apr 19 01:21:57 2015 +0900
+++ b/rc.local  Sun Apr 19 23:42:16 2015 +0900
@@ -17,4 +17,6 @@
   printf "My IP address is %s\n" "$_IP"
 fi

+/usr/local/sbin/shutdown-daemon2.sh &
+
 exit 0

(°Ê²¼¡¢ºî¶ÈÃæ)

Raspbian ¤Ï Debian ·Ï¤Ê¤Î¤Ç¡¢ËÜÍè¤Ê¤é /etc/init.d ¤Ë½êÄê¤Î·Á¼°¤Ç¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò½ñ¤¤¤Æ¡¢update-rc.d ¥³¥Þ¥ó¥É¤Ç /etc/rcN.d ¤Ë¥ê¥ó¥¯¤òºî¤ê¤ê¤¿¤¤¡£

¥á¥ê¥Ã¥È:

  • ³«»Ï¡¢½ªÎ»¡¢ÀßÄê¥Õ¥¡¥¤¥ë¤ò½ñ¤­´¹¤¨¤ÆºÆµ¯Æ°¤¬´Êñ¤Ë¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
  • /etc/rc.local ¤Ë´Ö°ã¤Ã¤¿¤³¤È¤ò½ñ¤¯¤È¡¢Â¾¤Î½èÍý¤Ë±Æ¶Á¤òÍ¿¤¨¤ë¤¬¡¢¤³¤Î·Á¼°¤À¤È±Æ¶Á¤¬¾¯¤Ê¤¤
  • /etc/rc.local ¤ËÊ£»¨¤Ê½èÍý¤ò¿¿ô½ñ¤¯¤ÈÈÑ»¨¤Ë¤Ê¤ë¤¬¡¢¤½¤ì¤ò²óÈò¤Ç¤­¤ë¡£
  • ÀßÄê¤ò /etc °Ê²¼¤Ë°Ü¤»¤ë¤¿¤á¡¢ÀßÄê¤ò¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¤Ë¤Ï/etc¤òÊݸ¤¹¤ë¤À¤±¤Ç¤¹¤à¡£

¥Ç¥á¥ê¥Ã¥È: ºî¤ë¤Î¤¬ÌÌÅÝ¡£¥×¥í¥»¥¹ID¤òÊÝ»ý¤¹¤ë¤è¤¦¤Ë¤·¤¿¤ê¡£

¥Õ¥¡¥¤¥ë°ìÍ÷

  • /usr/local/sbin/shutdown-button.sh ¥Ç¡¼¥â¥óËÜÂÎ
  • /etc/init.d/shutdown-button ¥Ç¡¼¥â¥ó´ÉÍýÍÑ¥¹¥¯¥ê¥×¥È
  • /etc/rd?.d/S??-shutdown-button ´ÉÍýÍÑ¥¹¥¯¥ê¥×¥È¤Ø¤Î¥ê¥ó¥¯
  • /etc/default/shutdown-button ¥Ç¥Õ¥©¥ë¥ÈÀßÄê
  • /var/run/shutdown-button.pid ¥Ç¡¼¥â¥óÄä»ß/ºÆµ¯Æ°¤Î¤¿¤á¤Î¥×¥í¥»¥¹ID

¼ê½ç

$ cd /etc/init.d
$ sudo cp skeleton shutdown-button
$ sudo emacs shutdown-button
$ sudo chmod +x shutdown-button
$ sudo update-rc.d shutdown-button default
$ sudo emacs /etc/defaults/shutdown-button
$ sudo service shutdown-button start  ¡úµ¯Æ°
$ sudo service shutdown-button restart ¡úºÆµ¯Æ°¡£ÀßÄêÃͤòÊѹ¹¤·¤¿¤È¤­¤ËÍѤ¤¤ë¡£
$ sudo service shutdown-button stop ¡úÄä»ß¡£GPIO¤ò²òÊü¤·¤Æ¤«¤é¡¢¥Ç¡¼¥â¥ó¤òÄä»ß¤¹¤ë¡£

[/etc/default/shutdown-button]

GPIO=26     #»ÈÍѤ¹¤ëGPIO¥Ý¡¼¥È
PUSHTIME=5  #¥·¥ã¥Ã¥È¥À¥¦¥ó¤ò¼Â¹Ô¤¹¤ëÉÿô

[/etc/init.d/shutdown-button]

(ºîÀ®Ãæ)
[ÊÔ½¸]

¥·¥ê¥¢¥ë¥Ý¡¼¥È #

[ÊÔ½¸]

¥·¥ê¥¢¥ë¥Ý¡¼¥È·Ðͳ¤Ç¥í¥°¥¤¥ó (2015-03-28) #

1. µ¡ºà

°Ê²¼¤ÎUSB¥·¥ê¥¢¥ëÊÑ´¹¥â¥¸¥å¡¼¥ë¤ò»È¤Ã¤¿¡£

PC¤Ë Virtual COM Port Drivers ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£

AE-FT234X ¤ò PC¤Ë°ìÅÙÀܳ¤·¤Æ¡¢¥É¥é¥¤¥Ð¡¼¤¬¥¤¥ó¥¹¥È¡¼¥ë´°Î»¤µ¤»¤ë¡£

¥Ô¥ó¤òȾÅÄÉÕ¤±¤¹¤ë¡£¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤Ë¥Ô¥ó¤ò»É¤·¡¢´ðÈĤòºÜ¤»¤Æ¤«¤éºî¶È¤¹¤ë¡£

¤Ï¤ó¤À¤´¤Æ¤Ê¤É:

soldering.jpg

AE-FT234X (¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ËÁÞ¤·¤¿¤È¤­¤Ëü»Ò̾¤¬¸«¤¨¤ë¤è¤¦¤ËUSB¥³¥Í¥¯¥¿¤ÈƱ¤¸Â¦¤Ë¥Ô¥ó¤ò¤Ä¤±¤¿¡£ÅŸ»LED¤¬¸«¤¨¤Ê¤¯¤Ê¤ë¤±¤É):

AE-FT234X.jpg

AE-FT231X (¤Ï¤ó¤ÀÉÕ¤±¤¹¤ëÁ°):

AE-FT231X.jpg

¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ËÁÞ¤·¤Æ¡¢¥¸¥ã¥ó¥Ñ¥±¡¼¥Ö¥ë3ËܤÇÀܳ¤¹¤ë:

Raspberry Pi 2AE-FT234XAE-FT231X
Pin 8 / GPIO 14 / TXDRxDRxD
Pin 10 / GPIO 15 / RXDTxDTxD
Pin 14 / GNDGNDGND

AE-FT234X-TxdRxdGnd.jpg

AE-FT231X-TxdRxdGnd.jpg

2. ¥·¥ê¥¢¥ë¥Ý¡¼¥È¤«¤é¥í¥°¥¤¥ó¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë

$ sudo raspi-config

¡Ö8 Advanced Options¡×¢ª¡ÖA8 Serial¡× ¡ÖWould you like a login shell to be accesible over serial?¡×¤Ç¡Ö<¤Ï¤¤>¡×¤òÁªÂò ¡ÖSerial is now enabled¡×¤Èɽ¼¨¤µ¤ì¤ì¤Ð´°Î»¡£ ¡Ö<Finished>¡×¤òÁªÂò¤·¤Æ raspi-config ¤ò½ªÎ»¤¹¤ë¡£

Raspbian ¤òºÆµ¯Æ°¤¹¤ë¡£

$ sudo reboot

3. ¥í¥°¥¤¥ó¤·¤Æ¤ß¤ë

TeraTerm ¤ò ¥Ü¡¼¥ì¡¼¥È 115200 ¤Ê¤É¤ÎÀßÄê¤ò¹Ô¤¤¡¢Àܳ¤·¡¢°Ê²¼¤Î¤è¤¦¤Ê¥í¥°¥¤¥ó¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤ì¤Ð´°Î»¡£

Raspbian GNU/Linux 7 raspi2-2 ttyAMA0

raspi2-2 login:

¤Ê¤ª¡¢¥·¥ê¥¢¥ë¥Ý¡¼¥È¤òÀܳ¤·¤¿¸å¤Ë Raspberry Pi ¤ÎÅŸ»¤òÅêÆþ¤¹¤ë¤È¡¢¥«¡¼¥Í¥ë¤Îµ¯Æ°¥á¥Ã¥»¡¼¥¸¤â½ÐÎϤµ¤ì¤ë¡£

[ÊÔ½¸]

USB #

[ÊÔ½¸]

̵ÀþLAN (2015-04-19) #

̵ÀþLAN USB¥¢¥À¥×¥¿ GW-USNANO2A ¤ò·Ò¤¤¤Ç¤ß¤¿¡£ ¥¹¥Ú¥Ã¥¯¤Ï 11n/g/b 150Mbps¡£

ÀßÄê¤Ï X Window System ¤òµ¯Æ°¤·¤Æ (startx) ¤½¤Á¤é¤Ç¹Ô¤Ã¤¿¡£

¥«¥¿¥í¥°¤Ç¤ÎºÇÂç¾ÃÈñÅÅÎϤ¬ 1.3W ¤Ê¤Î¤Ç¡¢Å۵5V»þ¤ÎºÇÂçÅÅή¤Ï 1.3W / 5V = 0.26A

ÌÜ»ë¤Ç¤Ï 0.02 ¡Á 0.21 A ¤ÎÈϰϤÀ¤Ã¤¿¡£

GW-USNANO2A-VA.jpg

2015-04-23

¤·¤Ð¤é¤¯ÊüÃÖ¤¹¤ë¤È̵ÀþLAN¤¬ÀÚÃǤµ¤ì¤ë¤è¤¦¤À¡£¤³¤Î¤È¤­¤Î̵ÀþLAN¥¢¥À¥×¥¿¤Î¾ÃÈñÅÅÎÏ¤Ï 0.00 ¡Á 0.06A¤¯¤é¤¤¡£

¤½¤³¤Ç¡¢¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤òOff¤Ë¤·¤¿¡£

¾ðÊó¸»:

iwconfig ¤Ç¤Ï¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤ÏÁàºî¤Ç¤­¤Ê¤«¤Ã¤¿:

$ iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

$ sudo iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

¥É¥é¥¤¥Ð¤òÄ´¤Ù¤ë:

$ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 2019:ab2a PLANEX GW-USNano2 802.11n Wireless Adapter [Realtek RTL8188CUS]  ¡ú¤³¤ì
$ lsmod
Module                  Size  Used by
snd_bcm2835            18649  0
snd_pcm                73475  1 snd_bcm2835
snd_seq                53078  0
snd_seq_device          5628  1 snd_seq
snd_timer              17784  2 snd_pcm,snd_seq
snd                    51038  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
8192cu                528365  0  ¡ú¤³¤ì
uio_pdrv_genirq         2958  0
uio                     8119  1 uio_pdrv_genirq

¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤Ï1 (On)¤À¤Ã¤¿:

$ cat /sys/module/8192cu/parameters/rtw_power_mgnt
1

ÀßÄê¥Õ¥¡¥¤¥ë¤ò¿·µ¬ºîÀ®¤·¤Æ¡¢¤½¤³¤Ç¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤òOff¤Ë¤¹¤ë¡£

[/etc/modprobe.d/8192cu.conf]

options 8192cu rtw_power_mgnt=0

ºÆµ¯Æ°¤·¤Æ¡¢³Îǧ¤¹¤ë¤È¡¢¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤Ï 0 (Off) ¤Ë¤Ê¤Ã¤¿¡£

$ cat /sys/module/8192cu/parameters/rtw_power_mgnt
0

¾ðÊ󸻤ÎÃæ¤Ë¤Ï¡¢¥Ñ¥ï¡¼¥Þ¥Í¡¼¥¸¥á¥ó¥È¤Î¾¤Ëdisables USB autosuspend ¤ò 0¤ËÀßÄꤷ¤Æ¤¤¤ë¤â¤Î¤â¤¢¤Ã¤¿¤¬¡¢´û¤Ë0¤Ê¤Î¤Ç8192cu.conf¤Ë¤ÏÆþ¤ì¤Ê¤«¤Ã¤¿¡£

$ cat /sys/module/8192cu/parameters/rtw_enusbss
0

ÅÅή¤ÏÄÌ¿®¤¬¤Ê¤¤¤È¤­¤Ë 0.06¡Á0.07A ¤Ë¤Ê¤Ã¤¿¡£

¤Ê¤ª¡¢¥É¥é¥¤¥Ð¤Î¥Ñ¥é¥á¡¼¥¿¤Ï¾¤Ë¤â¤¢¤ë¤è¤¦¤À:

$ ls /sys/module/8192cu/parameters/
if2name           rtw_cbw40_enable  rtw_hw_wps_pbc     rtw_lowrate_two_xmit   rtw_power_mgnt          rtw_wifi_spec
ifname            rtw_channel       rtw_hwpdn_mode     rtw_mac_phy_mode       rtw_rf_config           rtw_wmm_enable
rtw_80211d        rtw_channel_plan  rtw_hwpwrp_detect  rtw_max_roaming_times  rtw_rfintfs
rtw_ampdu_amsdu   rtw_chip_version  rtw_initmac        rtw_mc2u_disable       rtw_rx_stbc
rtw_ampdu_enable  rtw_enusbss       rtw_ips_mode       rtw_mp_mode            rtw_special_rf_path
rtw_antdiv_cfg    rtw_force_iol     rtw_lbkmode        rtw_network_mode       rtw_vcs_type
rtw_busy_thresh   rtw_ht_enable     rtw_low_power      rtw_notch_filter       rtw_vrtl_carrier_sense
[ÊÔ½¸]

USB-¥®¥¬¥Ó¥Ã¥ÈLAN¥¢¥À¥×¥¿¡¼ ETC-US2 (2015-03-26) #

ºÇ¶á¤Î¥«¡¼¥Í¥ë¤À¤È¡¢ ASIX ·Ï¤Î¥Ç¥Ð¥¤¥¹¥É¥é¥¤¥Ð¤¬Æþ¤Ã¤Æ¤¤¤ë¤Èʹ¤¤¤¿¤Î¤Ç¡¢ USB 2.0/1.1Âбþ ¥®¥¬¥Ó¥Ã¥ÈLAN¥¢¥À¥×¥¿¡¼¡§ETG-US2¡Ã¥¢¥¤¡¦¥ª¡¼¥Ç¡¼¥¿µ¡´ï ¤ò·Ò¤¤¤Ç¤ß¤¿¡£

¤³¤ì¤ÏÀÎ (2009ǯº¢?) ¤Ë Debian ¤ÇLAN¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¨¥ß¥å¥ì¡¼¥¿ÍѤ˻ȤäƤ¤¤¿¤Î¤À¤¬ (¥½¥Õ¥È/¥Í¥Ã¥È¥ï¡¼¥¯¥¨¥ß¥å¥ì¡¼¥¿)¡¢Åö»þ¤Ï¥Ç¥Ð¥¤¥¹¥É¥é¥¤¥Ð¤ò¼«Ê¬¤Ç¥Ó¥ë¥É¤¹¤ëɬÍפ¬¤¢¤Ã¤¿¡£

[/var/log/syslog]

Mar 26 00:17:12 raspi2-2 kernel: [757181.840178] usb 1-1.2: new high-speed USB device number 9 using dwc_otg
Mar 26 00:17:12 raspi2-2 kernel: [757181.952816] usb 1-1.2: New USB device found, idVendor=04bb, idProduct=0930
Mar 26 00:17:12 raspi2-2 kernel: [757181.952846] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Mar 26 00:17:12 raspi2-2 kernel: [757181.952864] usb 1-1.2: Product: ETG-US2
Mar 26 00:17:12 raspi2-2 kernel: [757181.952882] usb 1-1.2: Manufacturer: I-O DATA DEVICE,INC.
Mar 26 00:17:13 raspi2-2 kernel: [757182.312422] asix 1-1.2:1.0 eth1: register 'asix' at usb-bcm2708_usb-1.2, 
ASIX AX88178 USB 2.0 Ethernet, 00:a0:b0:xx:xx:xx
Mar 26 00:17:13 raspi2-2 kernel: [757182.313112] usbcore: registered new interface driver asix
Mar 26 00:17:13 raspi2-2 ifplugd(eth1)[8667]: ifplugd 0.28 initializing.
Mar 26 00:17:13 raspi2-2 ifplugd(eth1)[8667]: Using interface eth1/00:A0:B0:xx:xx:xx with driver <asix> (version: 22-Dec-2011)
Mar 26 00:17:13 raspi2-2 ifplugd(eth1)[8667]: Using detection mode: SIOCETHTOOL
Mar 26 00:17:13 raspi2-2 ifplugd(eth1)[8667]: Initialization complete, link beat not detected.
...
Mar 26 00:22:14 raspi2-2 dhclient: DHCPREQUEST on eth0 to 192.168.1.1 port 67
Mar 26 00:22:15 raspi2-2 dhclient: DHCPACK from 192.168.1.1
Mar 26 00:22:15 raspi2-2 dhclient: bound to 192.168.1.47 -- renewal in 42516 seconds.
Mar 26 00:28:22 raspi2-2 kernel: [757851.780233] asix 1-1.2:1.0 eth1: link up, 1000Mbps, full-duplex, lpa 0xC5E1
Mar 26 00:28:23 raspi2-2 ifplugd(eth1)[8667]: Link beat detected.
Mar 26 00:28:23 raspi2-2 ifplugd(eth1)[8667]: Executing '/etc/ifplugd/ifplugd.action eth1 up'.
Mar 26 00:28:23 raspi2-2 ifplugd(eth1)[8667]: client: Ignoring unknown interface eth1=eth1.
Mar 26 00:28:23 raspi2-2 ifplugd(eth1)[8667]: Program executed successfully.

USB¥Ç¥Ð¥¤¥¹¤Î¾ðÊó:

$ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 009: ID 04bb:0930 I-O Data Device, Inc. ETG-US2
Bus 001 Device 006: ID 045e:07b2 Microsoft Corp.
Bus 001 Device 008: ID 0853:0200 Topre Corporation

$ lsusb -s 001:009 -v

Bus 001 Device 009: ID 04bb:0930 I-O Data Device, Inc. ETG-US2
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04bb I-O Data Device, Inc.
  idProduct          0x0930 ETG-US2
  bcdDevice            0.01
  iManufacturer           1 I-O DATA DEVICE,INC.
  iProduct                2 ETG-US2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol      0
      iInterface              7 0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              11
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol         0
  bMaxPacketSize0         8
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

eth1 ¤ÎÀßÄ̵꤬¤¤¤Î¤Ç¡¢IP¥¢¥É¥ì¥¹¤Ï³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Ê¤¤:

$ ifconfig eth1
eth1      Link encap:¥¤¡¼¥µ¥Í¥Ã¥È  ¥Ï¡¼¥É¥¦¥§¥¢¥¢¥É¥ì¥¹ 00:a0:b0:xx:xx:xx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  ¥á¥È¥ê¥Ã¥¯:1
          RX¥Ñ¥±¥Ã¥È:164 ¥¨¥é¡¼:0 »¼º:0 ¥ª¡¼¥Ð¥é¥ó:0 ¥Õ¥ì¡¼¥à:0
          TX¥Ñ¥±¥Ã¥È:0 ¥¨¥é¡¼:0 »¼º:0 ¥ª¡¼¥Ð¥é¥ó:0 ¥­¥ã¥ê¥¢:0
      ¾×ÆÍ(Collisions):0 TX¥­¥å¡¼Ä¹:1000
          RX¥Ð¥¤¥È:14055 (13.7 KiB)  TX¥Ð¥¤¥È:46 (46.0 B)

°Ê²¼¤ÎÀßÄê¤òÍѰդ·¤Æ IP¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤¿: [/etc/network/interfaces]

auto lo

iface lo inet loopback
#iface eth0 inet dhcp       ¡ú¥³¥á¥ó¥È¥¢¥¦¥È

allow-hotplug eth1       ¡úÄɲÃ
iface eth0 inet eth1     ¡úÄɲÃ

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
$ sudo service networking restart

iperf ¤Ç®ÅÙ¤ò¬¤Ã¤¿¡£ÊÌÅÓ¡¢¥®¥¬¥¤¡¼¥µ¤ò»ý¤Ä¾¤ÎPC¤Ç iperf -s ¤ò¼Â¹Ô¤·¤Æ¤ª¤¯¤³¤È:

$ iperf -c 192.168.1.xx
(ά) 137 Mbits/sec

Æâ¢NIC¤Ï 94.2 Mbits/sec ¤Ê¤Î¤Ç¡¢1.45ÇܤÎÀ­Ç½¤¬½Ð¤Æ¤¤¤ë¡£ ºÇ¶á¤ÎÀ½Éʤò»È¤¨¤Ð¡¢¤â¤¦¾¯¤·Â®¤¤¤«¤â¡£

¤¿¤À¡¢»ÈÍÑÅÅÎϤ¬Â¿¤¤¤è¤¦¤Ç¡¢GND - 5V ´Ö¤ÎÅ۵¤¬ 4.483 V ¤ËÄã²¼¤·¤¿¡£ (eth0 ¤Ë¤â¥±¡¼¥Ö¥ë¤òÁÞ¤·¤¿¾ì¹ç¡£eth0 ¤òÈ´¤¯¤È 4.526 V¡£eth1 ¤òÈ´¤¤¤Æ eth0 ¤òÁÞ¤¹¤È 4.786 V) ¤â¤·¡¢¤³¤Î¥¢¥À¥×¥¿¤ò¾ïÍѤ¹¤ë¤Ê¤é¡¢¥»¥ë¥Õ¥Ñ¥ï¡¼¤ÎUSB¥Ï¥Ö¤ò²ð¤·¤¿Êý¤¬Îɤµ¤½¤¦¤À¡£

¸µ¤ËÌ᤹¤Ë¤Ï¡¢/etc/network/inteface ¤ò½¤Àµ¤·¤Æ¤«¤é¼¡¤Î¤è¤¦¤Ë¤·¤¿¡£

$ sudo service networking restart   ¡úÉÔÍפ«¤â?
$ sudo ifdown eth0
$ sudo ifup eth0  ¡ú¤³¤Î»þÅÀ¤Çdhcp¤«¤éIP¥¢¥É¥ì¥¹¤ò¼èÆÀ
[ÊÔ½¸]

Bluetooth ¥­¡¼¥Ü¡¼¥É RT-MWK02 (2015-02-23) #

(ºî¶ÈÃæ ¡Ä¡Äñ¤ËBluetooth¥­¡¼¥Ü¡¼¥É¤¬Í¾¤Ã¤Æ¤¿¤Î¤Ç·Ò¤¤¤Ç¤ß¤¿¤À¤±¤Ê¤Î¤Ç¡¢¤¢¤­¤é¤á¤ë¤«¤â¡£Æâ¢ÅÅÃÓ¤ÎÍÆÎ̤¬¸º¤Ã¤Æ¤­¤¿¤·)

»²¹Í:

Raspbian 2015-01-31 ¤ò apt-get update && apt-get upgrade ¤·¤¿¤â¤Î¤ò»ÈÍѤ·¤¿¡£

RT-MWK02 - Google ¸¡º÷ ¤ò·Ò¤¤¤Ç¤ß¤¿¡£

USB¥É¥ó¥°¥ë ¤Ï RT-MWK02 ÉÕ°ÉÊ ¤Ç¤Ï¤Ê¤¯¡¢¼ê»ý¤Á¤Î ¥À¥¤¥ä¥Æ¥Ã¥¯ FKBT02 - Google ¸¡º÷ ¤ò»È¤Ã¤¿¡£

USB¥É¥ó¥°¥ë¤òÁÞ¤·¤Æ¡¢lsusb ¤Ç³Îǧ¤¹¤ë:

$ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Bluetooth¤Î¥É¥é¥¤¥Ð¤ÈÀßÄê¥Ä¡¼¥ë(¥³¥Þ¥ó¥É¥é¥¤¥óÈÇ)¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë:

$ sudo apt-get install bluetooth bluez-utils

cups (Common Unix Printing System) ¤È¥×¥ê¥ó¥¿¥É¥é¥¤¥Ð¤¬Âô»³¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤ë¡£ÉÔÍפʤΤÀ¤¬¡£

Bluetooth¥­¡¼¥Ü¡¼¥É¤ò¥Ú¥¢¥ê¥ó¥°¥â¡¼¥É¤Ë¤·¤Æ¤«¤é (Bluetooth¥Þ¡¼¥¯¤Î¥­¡¼¤ò¿ôÉôֲ¡¤·¤Æ¡¢Çò¤¤LED¤¬ÅÀÌǤ¹¤ë¤è¤¦¤Ë¤¹¤ë) ¡¢hcitool ¤Ç MAC¥¢¥É¥ì¥¹¤òÄ´¤Ù¤ë:

$ hcitool scan
Scanning ...
        20:42:A1:xx:xx:xx       Bluetooth Wireless Keyboard

¥Ú¥¢¥ê¥ó¥°¤¹¤ë (¼ºÇÔ:¥¿¥¤¥à¥¢¥¦¥È¤·¤¿):

$ sudo bluez-simple-agent hci0 20:42:A1:xx:xx:xx
RequestPinCode (/org/bluez/6738/hci0/dev_20_42_A1_xx_xx_xx)
Enter PIN Code: 1234
Creating device failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. 
Possible cau ses include: the remote application did not send a reply, the message 
bus security policy blocked the reply, the reply timeout expired, or the network 
connection was broken.

¤ä¤êľ¤¹¤¿¤á¤Ë¡¢ÀßÄê¤ò¾Ã¤¹:

$ sudo bluez-simple-agent hci0 20:42:A1:xx:xx:xx repair
RequestPinCode (/org/bluez/2065/hci0/dev_20_42_A1_xx_xx_xx)
Enter PIN Code: ¡úEnter¤òÆþÎÏ

¤ä¤ê¤Ê¤ª¤·:

$ sudo bluez-simple-agent hci0 20:42:A1:xx:xx:xx
RequestPinCode (/org/bluez/2080/hci0/dev_20_42_A1_xx_xx_xx)
Enter PIN Code: 8888
Release    ¡úBluetooth¥­¡¼¥Ü¡¼¥É¤ÎÊý¤â8888<ENTER>¤òÆþÎϤ¹¤ë¤Èɽ¼¨¤µ¤ì¤ë
New device (/org/bluez/2080/hci0/dev_20_42_A1_xx_xx_xx)

¼«Æ°Àܳ¤¹¤ë¤è¤¦ÀßÄꤹ¤ë:

$ sudo bluez-test-device trusted 20:42:A1:xx:xx:xx yes
$ sudo bluez-test-input connect 20:42:A1:xx:xx:xx

¤³¤ì¤Ç¥­¡¼¥Ü¡¼¥É¤¬»È¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£

¤·¤«¤·¡¢¤·¤Ð¤é¤¯¤¹¤ë¤È¡¢»È¤¨¤Ê¤¯¤Ê¤ë¡£¥Ú¥¢¥ê¥ó¥°¤Ï´°Î»¤·¤Æ¤ë¤è¤¦¤À¤¬¡£

ºÆÅÙ¡¢ÀܳÁàºî¤ò¹Ô¤¦¤È¡¢¼¡¤Î¥¨¥é¡¼¤¬È¯À¸¤·¤¿:

$ sudo bluez-test-device trusted 20:42:A1:xx:xx:xx yes
$ sudo bluez-test-input connect 20:42:A1:xx:xx:xx
Traceback (most recent call last):
  File "/usr/bin/bluez-test-input", line 40, in <module>
    input.Connect()
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: Host is down (112)

¥Ú¥¢¥ê¥ó¥°¤ò¾Ã¤·¤Æ¡¢¤ä¤êľ¤¹¤ÈÀ®¸ù¤¹¤ë¡£¤¿¤À¤·¡¢Linux¤òºÆµ¯Æ°¤¹¤ë¤È¡¢Àܳ¤µ¤ì¤Æ¤Ê¤¤¡£Â¾¤ËÀßÄ꤬ɬÍפʤΤ«¤â¡£

$ sudo bluez-simple-agent hci0 20:42:A1:xx:xx:xx remove
$ sudo bluez-simple-agent hci0 20:42:A1:xx:xx:xx
$ sudo bluez-test-device trusted 20:42:A1:xx:xx:xx yes
$ sudo bluez-test-input connect 20:42:A1:xx:xx:xx

TODO: GUIÈǤǻ¤Æ¤ß¤ë (blueman)

[ÊÔ½¸]

Í­ÀþLAN #

[ÊÔ½¸]

Iperf (2015-02-27) #

The TCP/UDP Bandwidth Measurement Tool ¤Ç¡¢Í­ÀþLAN ¤Î TCP ¤Î®ÅÙ¤ò·×¬¤·¤¿¡£

·×¬Áê¼ê¤ÈƱ¤¸¥¹¥¤¥Ã¥Á¥ó¥°¥Ï¥Ö (1000Base-T) ¤ËÀܳ¤·¤Æ·×¬¤·¤¿¡£

·ë²Ì: 94.2 Mbit/sec ¡£ ¿ô²ó·×¬¤·¤¿¤¬¡¢¤º¤Ã¤ÈƱ¤¸¤À¤Ã¤¿¡£ 100Base-TX ¤Ê¤Î¤Ç¡¢¤³¤³¤é¤Ø¤ó¤¬¾å¸Â¤Î¤Ï¤º¡£

¥á¥â

·×¬Áê¼ê (Windows 7 64bit) ¤Ë¤Ï Iperf - The TCP/UDP Bandwidth Measurement Tool ¤Î iperf-2.0.5-3-win32.zip ¤ò»È¤Ã¤¿:

C:> iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 63.0 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.36 port 5001 connected with 192.168.1.46 port 44071

Raspberry Pi 2 ¤ÎÊý¤Ï¡¢Rasbian ¥Ñ¥Ã¥±¡¼¥¸¤Î iperf ¤òÍѤ¤¤¿¡£

$ apt-cache search iperf
iperf - Internet Protocol bandwidth measuring tool

$ apt-cache show iperf | grep ^Version
Version: 2.0.5-3

$ iperf -c 192.168.1.36
------------------------------------------------------------
Client connecting to 192.168.1.36, TCP port 5001
TCP window size: 70.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.46 port 44071 connected with 192.168.1.36 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   112 MBytes  94.2 Mbits/sec

(ά)
[ÊÔ½¸]

I2C #

[ÊÔ½¸]

I2CÀßÄê (2015-02-17) #

raspi-config ¤Î ¡Ö8.Advanced Opitons¡× ¤Î ¡ÖA7 I2C¡×¤ÇÍ­¸ú¤Ë½ÐÍè¤ë¡£

¤³¤ÎÀßÄê¤ò¹Ô¤¦¤È¡¢/boot/config.txt ¤Ë°Ê²¼¤Î¹Ô¤¬Äɲ䵤ì¤ë¡£

dtparam=i2c_arm=on

¤µ¤é¤Ë¡¢¼êư¤Ç /etc/modules ¤Ë°Ê²¼¤Î¹Ô¤òÄɲ乤롣

i2c-dev

¡Ê¤³¤Î·ï¤Ï¤°¤°¤Ã¤Æ¸«¤Ä¤±¤¿¤¬¡¢Àµµ¬¤Îʸ½ñ¤Ç¤Î²òÀâ¤ò¤Þ¤À¸«¤Ä¤±¤Æ¤¤¤Ê¤¤¡£Linux°ìÈ̤«Debian¤Çõ¤·¤¿Êý¤¬Îɤ«¤Ã¤¿?¡Ë

ºÆµ¯Æ°¤·¤Æ¡¢¥â¥¸¥å¡¼¥ë¤È¥Ç¥Ð¥¤¥¹¥Õ¥¡¥¤¥ë¤òÄ´¤Ù¤ë¡£

¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï i2c_bcm2708 , i2c_dev ¤Î¤è¤¦¤À¡£

$ sudo lsmod | grep -i i2c
i2c_dev                 6027  0 
i2c_bcm2708             4990  0 

¥Ç¥Ð¥¤¥¹¥Õ¥¡¥¤¥ë¤â½ÐÍè¤Æ¤¿¡£

$ ls -al /dev/i2c-1
crw-rw---T 1 root i2c 89, 1  2·î 17 01:18 /dev/i2c-1

ưºî³Îǧ¤Î¤¿¤á¤Ë i2c-tools ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£

$ sudo apt-get install i2c-tools

sudo ¤¬¤ª¤Ã¤¯¤¦¤Ê¤Î¤Ç¡¢SPI¤ß¤¿¤¤¤Ë¥æ¡¼¥¶¸¢¸Â¤Ç¼Â¹Ô¤¹¤ë¤¿¤á¤Ë¡¢°Ê²¼¤ÎÁàºî¤ò¹Ô¤Ã¤¿¤¬¡¢¥À¥á¤À¤Ã¤¿¡£SPI¤ä(¤¿¤Ö¤ó)GPIO¤ÏƱÍͤÎÀßÄ꤬¤µ¤ì¤Æ¤¤¤ë¤Î¤Ë¡£

$ grep i2c /etc/group
i2c:x:110:

$ sudo adduser pi i2c
¥æ¡¼¥¶ `pi' ¤ò¥°¥ë¡¼¥× `i2c' ¤ËÄɲ䷤Ƥ¤¤Þ¤¹...
¥æ¡¼¥¶ pi ¤ò¥°¥ë¡¼¥× i2c ¤ËÄɲÃ
´°Î»¡£

$ grep i2c /etc/group
i2c:x:110:pi

$ i2cdetect 1
Error: Could not open file `/dev/i2c-1': Permission denied
Run as root?
$ ls -al /dev/spidev0.*
crw-rw---T 1 root spi 153, 0  1·î  1  1970 /dev/spidev0.0
crw-rw---T 1 root spi 153, 1  1·î  1  1970 /dev/spidev0.1

$ grep spi /etc/group
spi:x:1002:pi

i2c-tools ¤Ç¿ä¾©¤µ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¡£¤Þ¤À»È¤Ã¤Æ¤Ê¤¤¡£

$ sudo apt-get install libi2c-dev python-smbus
[ÊÔ½¸]

I2C light sensor (2015-02-18) #

(̤´°)

ISL29125 RGB¥é¥¤¥È¥»¥ó¥µ (ISL29125) ¤È TSL2561»ÈÍÑ¡¡¾ÈÅÙ¥»¥ó¥µ¡¼¥â¥¸¥å¡¼¥ë (TSL2561) ¤ò·Ò¤¤¤Ç¡¢i2cdetect ¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤Ã¤¿¡£

$ sudo i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

¥¢¥É¥ì¥¹ 0x39 ¤¬ TSL2561, 0x44 ¤¬ ISL29125:

i2c-light-sensor.jpg i2c-osc.jpg

(³¤­¤Ï̤´°)

[ÊÔ½¸]

¥­¥ã¥é¥¯¥¿±Õ¾½ (LCD¥É¥é¥¤¥Ð ST7032i) (2015-04-06) #

°Ê²¼¤Î¥­¥ã¥é¥¯¥¿±Õ¾½¥â¥¸¥å¡¼¥ë¤ò·Ò¤¤¤Ç¤ß¤¿¡£

¥Ô¥ó¥Ø¥Ã¥À¤Î¤Ï¤ó¤ÀÉÕ¤±¤¬É¬Íס£ ¥Ô¥ó¥Ø¥Ã¥À¤Ï°Ê²¼¤òÀÚ¤êÎ¥¤·¤ÆÍѤ¤¤¿¡£ÉÕ°Éʤè¤ê¤â¾¯¤·Ä¹¤«¤Ã¤¿¤Î¤Ç¡¢¥Ö¥ì¥Ã¥É¥Ü¡¼¥É¤ä¥¸¥ã¥ó¥Ñ¡¼¥ï¥¤¥ä(¥á¥¹)¤¬È´¤±¤Ë¤¯¤¤¤È»×¤Ã¤¿¤Î¤Ç¡£

RST ¥Ô¥ó¤Ï¼ê»ý¤Á¤Î 12k¦¸ ¤Ç 3.3V¤ÈÀܳ¤·¤¿¡£ On/Off ¤¹¤ë¤Ê¤éGPIO¤ò¥×¥ë¥¢¥Ã¥×ÀßÄê¤Ë¤·¤Æ·Ò¤°¤Î¤À¤í¤¦¡£

LCD¥É¥é¥¤¥Ð¤Ï Sitronix ST7032i ¤Ê¤Î¤À¤±¤É¡¢Products - Display Driver IC - Industrial Display Driver IC - Sitronix Technology Corporation ¤Ë¤Ï¥Ç¡¼¥¿¥·¡¼¥È¤¬¸«Åö¤¿¤é¤Ê¤¤¡£ Âå¤ï¤ê¤Ë Strawberry Linux ¤È ½©·îÅÅ»ÒÄ̾¦ ¤Î¥Ç¡¼¥¿¥·¡¼¥È¤ò¸«¤¿¡£

ưºî³Îǧ¤Î¤¿¤á¤Ë¡¢°Ê²¼¤Î¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò¡Ö-y 0¡×¢ª¡Ö-y 1¡×¤ËÃÖ¤­´¹¤¨¤ÆÍѤ¤¤¿¤È¤³¤í¡¢¤Á¤ã¤ó¤Èɽ¼¨¤µ¤ì¤¿¡£

$ emacs st7032.sh
(¢¬¤Î¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò¥³¥Ô¡¼¡õ¥Ú¡¼¥¹¥È¤·¤Æ¡¢¡Ö-y 0¡×¢ª¡Ö-y 1¡×¤ËÃÖ´¹)
$ chmod +x st7032.sh
$ sudo adduser pi i2c

$ ./st7032.sh -i "i2c ST7032i"
$ ./st7032.sh -p 40 "Raspberry Pi 2 Model B"

ST7032i-01.jpg ST7032i-02.jpg

2015-04-06

wiringPi ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë:

$ mkdir ~/src
$ cd ~/src
$ git clone git://git.drogon.net/wiringPi
$ cd wiringPi
$ less INSTALL
$ ./build

Raspberry Pi ¤ËLCD±Õ¾½¤òÉÕ¤±¤Æ»þ·×¤òºî¤Ã¤Æ¤ß¤¿-IT¼Ò²ñ¤Î³³²¼¤Ç ¤Î»þ·×¤Î¥µ¥ó¥×¥ë¤ò¥Ó¥ë¥É¤¹¤ë¡£

$ gcc -Wall -Wextra lcd7031i.c -o lcd7031i -lwiringPi
lcd7031i.c: In function ¡Æmain¡Ç:
lcd7031i.c:63:5: warning: implicit declaration of function ¡Æsleep¡Ç [-Wimplicit-function-declaration]
lcd7031i.c: In function ¡Ælcd_init¡Ç:
lcd7031i.c:78:3: warning: implicit declaration of function ¡Ædelay¡Ç [-Wimplicit-function-declaration]
lcd7031i.c:82:3: warning: implicit declaration of function ¡ÆdelayMicroseconds¡Ç [-Wimplicit-function-declaration]

·Ù¹ð¤ò²ò¾Ã¤¹¤ë¤¿¤á¤Ë¡¢°Ê²¼¤Î2¹Ô¤ò¥Õ¥¡¥¤¥ëÀèÆ¬ÉÕ¶á¤ËÁÞÆþ¤·¤¿:

#include <unistd.h>
#include <wiringPi.h>

°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¼Â¹Ô¤¹¤ë¤È¡¢LCD¤Ëǯ·îÆü¡¢ÍËÆü¡¢»þʬÉä¬É½¼¨¤µ¤ì¤¿:

$ ./lcd7031i &

2015-04-13

¥ª¥·¥í¥¹¥³¡¼¥×¤Ç´Ñ¬:

  • ¥¯¥í¥Ã¥¯¤Ï 100KHz ¤À¤Ã¤¿¡£

ST7032i-i2c-osc-001.png

ST7032i-i2c-osc-002.png

ST7032i-i2c-osc-003.png

¥í¥¸¥Ã¥¯¥¢¥Ê¥é¥¤¥¶¤Ç´Ñ¬ (½é´ü²½, 1¹ÔÌܤË"192.168.1.47"¤òɽ¼¨)

  • Á÷¿®¥Ç¡¼¥¿1: Address=3E(Write), 00 38 39 14 78 5E 6C
  • Á÷¿®¥Ç¡¼¥¿2: Address=3E(Write), 00 0C 01 06
  • Á÷¿®¥Ç¡¼¥¿3: Address=3E(Write), 40 "192.168.1.47"

ST7032i-i2c-log-01-001.png

ST7032i-i2c-log-01-002.png

ST7032i-i2c-log-01-003.png

ST7032i-i2c-log-01-004.png

ST7032i-i2c-log-01-005.png

¥í¥¸¥Ã¥¯¥¢¥Ê¥é¥¤¥¶¤Ç´Ñ¬ (2¹ÔÌܤË"Raspberry Pi 2 B"¤òɽ¼¨)

  • Á÷¿®¥Ç¡¼¥¿1: Address=3E(Write), 00 A8 (128 + 40)
  • Á÷¿®¥Ç¡¼¥¿2: Address=3E(Write), 40 "Raspberry Pi 2 B"

ST7032i-i2c-log-02-001.png

ST7032i-i2c-log-02-002.png

ST7032i-i2c-log-02-003.png

2015-04-13

python smbus ¥â¥¸¥å¡¼¥ë¤òÍѤ¤¤¿¥¹¥¯¥ê¥×¥È¤ò¼Â¹Ô¤·¤Æ¤ß¤¿¡£

2¹ÔÌܤ¬½ÐÎϤµ¤ì¤Ê¤«¤Ã¤¿¡£clear¤ÎËöÈø¤Ë¤Ësleep()¤òÆþ¤ì¤ë¤È½ÐÎϤµ¤ì¤¿¡£

   def clear(self):
       self.bus.write_i2c_block_data(self.addr, 0, [0x01])
       time.sleep(0.00002)

¤³¤Î·ï¤Ï¸å¤ÇÄ´ºº¤¹¤ë¡£(»ÅÍͤÈÈæ³Ó¡¢¥í¥¸¥¢¥Ê¤ÇÄÌ¿®ÆâÍÆ¤È¥¿¥¤¥ß¥ó¥°Ä´ºº¤¹¤ë)

¤Þ¤¿¡¢¼¼²¹20¡î¤Ç¤Ï¡¢¥³¥ó¥È¥é¥¹¥È¤¬0x20¤Ç¤Ïʸ»ú¤¬Çö¤«¤Ã¤¿¤Î¤Ç¡¢0x30¤Ë¤·¤¿¡£

2015-04-13

RPi.GPIO ¤Ï PyPI ¤Ë¤â¸ºß¤¹¤ë¡£¤³¤Á¤é¤Ï¡¢¤È¤ê¤¢¤¨¤º¤½¤Î¤Þ¤Þ¤Ç:

$ pip search rpi.gpio
RPi.GPIO                  - A module to control Raspberry Pi GPIO channels
  INSTALLED: 0.5.11 (latest)
RPIO                      - Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM,
                            GPIO interrups, TCP socket interrupts, command line tools and more
gpiocrust                 - A pythonic wrapper around RPi.GPIO
[ÊÔ½¸]

SPI #

[ÊÔ½¸]

SPIÀßÄê (2015-02-15) #

(̾̂̾)

¾ðÊó¸»:

raspi-config ¤Î ¡Ö8.Advanced Opitons¡× ¤Î ¡ÖA6 SPI¡× ¤ÇÍ­¸ú¤Ë½ÐÍè¤ë¡£

¤³¤ÎÀßÄê¤ò¹Ô¤¦¤È¡¢boot/config.txt ¤Ë°Ê²¼¤Î¹Ô¤¬Äɲ䵤ì¤ë¡£

dtparam=spi=on

¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï spi_bcm2708 ¤Î¤è¤¦¤À¡£

$ sudo lsmod | grep -i spi
spi_bcm2708             5153  0

¥Ç¥Ð¥¤¥¹¥Õ¥¡¥¤¥ë¤Ï /dev/spidev* ¤Î¤è¤¦¤À¡£

$ ls -l /dev/spi*
crw-rw---T 1 root spi 153, 0  1·î  1  1970 /dev/spidev0.0
crw-rw---T 1 root spi 153, 1  1·î  1  1970 /dev/spidev0.1

spidev_test.c ¤ò»î¤·¤Æ¤ß¤¿¡£

$ wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-3.10.y/Documentation/spi/spidev_test.c
$ gcc -Wall -Wextra spidev_test.c -o spidev_test
spidev_test.c: In function ¡Ætransfer¡Ç:
spidev_test.c:64:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

¤Ê¤ª¡¢¿·¤·¤¤Êª¤À¤È¡¢SPI_TX_QUAD ¤Ê¤É¤Î¥·¥ó¥Ü¥ë¤¬Ìµ¤¤¤Î¤Ç¡¢¥³¥ó¥Ñ¥¤¥ë¥¨¥é¡¼¤Ë¤Ê¤ë¡£

$ wget https://raw.github.com/torvalds/linux/master/Documentation/spi/spidev_test.c
$ gcc -Wall -Wextra spidev_test.c -o spidev_test
spidev_test.c: In function ¡Ætransfer¡Ç:
spidev_test.c:60:13: error: ¡ÆSPI_TX_QUAD¡Ç undeclared (first use in this function)
spidev_test.c:60:13: note: each undeclared identifier is reported only once for each function it appears in
spidev_test.c:61:5: error: ¡Æstruct spi_ioc_transfer¡Ç has no member named ¡Ætx_nbits¡Ç
spidev_test.c:62:18: error: ¡ÆSPI_TX_DUAL¡Ç undeclared (first use in this function)
spidev_test.c:63:5: error: ¡Æstruct spi_ioc_transfer¡Ç has no member named ¡Ætx_nbits¡Ç
spidev_test.c:64:13: error: ¡ÆSPI_RX_QUAD¡Ç undeclared (first use in this function)
spidev_test.c:65:5: error: ¡Æstruct spi_ioc_transfer¡Ç has no member named ¡Ærx_nbits¡Ç
spidev_test.c:66:18: error: ¡ÆSPI_RX_DUAL¡Ç undeclared (first use in this function)
spidev_test.c:67:5: error: ¡Æstruct spi_ioc_transfer¡Ç has no member named ¡Ærx_nbits¡Ç
spidev_test.c:79:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
spidev_test.c: In function ¡Æparse_opts¡Ç:
spidev_test.c:172:12: error: ¡ÆSPI_TX_DUAL¡Ç undeclared (first use in this function)
spidev_test.c:175:12: error: ¡ÆSPI_TX_QUAD¡Ç undeclared (first use in this function)
spidev_test.c:184:12: error: ¡ÆSPI_RX_DUAL¡Ç undeclared (first use in this function)
spidev_test.c:186:12: error: ¡ÆSPI_RX_QUAD¡Ç undeclared (first use in this function)
spidev_test.c: In function ¡Æmain¡Ç:
spidev_test.c:204:18: error: ¡ÆSPI_IOC_WR_MODE32¡Ç undeclared (first use in this function)
spidev_test.c:208:18: error: ¡ÆSPI_IOC_RD_MODE32¡Ç undeclared (first use in this function)

¤³¤ì¤Ã¤Æ¡¢Flash¤Ç¤Ç¸«¤«¤±¤ë dual-SPI, quad-SPI (Ⱦ2½Å¤Ç2ËÜ¡¢¤¢¤ë¤¤¤Ï4ËܤΥǡ¼¥¿Àþ¤¬¤¢¤ë¤é¤·¤¤) ¤À¤È»×¤¦¤Î¤Ç¡¢Raspberry Pi¤È¤Ï´Ø·¸¤Ê¤¤¤Ï¤º¡£

2015-04-13

¸½»þÅÀ¤Î¥É¥é¥¤¥Ð (kernel 3.18.11-v7+)

$ lsmod
Module                  Size  Used by
bnep                   10206  2
rfcomm                 34707  4
bluetooth             287204  10 bnep,rfcomm
rfkill                 16651  3 bluetooth
i2c_dev                 6027  0
snd_bcm2835            18665  0
snd_pcm                73475  1 snd_bcm2835
snd_seq                53078  0
snd_seq_device          5628  1 snd_seq
snd_timer              17784  2 snd_pcm,snd_seq
snd                    51038  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
i2c_bcm2708             4990  0
spi_bcm2708             5137  0
uio_pdrv_genirq         2958  0
uio                     8119  1 uio_pdrv_genirq
$ find /lib/modules/`uname -r` -name 'spi*' -type f -print
/lib/modules/3.18.11-v7+/kernel/drivers/spi/spi-bcm2835.ko
/lib/modules/3.18.11-v7+/kernel/drivers/spi/spi-bcm2708.ko
[ÊÔ½¸]

SPI ¥ë¡¼¥×¥Ð¥Ã¥¯ (2015-02-19) #

MOSI ¤È MISO ¤òľ·ë¤·¤Æ¡¢SPI ¥ë¡¼¥×¥Ð¥Ã¥¯¥Æ¥¹¥È ¤·¤Æ¤ß¤¿¡£

¤Á¤ã¤ó¤Èư¤¤¤Æ¤ë¤Ã¤Ý¤¤¡£

1byteÁ÷¿®Á°¸å¤Î½èÍý¤¬ STBee(STM32F103VE) ¤ä STM32F3/F4/L1 Discovery ¤ËÈæ¤Ù¤ë¤Èû¤¤¡Ê¡á®¤¤¡Ë¤Ê¤¢¡£Cortex-M1 ¤È Cortex-A7 ¤ÎÀ­Ç½º¹¡© ¤½¤ì¤È¤â¡¢SPI²óÏ©¤¬¹âµ¡Ç½¤Ê¤Î¤«¤Ê¤¢¡£

spidev_test.c ¤è¤ê¡¢Á÷¿®¥Ç¡¼¥¿

static void transfer(int fd)
{
	int ret;
	uint8_t tx[] = {
		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
		0x40, 0x00, 0x00, 0x00, 0x00, 0x95,
		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
		0xDE, 0xAD, 0xBE, 0xEF, 0xBA, 0xAD,
		0xF0, 0x0D,
	};
...(ά)
$ ./spidev_test -D /dev/spidev0.0 -s 20000000
spi mode: 0
bits per word: 8
max speed: 20000000 Hz (20000 KHz)

FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D

¥ë¡¼¥×¥Ð¥Ã¥¯Àܳ¤ÎÁ°¤Ë¡¢¥í¥¸¥Ã¥¯¥¢¥Ê¥é¥¤¥¶¤Ç³Îǧ¤·¤¿¡£¤³¤Á¤é¤âOK¤Ã¤Ý¤¤¡£

spidev_test-speed-20MHz-logic-001.png

spidev_test-speed-20MHz-logic-002.png

spidev_test-speed-20MHz-logic-003.png

[ÊÔ½¸]

SPI SRAM (2015-02-19, 2015-02-16, 2015-02-15) #

(ºî¶ÈÃæ)

TODO:

  • ¤Á¤ã¤ó¤È SRAM¤òÆÉ¤ß½ñ¤­¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¡£
    • spidev_test.c ¤Î uint8_t tx[] ¤Ë SRAM ½ñ¤­¹þ¤ß¥³¥Þ¥ó¥É¤òÀßÄꤷ¤Æ¤ß¤ë¤«¡¢spidev_test.c ¤ò»²¹Í¤Ë¼«ºî¤¹¤ë¤«¡¢SPI Library | Gordons Projects »È¤¦¡£

¥·¥ê¥¢¥ëSRAM¥â¥¸¥å¡¼¥ë 23K256 - ¥¹¥¤¥Ã¥Á¥µ¥¤¥¨¥ó¥¹ ¤ò·Ò¤¤¤Ç¤ß¤¿¡£(Ãí°Õ: SCK ¤È MOSI ¤ÎÇÛÀþ´Ö°ã¤¤¡£¤³¤Î¤¢¤È¤Ëľ¤·¤¿):

spi.jpg spi-sram-mistake.jpg

$ ./spidev_test -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00

¥¯¥í¥Ã¥¯ 10MHz ¤Ë¤·¤Æ¡¢SCK (ch1, ÀÖ) ¤È MOSI (ch2, ²«) ¤Î¿®¹æ¤ò´Ñ¬¤·¤¿¡£

$ ./spidev_test -s 10000 -D /dev/spidev0.0

spidev_test-speed-10MHz-sck-mosi-1us.png

spidev_test-speed-10MHz-sck-mosi-500ns.png

¤É¤¦¤ä¤é¡¢¤³¤ÎÀßÄê¤Ç¤Ï SCK=7.0 MHz ¤Ë¤Ê¤ë¤é¤·¤¤¡£ (RPi SPI - eLinux.org ¤ò¸«¤ë¤È¡¢Pi 1 ¤ÈƱ¤¸¤Ê¤é 7.8MHz ¤Ë¤Ê¤ê¤½¤¦¤À¤¬)

ƱÍͤˡ¢CS (ch1, ÀÖ) ¤È MISO (ch2, ²«) ¤Î¿®¹æ¤ò´Ñ¬¤·¤¿¡£

spidev_test-speed-10MHz-cs-miso-10us.png

spidev_test-speed-10MHz-cs-miso-1us.png

¤¤¤Þ¤ÏÀµ¤·¤¤SRAM¤Î¥³¥Þ¥ó¥É¤òÁ÷¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢MOSI ¤Ï0x00¤¬Ê֤äƤ­¤Æ¤¤¤ë¤¬¡¢¤ï¤º¤«¤ËÅ۵ÊÑÆ°¤¬¤¢¤ë¡£ SCK¤Ë±þÅú¤·¤Æ¤¤¤ë¤Î¤À¤È»×¤¦¡£

2015-02-19

spidev_test.c ¤ò¤¤¤¸¤Ã¤Æ¡¢byte write ¤È byte read ¥³¥Þ¥ó¥É¤òÁ÷¤Ã¤Æ¤ß¤¿¤¬¡¢±þÅú¤·¤Ê¤¤¡£

  • write (0x02), address=0x1213, data=0x55
  • reed (0x03), address=0x1213

¥í¥¸¥Ã¥¯¥¢¥Ê¥é¥¤¥¶¤Ç³Îǧ¤¹¤ë¤È¡¢¿®¹æ¤ÏÀµ¤·¤¤¤è¤¦¤À¡£

¥ë¡¼¥×¥Ð¥Ã¥¯¤¬À®¸ù¤·¤Æ¤¤¤ë¤Î¤Ç¡¢ÇÛÀþ¥ß¥¹¤«¡¢HOLD ²ò½ü¥ß¥¹¤Ã¤Î¤«¤â¡£

spisram-logic-001.jpg spisram-logic-002.jpg

(1) Á´ÂÎ: CS¤Î´ü´Ö¤¬¥Ç¡¼¥¿Á÷¿®´ü´Ö¤Ë¤¯¤é¤Ù¤ë¤È¡¢¤Á¤ç¤Ã¤ÈŤ¤ (write»þ 18.86us, read»þ 11.97us)

spisram-20MHz-logic-sram-001.png

(2) write Éôʬ:

spisram-20MHz-logic-sram-002.png

(3) write Éôʬ ³ÈÂç:

spisram-20MHz-logic-sram-004.png

(4) read Éôʬ:

spisram-20MHz-logic-sram-003.png

(5) read Éôʬ ³ÈÂç:

spisram-20MHz-logic-sram-005.png

2015-02-22

°ÊÁ°ºî¤Ã¤¿¥³¡¼¥É (mbed STM32 Nucleo ÍÑ) ¤Ç»î¤·¤Æ¤ß¤¿¡£

GND - HOLD ´Ö 2.

½ñ¤¤¤¿¥Ç¡¼¥¿¤ÈÆÉ¤ó¤À¥Ç¡¼¥¿¤¬°ìÃפ·¤Ê¤¤¡£

CPU SystemCoreClock is 84.00 MHz

push user button to start: try_single_byte_access
USER button is pressed
write: 55 -> read: 00

push user button to start: try_byte_access
USER button is pressed
byte access test: result
  0000 : 00 OK
  0001 : 00 BAD
  0002 : 00 BAD
  0003 : 02 BAD
  0004 : 00 BAD
  0005 : 00 BAD
  0006 : 04 BAD
  0007 : 06 BAD
  0008 : 00 BAD
  0009 : 00 BAD
  000a : 00 BAD
  000b : 04 BAD
  000c : 08 BAD
  000d : 08 BAD
  000e : 0c BAD
  000f : 0e BAD

push user button to start: try_page_access
... (ά)

ÅŸ» (Vcc, Vss) ¤À¤±¤ò·Ò¤¤¤Ç¡¢Vss ¤È CS, SO, HOLD, SCK, SI ´Ö¤ÎÅ۵¤ò¬¤Ã¤¿¤È¤³¤í¡¢

0.7V ¡Á 1.1V ¤Ç¡¢¤·¤«¤âÃͤ¬°ÂÄꤷ¤Ê¤¤¡£

2015-02-28 mbed ¤Ç 23LC1024 ¤ò ÁȤ߹þ¤ß/mbed#SPISRAM ¤ò»î¤·¤¿¡£ÌäÂê¤Ê¤·¡£

[ÊÔ½¸]

pi-spidev (2015-04-13) #

¡ÖRaspberry Pi¤Ç³Ø¤ÖÅŻҹ©ºî¡×Êä­¾ðÊó ¤Ç»È¤ï¤ì¤Æ¤¤¤ë pi-spidev ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¡£

¥Ñ¥Ã¥±¡¼¥¸¤äPyPi¤òõ¤·¤Æ¤ß¤ë¤¬¡¢¸«¤Ä¤«¤é¤Ê¤¤:

$ apt-cache search pi-spidev

$ sudo apt-get install python-pip
$ pip search pi-spidev

¤½¤³¤Ç¡¢pip¤Çgithub¤Î¥ê¥Ý¥¸¥È¥ê¤ò»ØÄꤷ¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¡£¤³¤ì¤Çpip¤Î´ÉÍý²¼¤Ë¤Ê¤ë¤Î¤Ç¹¹¿·¤ä¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¬³Ú¤Ë¤Ê¤ë¤Ï¤º:

$ sudo pip install git+https://github.com/Gadgetoid/py-spidev
Downloading/unpacking git+https://github.com/Gadgetoid/py-spidev
  Cloning https://github.com/Gadgetoid/py-spidev to /tmp/pip-R3FWRt-build
  Running setup.py egg_info for package from git+https://github.com/Gadgetoid/py-spidev

Installing collected packages: spidev
  Running setup.py install for spidev
    building 'spidev' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC 
     -I/usr/src/linux/include -I/usr/include/python2.7 -c spidev_module.c -o build/temp.linux-armv7l-2.7/spidev_module.o
    spidev_module.c:35:0: warning: "PyLong_Check" redefined [enabled by default]
    /usr/include/python2.7/longobject.h:14:0: note: this is the location of the previous definition
    spidev_module.c:888:1: warning: return type defaults to ¡Æint¡Ç [-Wreturn-type]
    spidev_module.c: In function ¡Æinitspidev¡Ç:
    spidev_module.c:897:3: warning: ¡Æreturn¡Ç with no value, in function returning non-void [-Wreturn-type]
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-2.7/spidev_module.o 
     -o build/lib.linux-armv7l-2.7/spidev.so

Successfully installed spidev
Cleaning up...

ǰ¤Î¤¿¤á¡¢spidev ¤Î¾ì½ê¤ò³Îǧ¤·¤Æ¤ª¤¯:

$ python -c 'import spidev; print spidev.__file__'
/usr/local/lib/python2.7/dist-packages/spidev.so

$ ls -l `python -c 'import spidev; print spidev.__file__'`
-rwxr-xr-x 1 root staff 39964  4·î 13 23:29 /usr/local/lib/python2.7/dist-packages/spidev.so
[ÊÔ½¸]

CPU #

[ÊÔ½¸]

CPU ¥µ¥¤¥¯¥ë¥«¥¦¥ó¥¿ (Ä´ººÃæ) #

·×¬ÍÑ¤Ë us ÄøÅÙ¤ÎÀºÅÙ¤¬¤¢¤ë¥«¥¦¥ó¥¿¤¬Íߤ·¤¤¤Î¤Ç¡¢Ä´ººÃæ¡£

OpenMP ¤Î omp_get_wtime() ¤À¤È¡¢Raspberry Pi 2 ¤Ç¤ÏÀºÅÙ 1ms Á°¸å¤À¤Ã¤¿¤Î¤Ç¡£

¾ðÊó¸»:

»î¤·¤Ë DWT ¤Î CYCCNT »È¤Ã¤¿¤é¡¢ÀßÄê¥ì¥¸¥¹¥¿¤Ë¥¢¥¯¥»¥¹¤·¤¿»þÅÀ¤Ç¡¢Segmentation Fault ¤¬È¯À¸¤·¤¿¡£ ¡Ê¤È¤¤¤¦¤«¡¢Cortex-A ¤ËƱ¤¸¥ì¥¸¥¹¥¿¤Î¸ºß¤òÄ´¤Ù¤Æ¤Ê¤¤¤·¡Ë

[DwtCycCnt.cpp]

// g++ -Wall -Wextra -g -std=c++0x DwtCycCnt.cpp -o DwtCycCnt

#include <cstdio>
#include <cstdint>
#include <unistd.h>

#define DWT_CONTROL ((volatile uint32_t *)0xE0001000)
#define DWT_CYCCNT  ((volatile uint32_t *)0xE0001004)
#define SCB_DEMCR   ((volatile uint32_t *)0xE000EDFC)

static inline uint32_t getDwtCyccnt(void)
{
  return *DWT_CYCCNT;
}

static inline void resetDwtCyccnt()
{
  *DWT_CYCCNT = 0; // reset the counter
}

static inline void enableDwtCyccnt()
{
  *SCB_DEMCR = *SCB_DEMCR | (1u << 24); // TRCENA = 1
  *DWT_CONTROL = *DWT_CONTROL | 1 ; // enable the counter (CYCCNTENA = 1)
  *DWT_CYCCNT = 0; // reset the counter
}

static void check_overhead() {
  uint32_t count[11];
  enableDwtCyccnt();
  resetDwtCyccnt();
  count[0] = getDwtCyccnt();
  count[1] = getDwtCyccnt();
  count[2] = getDwtCyccnt();
  count[3] = getDwtCyccnt();
  count[4] = getDwtCyccnt();
  count[5] = getDwtCyccnt();
  count[6] = getDwtCyccnt();
  count[7] = getDwtCyccnt();
  count[8] = getDwtCyccnt();
  count[9] = getDwtCyccnt();
  count[10] = getDwtCyccnt();

  for (size_t i = 0; i <= 10; i++) {
    const uint32_t diff = (i >= 1)?(count[i] - count[i - 1]):0;
    printf("%d (%d)\n", count[i], diff);
  }
}

static void check_wait_us_accuracy() {
  uint32_t count[11];
  enableDwtCyccnt();
  resetDwtCyccnt();
  count[0] = getDwtCyccnt();
  usleep(1000);
  count[1] = getDwtCyccnt();
  usleep(1000);
  count[2] = getDwtCyccnt();
  usleep(1000);
  count[3] = getDwtCyccnt();
  usleep(1000);
  count[4] = getDwtCyccnt();
  usleep(1000);
  count[5] = getDwtCyccnt();
  usleep(1000);
  count[6] = getDwtCyccnt();
  usleep(1000);
  count[7] = getDwtCyccnt();
  usleep(1000);
  count[8] = getDwtCyccnt();
  usleep(1000);
  count[9] = getDwtCyccnt();
  usleep(1000);
  count[10] = getDwtCyccnt();

  for (size_t i = 0; i <= 10; i++) {
    const uint32_t diff = (i >= 1)?(count[i] - count[i - 1]):0;
    printf("%d (%d)\n", count[i], diff);
  }
}

int main() {
  check_overhead();
  check_wait_us_accuracy();
  return 0;
}
$ g++ -Wall -Wextra -g -std=c++0x DwtCycCnt.cpp -o DwtCycCnt
$ ./DwtCycCnt
Segmentation fault
$ gdb ./DwtCycCnt
...(ά)
Reading symbols from /home/pi/src/DwtCycCnt...done.
(gdb) r
Starting program: /home/pi/src/DwtCycCnt

Program received signal SIGSEGV, Segmentation fault.
0x000084fc in enableDwtCyccnt () at DwtCycCnt.cpp:23
23        *SCB_DEMCR = *SCB_DEMCR | (1u << 24); // TRCENA = 1
(gdb) bt
#0  0x000084fc in enableDwtCyccnt () at DwtCycCnt.cpp:23
#1  0x00008550 in check_overhead () at DwtCycCnt.cpp:30
#2  0x00008854 in main () at DwtCycCnt.cpp:83
(gdb) q
[ÊÔ½¸]

Valgrind (2015-04-15) #

Valgrind: Supported Platforms ¤Ë¤è¤ë¤È¡¢ARMv7 ¤Ç Valgrind ¤¬»È¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤¿¡£ (Valgrind Distribution Documents - 2. NEWS ¤â»²¾È¤Î¤³¤È)

Raspberry Pi 2 Model B ¤ÎCPU ¤Ï Cortex-A7 ¤Ê¤Î¤Ç¡¢»È¤¨¤ë¤Ï¤º¡£ ¥¤¥ó¥¹¥È¡¼¥ë¤·¤ÆÆ°ºî¤ò³Îǧ¤·¤¿¡£

$ apt-cache search valgrind
alleyoop - Front-end to the Valgrind memory checker
codeblocks-contrib - contrib plugins for Code::Blocks IDE
codeblocks-contrib-dbg - Debugging libraries for the Code::Blocks contrib plugins
eclipse-cdt-valgrind - Valgrind integration for Eclipse CDT
eclipse-cdt-valgrind-remote - Valgrind integration for Eclipse CDT (remote launch)
jovie-dbg - debugging symbols for jovie
kaccessible-dbg - debugging symbols for kaccessible
kcachegrind - visualisation tool for the Valgrind profiler
kmag-dbg - debugging symbols for kmag
kmousetool-dbg - debugging symbols for kmousetool
kmouth-dbg - debugging symbols for kmouth
kwalletmanager-dbg - debugging symbols for kwalletmanager
libtest-valgrind-perl - module to test Perl code through valgrind
mutextrace - Lock debugging tool
nemiver - Standalone graphical debugger for GNOME
valgrind - instrumentation framework for building dynamic analysis tools
valgrind-dbg - instrumentation framework for building dynamic analysis tools (debug)
valgrind-mpi - instrumentation framework for building dynamic analysis tools (MPI module)
valkyrie - open-source graphical user interface for the Valgrind

eclipse-cdt-valgrind ¤È¤« eclipse-cdt-valgrind-remote ¤È¤«¤ÏÃΤé¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢¤¢¤È¤Ç»î¤·¤Æ¤ß¤ë¤«¤â¡£

¥Ñ¥Ã¥±¡¼¥¸¾ðÊó

$ apt-cache show valgrind
Package: valgrind
Version: 1:3.7.0-6+rpi1
Architecture: armhf
Maintainer: Alessandro Ghedini <ghedo@debian.org>
Installed-Size: 35723
Depends: libc6 (>= 2.13-28), libgcc1 (>= 1:4.4.0), libc6-dbg
Recommends: valgrind-dbg, gdb
Suggests: valgrind-mpi, kcachegrind, alleyoop, valkyrie (>> 1.3.0)
Homepage: http://www.valgrind.org/
Priority: optional
Section: devel
Filename: pool/main/v/valgrind/valgrind_3.7.0-6+rpi1_armhf.deb
Size: 15820534
SHA256: 28ae807bdb0903e876ba897ecc33aaaf50c56ea63cdfc71316edb137caaf2772
SHA1: be8fe2bdb53b85cc759d5e8eb014c2448d999c82
MD5sum: b8567ecffd417237ba967a3286a7eb5e
Description: instrumentation framework for building dynamic analysis tools
 Valgrind is a system for debugging and profiling Linux programs. With its tool
 suite you can automatically detect many memory management and threading bugs,
 avoiding hours of frustrating bug-hunting and making your programs more stable.
 You can also perform detailed profiling to help speed up your programs and use
 Valgrind to build new tools.
 .
 The Valgrind distribution currently includes six production-quality tools:
  * a memory error detector (Memcheck)
  * two thread error detectors (Helgrind and DRD)
  * a cache and branch-prediction profiler (Cachegrind)
  * a call-graph generating cache and branch-prediction profiler (Callgrind)
  * a heap profiler (Massif)
 It also includes three experimental tools:
  * a stack/global array overrun detector (SGCheck)
  * a second heap profiler that examines how heap blocks are used (DHAT)
  * a SimPoint basic block vector generator (BBV)

apt-get install valgrind ¤ÇÄ󰯤µ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸¤Î¤¦¤Á valkyrie ¤Ï¾¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò¤Û¤È¤ó¤ÉÍ׵ᤷ¤Ê¤¤¤Î¤Ç¡¢¤¿¤á¤·¤ËÆþ¤ì¤Æ¤ß¤¿¡£

$ sudo apt-get install valgrind valkyrie

2015-04-15 memcheck ¤ò»î¤¹

°Ê²¼¤Î¥½¡¼¥¹¤Ç»î¤·¤Æ¤ß¤¿¡£

[invalid_access.c]

    1  #include <stdio.h>
    2  #include <stdlib.h>
    3  #include <stdint.h>
    4
    5  int main(void) {
    6    uint8_t * heapArray = malloc(sizeof(uint8_t) * 10);
    7
    8    heapArray[0] = 1;
    9    heapArray[100] = 100;  /* Access violation */
   10
   11    printf("heapArray[0]=%d\n", heapArray[0]);
   12    printf("heapArray[100]=%d\n", heapArray[100]);  /* Access violation */
   13
   14    /* forget free(heapArray); */
   15
   16    return 0;
   17  }

¥Ç¥Ð¥Ã¥°¾ðÊó̵¤·:

$ gcc -Wall -Wextra invalid_access.c -o invalid_access
$ valgrind ./invalid_access
==4766== Memcheck, a memory error detector
==4766== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4766== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4766== Command: ./invalid_access
==4766==
==4766== Invalid write of size 1
==4766==    at 0x8434: main (in /home/pi/src/scratch/invalid_access)
==4766==  Address 0x498d08c is not stack'd, malloc'd or (recently) free'd
==4766==
heapArray[0]=1
==4766== Invalid read of size 1
==4766==    at 0x845C: main (in /home/pi/src/scratch/invalid_access)
==4766==  Address 0x498d08c is not stack'd, malloc'd or (recently) free'd
==4766==
heapArray[100]=100
==4766==
==4766== HEAP SUMMARY:
==4766==     in use at exit: 10 bytes in 1 blocks
==4766==   total heap usage: 1 allocs, 0 frees, 10 bytes allocated
==4766==
==4766== LEAK SUMMARY:
==4766==    definitely lost: 10 bytes in 1 blocks
==4766==    indirectly lost: 0 bytes in 0 blocks
==4766==      possibly lost: 0 bytes in 0 blocks
==4766==    still reachable: 0 bytes in 0 blocks
==4766==         suppressed: 0 bytes in 0 blocks
==4766== Rerun with --leak-check=full to see details of leaked memory
==4766==
==4766== For counts of detected and suppressed errors, rerun with: -v
==4766== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 13 from 6)

¥Ç¥Ð¥Ã¥°¾ðÊó¤Ä¤­ (-g):

$ gcc -g -Wall -Wextra invalid_access.c -o invalid_access
$ valgrind ./invalid_access
==4758== Memcheck, a memory error detector
==4758== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4758== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4758== Command: ./invalid_access
==4758==
==4758== Invalid write of size 1
==4758==    at 0x8434: main (invalid_access.c:9)
==4758==  Address 0x498d08c is not stack'd, malloc'd or (recently) free'd
==4758==
heapArray[0]=1
==4758== Invalid read of size 1
==4758==    at 0x845C: main (invalid_access.c:12)
==4758==  Address 0x498d08c is not stack'd, malloc'd or (recently) free'd
==4758==
heapArray[100]=100
==4758==
==4758== HEAP SUMMARY:
==4758==     in use at exit: 10 bytes in 1 blocks
==4758==   total heap usage: 1 allocs, 0 frees, 10 bytes allocated
==4758==
==4758== LEAK SUMMARY:
==4758==    definitely lost: 10 bytes in 1 blocks
==4758==    indirectly lost: 0 bytes in 0 blocks
==4758==      possibly lost: 0 bytes in 0 blocks
==4758==    still reachable: 0 bytes in 0 blocks
==4758==         suppressed: 0 bytes in 0 blocks
==4758== Rerun with --leak-check=full to see details of leaked memory
==4758==
==4758== For counts of detected and suppressed errors, rerun with: -v
==4758== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 13 from 6)

9¹ÔÌܤ¬invalid wrie, 12¹ÔÌܤ¬invalid read ¤Ë¤Ê¤ë¤Ï¤º¡£ ¹ÔÈÖ¹æ¤Ï¹ç¤Ã¤Æ¤¤¤ë¤Î¤À¤¬¡¢¥¨¥é¡¼É½¼¨¤µ¤ì¤¿¹Ô¤¬¤º¤ì¤Æ¤ë¤ß¤¿¤¤¤À¡£

2015-04-17 cachegrind ¤Ç¹ÔËè¤Î¥­¥ã¥Ã¥·¥å¥Ò¥Ã¥ÈΨ¤òÄ´¤Ù¤Æ¤ß¤¿¡£

¼¡¸µÇÛÎó¤Ë2¼¡¸µ¤Î¥Ç¡¼¥¿¡Ê²èÁü¤È¤«¡Ë¤ò³ÊǼ¤·¤¿¤È¸«¤Ê¤·¡¢¤½¤ì¤ò¥é¥¹¥¿¡¼½ç¤Ë¥¢¥¯¥»¥¹¤·¤Æ¹ç·×¤ò»»½Ð¤¹¤ë¥³¡¼¥É

[cache_check.c]

    1  /*
    2
    3  Compile (ANSI C99)
    4  $ gcc -g -std=C99 -Wall -Wextra cache_check.c -o cache_check
    5   */
    6
    7  #include <stdio.h>
    8  #include <stdlib.h>
    9  #include <stdint.h>
   10
   11  int main(void) {
   12    uint8_t * i8array = malloc(sizeof(uint8_t) * 128 * 128);
   13
   14    /* initialize array */
   15    for (int y = 0; y < 128; y++) {
   16      for (int x = 0; x < 128; x++) {
   17        i8array[128 * y + x] = 128 * y + x;
   18      }
   19    }
   20
   21    /* reduction (sum) */
   22    uint32_t sum = 0;
   23    for (int y = 0; y < 128; y++) {
   24      for (int x = 0; x < 128; x++) {
   25        sum += i8array[128 * y + x];
   26      }
   27    }
   28    printf("sum = %d\n", sum);
   29
   30    free(i8array);
   31
   32    return 0;
   33  }
¡úANSI C99¤È¤·¤Æ¥Ó¥ë¥É (ÊÑ¿ô¤ÎÀë¸À°ÌÃÖ¤¬´ó¤ê¼«Í³¤Ë¤Ê¤ë¤Î¤Ç)
$ gcc -g -std=c99 -Wall -Wextra cache_check.c -o cache_check

¡ú¼Â¹Ô¤·¤Æ¤ß¤ë
$ ./cache_check
sum = 2088960

¡úcachegrind ¤Ç·×¬¤¹¤ë
$ valgrind --tool=cachegrind --verbose ./cache_check
==2848== Cachegrind, a cache and branch-prediction profiler
==2848== Copyright (C) 2002-2011, and GNU GPL'd, by Nicholas Nethercote et al.
==2848== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==2848== Command: ./cache_check
==2848==
--2848-- Valgrind options:
--2848--    --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--2848--    --tool=cachegrind
--2848--    --verbose
--2848-- Contents of /proc/version:
--2848--   Linux version 3.18.11-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) 
(crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #777 SMP PREEMPT Sat Apr 11 17:30:37 BST 2015
--2848-- Arch and hwcaps: ARM, ARMv7-vfp-neon
--2848-- Page sizes: currently 4096, max supported 4096
--2848-- Valgrind library directory: /usr/lib/valgrind
--2848-- Warning: Cannot auto-detect cache config on ARM, using one or more defaults
==2848== Cache configuration used: ¡ú¥¨¥ß¥å¥ì¡¼¥È¤·¤¿¥­¥ã¥Ã¥·¥å¤ÎÀßÄê¡£¥Ç¥Õ¥©¥ë¥È¤Ï¥Û¥¹¥È(Cortex-A7)¤ÈƱ¤¸¡©
==2848==   I1: 16,384 B, 4-way, 64 B lines
==2848==   D1: 16,384 B, 4-way, 64 B lines
==2848==   LL: 262,144 B, 8-way, 64 B lines
--2848-- Reading syms from /home/pi/src/scratch/cache_check (0x8000)
--2848-- Reading syms from /lib/arm-linux-gnueabihf/ld-2.13.so (0x4000000)
--2848--   Considering /lib/arm-linux-gnueabihf/ld-2.13.so ..
--2848--   .. CRC mismatch (computed 9142f4fb wanted 894d9514)
--2848--   Considering /usr/lib/debug/lib/arm-linux-gnueabihf/ld-2.13.so ..
--2848--   .. CRC is valid
--2848-- Reading syms from /usr/lib/valgrind/cachegrind-arm-linux (0x38000000)
--2848--   Considering /usr/lib/valgrind/cachegrind-arm-linux ..
--2848--   .. CRC mismatch (computed 1a52e8e8 wanted 9d3c6d52)
--2848--   Considering /usr/lib/debug/usr/lib/valgrind/cachegrind-arm-linux ..
--2848--   .. CRC is valid
--2848--    object doesn't have a dynamic symbol table
==2848== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-2848-by-pi-on-???
==2848== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-2848-by-pi-on-???
==2848== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-2848-by-pi-on-???
==2848==
==2848== TO CONTROL THIS PROCESS USING vgdb (which you probably
==2848== don't want to do, unless you know exactly what you're doing,
==2848== or are doing some strange experiment):
==2848==   /usr/lib/valgrind/../../bin/vgdb --pid=2848 ...command...
==2848==
==2848== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==2848==   /path/to/gdb ./cache_check
==2848== and then give GDB the following command
==2848==   target remote | /usr/lib/valgrind/../../bin/vgdb --pid=2848
==2848== --pid is optional if only one valgrind process is running
==2848==
--2848-- Reading syms from /usr/lib/valgrind/vgpreload_core-arm-linux.so (0x4827000)
--2848--   Considering /usr/lib/valgrind/vgpreload_core-arm-linux.so ..
--2848--   .. CRC mismatch (computed af6eafeb wanted c297409c)
--2848--   Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-arm-linux.so ..
--2848--   .. CRC is valid
--2848-- Reading syms from /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x4831000)
--2848-- Reading syms from /lib/arm-linux-gnueabihf/libc-2.13.so (0x484b000)
--2848--   Considering /lib/arm-linux-gnueabihf/libc-2.13.so ..
--2848--   .. CRC mismatch (computed c5b5bcf6 wanted 47e3b85a)
--2848--   Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libc-2.13.so ..
--2848--   .. CRC is valid
sum = 2088960
==2848==
==2848== I   refs:      779,390
==2848== I1  misses:      1,050
==2848== LLi misses:        863
==2848== I1  miss rate:    0.13%
==2848== LLi miss rate:    0.11%
==2848==
==2848== D   refs:      358,507  (276,166 rd   + 82,341 wr)
==2848== D1  misses:      2,641  (  2,146 rd   +    495 wr)
==2848== LLd misses:      1,906  (  1,464 rd   +    442 wr)
==2848== D1  miss rate:     0.7% (    0.7%     +    0.6%  )
==2848== LLd miss rate:     0.5% (    0.5%     +    0.5%  )
==2848==
==2848== LL refs:         3,691  (  3,196 rd   +    495 wr)
==2848== LL misses:       2,769  (  2,327 rd   +    442 wr)
==2848== LL miss rate:      0.2% (    0.2%     +    0.5%  )

¡úcachegrind¤Î·ë²Ì¤ò¸«¤ä¤¹¤¯¤·¤Æ¡¢¥½¡¼¥¹¥³¡¼¥É¤È´ØÏ¢¤Å¤±¤ÆÉ½¼¨¤¹¤ë
$ cg_annotate --auto=yes cachegrind.out.2848
--------------------------------------------------------------------------------
I1 cache:         16384 B, 64 B, 4-way associative
D1 cache:         16384 B, 64 B, 4-way associative
LL cache:         262144 B, 64 B, 8-way associative
Command:          ./cache_check
Data file:        cachegrind.out.2848
Events recorded:  Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Events shown:     Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Event sort order: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Thresholds:       0.1 100 100 100 100 100 100 100 100
Include dirs:
User annotated:
Auto-annotation:  on

--------------------------------------------------------------------------------
     Ir  I1mr ILmr      Dr  D1mr  DLmr     Dw D1mw DLmw
--------------------------------------------------------------------------------
779,390 1,050  863 276,166 2,146 1,464 82,341  495  442  PROGRAM TOTALS

--------------------------------------------------------------------------------
     Ir I1mr ILmr      Dr D1mr DLmr     Dw D1mw DLmw  file:function
--------------------------------------------------------------------------------
609,311    7    4 230,151   10    0 66,054  256  255  /home/pi/src/scratch/cache_check.c:main
 48,285   10   10  13,328  735  574     18    1    0  /eglibc-2.13/elf/dl-addr.c:_dl_addr
 28,305   12   12   9,609  255  131  4,113    6    0  /eglibc-2.13/elf/dl-lookup.c:do_lookup_x
 13,946   14    9   4,220   96   81  2,335   12    0  /eglibc-2.13/elf/dl-lookup.c:_dl_lookup_symbol_x
  9,586   14    9       0    0    0      0    0    0  ???:__udivsi3
  9,476   20   20   2,324  227  194  2,055    6    1  /eglibc-2.13/elf/../ports/sysdeps/arm/dl-machine.h:_dl_relocate_object
  8,390    1    1   2,706   45   16      0    0    0  /eglibc-2.13/string/strcmp.c:strcmp
  5,592   12   12   2,024  236  199    136    2    0  /eglibc-2.13/elf/do-rel.h:_dl_relocate_object
  4,542    7    6   1,966   39    9    558    0    0  /eglibc-2.13/elf/dl-lookup.c:check_match.8400
  2,427    6    5      19    2    1    604   10   10  /eglibc-2.13/elf/rtld.c:_dl_start
  2,295    7    4     745    3    2    745    4    4  /eglibc-2.13/string/mempcpy.c:mempcpy
  2,098   20   12     255   25   25     42    0    0  /eglibc-2.13/elf/dl-load.c:check_arm_attributes_hfabi
  2,026    3    3     431    1    1     27    0    0  /eglibc-2.13/elf/dl-minimal.c:strsep
  1,826   44   32     528    8    3    200    2    2  /eglibc-2.13/elf/dl-load.c:_dl_map_object_from_fd
  1,534   25   25     191    2    1    113    3    3  /eglibc-2.13/elf/../elf/dl-sysdep.c:_dl_important_hwcaps
  1,495   33   30     297    3    1    129    2    2  /eglibc-2.13/elf/dl-deps.c:_dl_map_object_deps
  1,356    6    2     511   12    0    252    1    1  /eglibc-2.13/elf/dl-misc.c:_dl_name_match_p
  1,249   11   11     384    2    1    102    0    0  /eglibc-2.13/elf/dl-load.c:open_path
  1,217    2    2     128    3    3      0    0    0  /eglibc-2.13/string/../ports/sysdeps/arm/strlen.S:strlen
  1,154   18   10     226    7    4     55    2    1  /eglibc-2.13/string/strchr.c:index
  1,087    4    2       0    0    0    774   50   49  /eglibc-2.13/string/../ports/sysdeps/arm/memset.S:memset
  1,018   14   14     342   12    9    156    6    6  /eglibc-2.13/elf/dl-version.c:_dl_check_map_versions
  1,013   63   59     260   27   16    102    5    5  /eglibc-2.13/elf/rtld.c:dl_main
    939   13    8     154   13   13     91    9    9  /eglibc-2.13/elf/dynamic-link.h:_dl_map_object_from_fd
    918   22   12     327    6    4    206    1    1  /eglibc-2.13/elf/dl-load.c:open_verify
    888    3    3     333    0    0    333    2    0  ???:__aeabi_uidivmod
    882    5    5     141    9    9     33    0    0  /eglibc-2.13/elf/dl-cache.c:_dl_cache_libcmp
    826    5    4     251    5    1    192    0    0  /eglibc-2.13/elf/dl-minimal.c:__libc_memalign
    814   18   13     314    9    8    126    2    2  /eglibc-2.13/string/memcmp.c:bcmp
    788   15   15     259   13    1    168    0    0  /eglibc-2.13/elf/dl-reloc.c:_dl_relocate_object
    786   29   24     197    5    2     92    2    2  /eglibc-2.13/elf/dl-load.c:_dl_map_object
    786   18   10     142    9    5    118   17   17  /eglibc-2.13/elf/dl-object.c:_dl_new_object
    785    3    3      13    1    1    266   16   16  /eglibc-2.13/malloc/malloc.c:malloc_consolidate

--------------------------------------------------------------------------------
-- Auto-annotated source: /home/pi/src/scratch/cache_check.c
--------------------------------------------------------------------------------
     Ir I1mr ILmr     Dr D1mr DLmr     Dw D1mw DLmw

-- line 3 ----------------------------------------
      .    .    .      .    .    .      .    .    .  Compile (ANSI C99)
      .    .    .      .    .    .      .    .    .  $ gcc -g -std=C99 -Wall -Wextra cache_check.c -o cache_check
      .    .    .      .    .    .      .    .    .   */
      .    .    .      .    .    .      .    .    .
      .    .    .      .    .    .      .    .    .  #include <stdio.h>
      .    .    .      .    .    .      .    .    .  #include <stdlib.h>
      .    .    .      .    .    .      .    .    .  #include <stdint.h>
      .    .    .      .    .    .      .    .    .
      3    0    0      0    0    0      2    0    0  int main(void) {
      4    1    1      0    0    0      1    0    0    uint8_t * i8array = malloc(sizeof(uint8_t) * 128 * 128);
      .    .    .      .    .    .      .    .    .
      .    .    .      .    .    .      .    .    .    /* initialize array */
    774    1    1    257    0    0    129    0    0    for (int y = 0; y < 128; y++) {
 99,072    1    1 32,896    0    0 16,512    0    0      for (int x = 0; x < 128; x++) {
245,760    0    0 81,920    0    0 16,384  256  255        i8array[128 * y + x] = 128 * y + x;
      .    .    .      .    .    .      .    .    .      }
      .    .    .      .    .    .      .    .    .    }
      .    .    .      .    .    .      .    .    .
      .    .    .      .    .    .      .    .    .    /* reduction (sum) */
      2    0    0      0    0    0      1    0    0    uint32_t sum = 0;
    774    1    0    257    0    0    129    0    0    for (int y = 0; y < 128; y++) {
 99,072    1    1 32,896    0    0 16,512    0    0      for (int x = 0; x < 128; x++) {
163,840    0    0 81,920    9    0 16,384    0    0        sum += i8array[128 * y + x];
      .    .    .      .    .    .      .    .    .      }
      .    .    .      .    .    .      .    .    .    }
      4    0    0      2    1    0      0    0    0    printf("sum = %d\n", sum);
      .    .    .      .    .    .      .    .    .
      2    1    0      1    0    0      0    0    0    free(i8array);
      .    .    .      .    .    .      .    .    .
      1    1    0      0    0    0      0    0    0    return 0;
      3    0    0      2    0    0      0    0    0  }

--------------------------------------------------------------------------------
The following files chosen for auto-annotation could not be found:
--------------------------------------------------------------------------------
  /eglibc-2.13/string/strcmp.c
  /eglibc-2.13/elf/do-rel.h
  /eglibc-2.13/elf/dl-load.c
  /eglibc-2.13/elf/dl-object.c
  /eglibc-2.13/elf/dl-lookup.c
  /eglibc-2.13/elf/dl-reloc.c
  /eglibc-2.13/string/strchr.c
  /eglibc-2.13/malloc/malloc.c
  /eglibc-2.13/elf/../ports/sysdeps/arm/dl-machine.h
  /eglibc-2.13/elf/dl-cache.c
  /eglibc-2.13/elf/dl-addr.c
  /eglibc-2.13/string/memcmp.c
  /eglibc-2.13/elf/dl-minimal.c
  /eglibc-2.13/string/../ports/sysdeps/arm/strlen.S
  /eglibc-2.13/elf/rtld.c
  /eglibc-2.13/elf/../elf/dl-sysdep.c
  /eglibc-2.13/string/mempcpy.c
  /eglibc-2.13/elf/dl-version.c
  /eglibc-2.13/elf/dynamic-link.h
  /eglibc-2.13/elf/dl-misc.c
  /eglibc-2.13/string/../ports/sysdeps/arm/memset.S
  /eglibc-2.13/elf/dl-deps.c

--------------------------------------------------------------------------------
Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
--------------------------------------------------------------------------------
78    1    0 83    0    0 80   52   58  percentage of events annotated
[ÊÔ½¸]

OpenMP (2015-02-11) #

g++ 4.6.3 ¤Ç C++11 ¤ò»È¤¦¤Ë¤Ï -std=c++0x ¤ò¡¢OpenMP ¤ò»È¤¦¤Ë¤Ï -fopenmp ¤ò»ØÄꤹ¤ë¡£

g++ -Wall -Wextra -std=c++0x -fopenmp sample.cpp

°ÊÁ°ºî¤Ã¤¿¥µ¥ó¥×¥ë¥³¡¼¥É(Èó¸ø³«)¤ò¼Â¹Ô¤·¤Æ¤ß¤¿:

$ ./OpenMP-sample
-------------------------------- src/main.cpp
__GNUC__        4
__GNUC_MINOR__  6
__GNUC_PATCHLEVEL__     3
================================ src/omp_environment.cpp
-------- show_version
OpenMP¤Î¥Ð¡¼¥¸¥ç¥ó (µ¬³Ê¤Îȯ¹Ôǯ·î¤¬É½¼¨¤µ¤ì¤ë)
_OPENMP 200805     ¡úOpenMP 3.0 (May, 2008)

-------- omp_get_wtick, omp_get_wtime
»þ·×¤Îʬ²òǽ(ñ°Ì=ÉÃ)
omp_get_wtick() 0.010000000  ¡ú¢­¤ò¸«¤ë¤È¡¢¤â¤Ã¤Èʬ²òǽ¤¬¤¢¤ê¤½¤¦¡£

¼Â¹Ô½êÍ×»þ´Ö(ñ°Ì=ÉÃ)¤Î¼èÆÀ¤È¡¢»þ·×¤Î¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É    ¡ú¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤Ï 0.15¡Á0.3ms ¤¯¤é¤¤¡£
omp_get_wtime() lapse
1672.677471118
1672.677658669  0.000187551   
1672.677814606  0.000343488
1672.678319552  0.000848434
1672.678418874  0.000947756
1672.678555176  0.001084058
1672.678870800  0.001399682
1672.679116893  0.001645775
1672.679249236  0.001778118
1672.679488714  0.002017596
1672.679579703  0.002108585

-------- omp_set_num_threads
¥×¥í¥»¥Ã¥µ¤Î¸Ä¿ô¡¢¥¹¥ì¥Ã¥É¸Ä¿ô¤Î¾å¸Â¡Ê¥Ç¥Õ¥©¥ë¥È¤Ï¥×¥í¥»¥Ã¥µ¤Î¸Ä¿ô¤ÈƱ¤¸¡Ë¡¢ÊÂÎó¼Â¹Ô»þ¤Î¥¹¥ì¥Ã¥É¤Î¸Ä¿ô¤òɽ¼¨
omp_get_num_procs()     4
omp_get_max_threads()   4
omp_get_num_threads()   1
omp_get_num_threads()   4

¥¹¥ì¥Ã¥É¸Ä¿ô¤Î¾å¸Â¤òÊѹ¹¤·¤Æ¡¢¥¹¥ì¥Ã¥É¤Î¸Ä¿ô¤òɽ¼¨
omp_set_num_threads(32)
omp_get_max_threads()   32
omp_get_num_threads()   32

¥¹¥ì¥Ã¥É¸Ä¿ô¤Î¾å¸Â¤ò¥×¥í¥»¥Ã¥µ(CPU)¤Î¸Ä¿ô¤Ë¤¹¤ë¡Ê¥Ç¥Õ¥©¥ë¥ÈÃÍ)
omp_set_num_threads(omp_get_num_procs());
omp_get_max_threads()   4
omp_get_num_threads()   4

-------- work_sharing
#pragma omp parallel
  omp_get_thread_num()  1
  omp_get_thread_num()  2
  omp_get_thread_num()  3
  omp_get_num_threads() 4
  omp_get_thread_num()  0

#pragma omp parallel sections
13213132122321333333333333333333333333333331311313133333333333333332332332322323233232323232323232323232323232323232323333333333333333333333
#pragma omp parallel for
2212221211211212121212121212121212121212121212121100000000000000000000000003333333333333333333333333

-------- schedule
½èÍý¤ò¤É¤Î¥¹¥ì¥Ã¥É¤Ç¼õ¤±»ý¤Ä¤«(schedule)¤òÊѹ¹
for¥ë¡¼¥×¤Î schedule = static, dyanmic, guided ¤Î¥¹¥ì¥Ã¥ÉÈÖ¹æ¤òÄ´¤Ù¤ë
#pragma omp parallel for schedule(static) ¥Ç¥Õ¥©¥ë¥È2102010202113333
#pragma omp parallel for schedule(dynamic)1212121221212121
#pragma omp parallel for schedule(dynamic, 10)1110101001001111
#pragma omp parallel for schedule(guided)1021212111111100
#pragma omp parallel for schedule(guided, 10)1212121212121111

½èÍý¤ÎÈÖ¹æ(i)¤È¥¹¥ì¥Ã¥ÉÈÖ¹æ¤ÎÂбþ
i       static  dynamic,1       dynamic,10      guided,1        guided,10
0       0       1       1       1       1
1       0       2       1       1       1
2       0       1       1       1       1
3       0       2       1       1       1
4       1       1       1       2       1
5       1       2       1       2       1
6       1       1       1       2       1
7       1       2       1       0       1
8       2       2       1       0       1
9       2       1       1       0       1
10      2       2       0       1       2
11      2       1       0       1       2
12      3       2       0       1       2
13      3       1       0       1       2
14      3       2       0       1       2
15      3       1       0       1       2

================================ src/omp_individual.cpp
omp_get_max_threads()   4
omp_individual_work_size        uint8_t * 4096 * 4096

-------- gaussian_3x3_single_thread
ms      check   n_diff_pixels
2564.882362     OK      0
2550.656086     OK      0
2548.113304     OK      0
2547.112076     OK      0
2545.456788     OK      0
2546.855083     OK      0
2545.650416     OK      0
2545.925222     OK      0
2544.560816     OK      0
2545.884577     OK      0

-------- gaussian_3x3_openmp_for_outer_loop
ms      check   n_diff_pixels
641.776434      OK      0
626.879151      OK      0
674.770125      OK      0
626.764525      OK      0
674.721595      OK      0
626.209382      OK      0
674.698221      OK      0
627.517407      OK      0
674.440835      OK      0
627.202262      OK      0

-------- gaussian_3x3_openmp_for_inner_loop
ms      check   n_diff_pixels
748.730422      OK      0
669.946650      OK      0
699.864569      OK      0
750.428612      OK      0
671.053537      OK      0
749.915500      OK      0
671.267453      OK      0
729.486782      OK      0
699.267937      OK      0
709.807593      OK      0

-------- gaussian_3x3_openmp_for_both_loop
ms      check   n_diff_pixels
655.128886      OK      0
654.878320      OK      0
694.150062      OK      0
655.224995      OK      0
699.691666      OK      0
655.453909      OK      0
699.351364      OK      0
654.958243      OK      0
700.086687      OK      0
656.681634      OK      0

================================ src/omp_reduction_256bin.cpp
omp_get_max_threads()   4
omp_reduction_256bin_work_size  uint8_t * 4096 * 4096

-------- histogram_256bin_single_thread
ms      check   num_diff
163.604907      OK      0
165.135423      OK      0
164.131885      OK      0
164.508447      OK      0
163.600533      OK      0
164.103032      OK      0
163.540689      OK      0
164.057251      OK      0
163.572514      OK      0
164.401470      OK      0

-------- histogram_256bin_openmp_bad
ms      check   num_diff
268.962466      BAD     256
279.571805      BAD     256
278.824309      BAD     256
278.656550      BAD     256
278.546290      BAD     256
278.587175      BAD     256
267.763620      BAD     256
278.628584      BAD     256
279.117905      BAD     256
278.600408      BAD     256

-------- histogram_256bin_openmp_private_array
ms      check   num_diff
47.936192       OK      0
47.874941       OK      0
47.934525       OK      0
47.992390       OK      0
48.008691       OK      0
48.335409       OK      0
47.938015       OK      0
47.879212       OK      0
47.920514       OK      0
47.949837       OK      0

-------- histogram_256bin_openmp_atomic
ms      check   num_diff
429.840990      OK      0
397.410739      OK      0
396.484961      OK      0
396.533973      OK      0
429.769487      OK      0
396.760745      OK      0
396.848976      OK      0
396.552988      OK      0
429.939024      OK      0
396.982781      OK      0

-------- histogram_256bin_openmp_critical
ms      check   num_diff
4154.972577     OK      0
4205.215623     OK      0
4199.205732     OK      0
4161.488698     OK      0
4149.992617     OK      0
4205.745539     OK      0
4185.637243     OK      0
4197.598324     OK      0
4181.936414     OK      0
4179.929044     OK      0

================================ src/omp_reduction_1bin.cpp
omp_get_max_threads()   4
omp_reduction_1bin_work_size    uint8_t * 4096 * 4096

-------- sum_single_thread
ms      check   sum_diff
63.674338       OK      0
63.710328       OK      0
63.673036       OK      0
63.636266       OK      0
63.659755       OK      0
63.668766       OK      0
63.639964       OK      0
63.773661       OK      0
63.647152       OK      0
63.720953       OK      0

-------- sum_openmp_bad
ms      check   sum_diff
23.244513       BAD     -1603788654
22.975763       BAD     -1604076233
23.236337       BAD     -1604067525
22.970400       BAD     -1603727838
24.618312       BAD     -1604072241
23.294826       BAD     -1604063120
23.186180       BAD     -1604076233
22.964462       BAD     -1604069153
31.515322       BAD     -1604132288
42.129873       BAD     -1187849365

-------- sum_openmp_reduction_sum
ms      check   sum_diff
34.089689       OK      0
29.089964       OK      0
17.605884       OK      0
17.759791       OK      0
17.424375       OK      0
17.779009       OK      0
17.518697       OK      0
17.776509       OK      0
17.489323       OK      0
17.735416       OK      0

-------- sum_openmp_atomic
ms      check   sum_diff
1330.859795     OK      0
1320.857753     OK      0
1320.987869     OK      0
1320.553819     OK      0
1320.988465     OK      0
1320.628895     OK      0
1330.595751     OK      0
1320.730271     OK      0
1320.514763     OK      0
1320.376337     OK      0

-------- sum_openmp_critical
ms      check   sum_diff
4385.937429     OK      0
4365.334330     OK      0
4361.050503     OK      0
4409.528609     OK      0
4366.287441     OK      0
4384.821565     OK      0
4380.404920     OK      0
4370.798285     OK      0
4384.306949     OK      0
4359.819101     OK      0

(2015-02-15)

¥¬¥¦¥·¥¢¥ó¥«¡¼¥Í¥ë 3x3 ¤Ç 4096x4096x8bit¤ò¡¢¥¹¥ì¥Ã¥É¤Î¸Ä¿ô¤òÊѤ¨¤Æ½èÍý¤·¤Æ¤ß¤¿¡£

$ g++ -Wall -Wextra -std=c++0x -fopenmp openmp_gaussian.cpp -o openmp_gaussian

$ ./openmp_gaussian
omp_get_max_threads()   4
omp_individual_work_size        uint8_t * 4096 * 4096

elapse time = 3.89343

$ OMP_NUM_THREADS=4 ./openmp_gaussian
omp_get_max_threads()   4
omp_individual_work_size        uint8_t * 4096 * 4096

elapse time = 3.89494

$ OMP_NUM_THREADS=3 ./openmp_gaussian
omp_get_max_threads()   3
omp_individual_work_size        uint8_t * 4096 * 4096

elapse time = 5.19081

$ OMP_NUM_THREADS=2 ./openmp_gaussian
omp_get_max_threads()   2
omp_individual_work_size        uint8_t * 4096 * 4096

elapse time = 7.78272

$ OMP_NUM_THREADS=1 ./openmp_gaussian
omp_get_max_threads()   1
omp_individual_work_size        uint8_t * 4096 * 4096

elapse time = 15.5639

[openmp_gaussian.cpp]

// -*- tab-width : 4 ; mode : C++ -*-
// Raspberry Pi 2 Model B, g++ 4.6.3
// g++ -Wall -Wextra -std=c++0x -fopenmp openmp_gaussian.cpp -o openmp_gaussian


#include <iostream>
#include <vector>
#include <cstdint>

#include <omp.h>

namespace {

/**
 * 3x3 ¥¬¥¦¥·¥¢¥ó¥Õ¥£¥ë¥¿ ¥«¡¼¥Í¥ë
 *
 * @param[out] dst ½ÐÎϲèÁüÇÛÎó
 * @param[in] src ÆþÎϲèÁüÇÛÎó
 * @param[in] size_x ²èÁüÇÛÎó¤ÎÂ礭¤µX
 * @param[in] x ÃåÌܺÂɸX
 * @param[in] y ÃåÌܺÂɸX
 */
inline void
gaussian_3x3(
    std::vector<uint8_t> & dst,
    const std::vector<uint8_t> & src,
    const int size_x,
    const int x,
    const int y
) {
    const int gaussian[][3] = {
        { 1, 2, 1 },
        { 2, 4, 2 },
        { 1, 2, 1 },
    };
    const int denominator = 16;
    const int half = 3 / 2;

    int sum = 0;
    for (int dy = -half; dy <= half; ++dy) {
        for (int dx = -half; dx <= half; ++dx) {
            const size_t index = ((y + dy) * size_x) + (x + dx);
            sum += gaussian[dy + half][dx + half] * src[index];
        }
    }

    dst[y * size_x + x] = uint8_t(sum / denominator);
}

/**
 * ¥¬¥¦¥·¥¢¥ó¥Õ¥£¥ë¥¿
 * - OpenMP ³°Â¦¤Î¥ë¡¼¥×¤òÊÂÎó²½
 *
 * @param[out] dst ½ÐÎϲèÁüÇÛÎó
 * @param[in] src ÆþÎϲèÁüÇÛÎó
 * @param[in] size_x ²èÁüÇÛÎó¤ÎÂ礭¤µX
 * @param[in] size_y ²èÁüÇÛÎó¤ÎÂ礭¤µY
 */
void
gaussian_3x3_openmp_for_outer_loop(
    std::vector<uint8_t> & dst,
    const std::vector<uint8_t> & src,
    const int size_x,
    const int size_y
) {
    #pragma omp parallel for
    for (int y = 1; y < size_y - 1; ++y) {
        for (int x = 1; x < size_x - 1; ++x) {
            gaussian_3x3(dst, src, size_x, x, y);
        }
    }
}

} // namespace

int
main(int, char *[]) {
    using std::cout;
    using std::endl;

    cout << "omp_get_max_threads()\t" << omp_get_max_threads() << endl;

    // ÆþÎϥǡ¼¥¿¥µ¥¤¥º
    const int SIZE_X = 1024 * 4;
    const int SIZE_Y = 1024 * 4;
    cout << "omp_individual_work_size\t" << "uint8_t * " << SIZE_X << " * " << SIZE_Y << endl;
    cout << std::endl;

    // ÆþÎϥǡ¼¥¿¤òºîÀ®¤¹¤ë
    std::vector<uint8_t> src(SIZE_X * SIZE_Y);
    srand(0);
    for (int i = 0; i < SIZE_X * SIZE_Y; ++i) {
        src[i] = uint8_t((rand() >> 2) % 256);  // ²¼2bit¼Î¤Æ¤Æ¤«¤é¡¢0¡Á255¤ÎÃͤòÆÀ¤ë¡£
    }

    std::vector<uint8_t> dst(SIZE_X * SIZE_Y);

    const double start = omp_get_wtime();
    gaussian_3x3_openmp_for_outer_loop(dst, src, SIZE_X, SIZE_Y);
    const double end = omp_get_wtime();

    cout << "elapse time = " << (end - start) << endl;

    return 0;
}
[ÊÔ½¸]

cpuinfo, bogoMIPS (2015-02-11) #

TODO

2015-02-13

/proc/cpuinfo, BogoMIPS

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 38.40
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

processor       : 1
(ά)
processor       : 2
(ά)
processor       : 3
(ά)

¤ä¤¿¤é¤ÈBogoMIPS¤¬¾®¤µ¤¤¡£??

[ÊÔ½¸]

microSD #

[ÊÔ½¸]

dump ¤Ç¥Ð¥Ã¥¯¥¢¥Ã¥× (2015-04-19) #

dump ¥³¥Þ¥ó¥É¤Ç¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤Æ¤ß¤ë¡£ ¥Ð¥Ã¥¯¥¢¥Ã¥×Àè¤ÏNAS¡¢¤¢¤ë¤¤¤ÐUSB¥á¥â¥ê¤Ç¡£

¾ðÊó¸»:

dump¥³¥Þ¥ó¥É¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£Ç°¤Î¤¿¤á¥³¥Þ¥ó¥É¤ÎÀäÂХѥ¹¤òÄ´¤Ù¤Æ¤ª¤¯¡£

$ sudo apt-get install dump

$ dpkg -S /sbin/dump
dump: /sbin/dump

$ dpkg -S /sbin/restore
dump: /sbin/restore

¥Ð¥Ã¥¯¥¢¥Ã¥×Àè¤Î¥Õ¥¡¥¤¥ë̾¤ò¼«Æ°À¸À®¤¹¤ë¡£ (Ãí°Õ: ¥Û¥¹¥È̾¤Ï raspi-config ¤Ç 'raspi2-4' ¤ËÊѹ¹¤·¤Æ¤¤¤ë) echo ¥³¥Þ¥ó¥É¤Ç»î¤¹:

$ echo $(hostname --short)-$(date +%Y%m%d-%H%M%S).dump.gz
raspi2-4-20150418-223223.879407545.dump.gz

¼êư¤ÇNAS¤Î¶¦Í­¥Õ¥©¥ë¥À¤ò¥Þ¥¦¥ó¥È¤·¡¢dump¤·¤Æ¡¢¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë:

$ sudo -i
# mount -t cifs //NAS¤ÎIP¥¢¥É¥ì¥¹/¶¦Í­¥Õ¥©¥ë¥À /mnt -o "user=¶¦Í­¥Õ¥©¥ë¥À¤Î¥æ¡¼¥¶Ì¾ password=¥Ñ¥¹¥ï¡¼¥É"
# dump -0 -f - /dev/root | gzip -c > /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump.gz
# umount /mnt/backup
  • hostname: ¡Ö--short¡×¤Çû¤¤¥Û¥¹¥È̾
  • date: ¡Ö+%Y%m%d-%H%M%S¡×¤Çǯ·îÆü-»þʬÉÃ
  • dump: ¡Ö-0¡×¤Ç¥À¥ó¥×¥ì¥Ù¥ë=¥Õ¥ë¥Ð¥Ã¥¯¥¢¥Ã¥× ¡Ö-f -¡×¤Ç½ÐÎÏÀè¤òɸ½à½ÐÎϤË
  • gzip: ¡Ö-c¡×¤Ç½ÐÎÏÀè¤òɸ½à½ÐÎϤË

¤Ê¤ª¡¢gzip ¤Ç°µ½Ì¤·¤Ê¤¤¾ì¹ç¤Ï¡¢dump ¥³¥Þ¥ó¥É¤Ï¼¡¤Î¤è¤¦¤Ë¤¹¤ë:

# dump -0 -f /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump /dev/root

ưºî¤ò³Îǧ¤·¤¿¤é¡¢°ìÏ¢¤Îºî¶È¤ò /usr/local/sbin/ ¤Ë¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤È¤·¤ÆÃÖ¤¤¤Æ¤ª¤¯¤È¤è¤¤¡£

[ÊÔ½¸]

restore ¤Ç¥ê¥¹¥È¥¢ (2015-04-25) #

º£²ó¤Ï PC ¤ÎUbuntu 14.04 Desktop amd64 ¤òΩ¤Á¾å¤²¤Æ¡¢microSD ¥«¡¼¥É¤ËÂФ·¤Æ¥ê¥¹¥È¥¢¤·¤¿¡£ (VMware ¾å¤Ç¹Ô¤Ã¤Æ¤¤¤ë¤¬¡¢VMware ¼«ÂΤÎÁàºî¤Ïά¤¹¡Ë¡£ ¤Þ¤¿¡¢microSD ¤Ï²áµî¤ËRaspbian¤òÆþ¤ì¤Æ¤¤¤¿Êª¤ò»È¤Ã¤¿¤Î¤Ç¡¢¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤ÎºîÀ®¤Ï¹Ô¤Ã¤Æ¤Ê¤¤

ɬÍפʥѥ屡¼¥¸¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£ º£²ó¡¢¥Ð¥Ã¥¯¥¢¥Ã¥×¤ÏNAS¤Îcifs¤Ëºî¤Ã¤¿¤Î¤Ç¡¢dump¥Ñ¥Ã¥±¡¼¥¸¤Î¾¤Ë¡¢cifs-utils ¤â¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£

$ sudo apt-get install dump cifs-utils

microSD¤òÁÞÆþ¤¹¤ë¡£º£²ó¤Ï²áµî¤ËRaspbian¤òÆþ¤ì¤Æ¤¤¤¿¥«¡¼¥É¤ò»È¤Ã¤¿¤Î¤Ç¡¢¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤¬Â¸ºß¤¹¤ë¡£ ¥Ð¥Ã¥¯¥¢¥Ã¥×¤Ï2ÈÖÌܤΥѡ¼¥Æ¥£¥·¥ç¥ó(root)¤Ê¤Î¤Ç¡¢¤³¤Î¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤ò¥Õ¥©¡¼¥Þ¥Ã¥È¤¹¤ë¡£

$ sudo umount /dev/sdf2
$ sudo mkfs.ext4 /dev/sdf2

Ubuntu ¤Î¥Ç¥¹¥¯¥È¥Ã¥×¤Ç2ÈÖÌܤΥѡ¼¥Æ¥£¥·¥ç¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡Ö³«¤¯¡×¤òÁª¤Ö¤È¥Þ¥¦¥ó¥È¤µ¤ì¤ë¡£

restore-root-mount.png

NAS¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò¥Þ¥¦¥ó¥È¤¹¤ë¡£

$ sudo -i
# mount -t cifs //NAS¤ÎIP¥¢¥É¥ì¥¹/¶¦Í­¥Õ¥©¥ë¥À̾ /mnt -o "user=¥æ¡¼¥¶¡¼Ì¾"
Password for ¥æ¡¼¥¶¡¼Ì¾@//NAS¤ÎIP¥¢¥É¥ì¥¹/¶¦Í­¥Õ¥©¥ë¥À̾: 

microSD¤Î¥ê¥¹¥È¥¢Àè¥Ç¥£¥ì¥¯¥È¥ê¤Ë°Üư¤·¤Æ¡¢NAS¾å¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë¤ò¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥ê¥¹¥È¥¢¤¹¤ë¡£

# cd /media/Ubuntu¤Î¥æ¡¼¥¶Ì¾/¥Þ¥¦¥ó¥È¤µ¤ì¤¿Ì¾Á°/
# zcat /mnt/¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë̾.dump.gz | restore -r -f -
# sync

¤Ê¤ª¡¢gzip¤Ç°µ½Ì¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢restore ¥³¥Þ¥ó¥É¤Ï¼¡¤Î¤è¤¦¤Ë¤¹¤ë:

# restore -r -f /mnt/¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë̾.dump

̵»ö¡¢¥ê¥¹¥È¥¢¤µ¤ì¤¿¡£

# ls
bin/	   dev/   lib/	       mnt/   restoresymtable  sbin/	 sys/  var/
boot/	   etc/   lost+found/  opt/   root/	       selinux/  tmp/
boot.bak/  home/  media/       proc/  run/	       srv/	 usr/

ɬÍפαþ¤¸¤Æ¥Õ¥¡¥¤¥ë¤ò½¤Àµ¤¹¤ë¡£ ¡ÊÎã¡§¥Û¥¹¥È̾¤ò½¤Àµ¤¹¤ë¤Ê¤é¡¢/etc/hostname ¤È /etc/hosts ¤ò½¤Àµ¤¹¤ë)

microSD¤ò¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë¡£¤³¤ì¤Ç´°Î»¡£

# cd 
# umount /mnt
[ÊÔ½¸]

dump, restore ¼Â¹ÔÎã #

dump, ̵ÀþLAN, gzip °µ½Ì¤¢¤ê

̵ÀþLAN GW-USNANO2A ·Ðͳ¤ÇNAS¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿¡£ ¤³¤Î²óÀþ¤Î®ÅÙ¤Ï iperf ¤Ç 2 ¡Á 10 MB/s ¤¯¤é¤¤¡£ gzip°µ½Ì¤¢¤ê¡£2.85 GB ¤Ç 20ʬ00Éá¢2491 kB/s¡£

# dump -0 -f - /dev/root | gzip -c > /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump.gz
 DUMP: Date of this level 0 dump: Sun Apr 19 00:50:54 2015
 DUMP: Dumping /dev/root (/) to standard output
 DUMP: Label: none
 DUMP: Writing 10 Kilobyte records
 DUMP: mapping (Pass I) [regular files]
 DUMP: mapping (Pass II) [directories]
 DUMP: estimated 2984885 blocks.
 DUMP: Volume 1 started with block 1 at: Sun Apr 19 00:50:57 2015
 DUMP: dumping (Pass III) [directories]
 DUMP: dumping (Pass IV) [regular files]
 DUMP: 23.44% done at 2332 kB/s, finished in 0:16
 DUMP: 48.78% done at 2426 kB/s, finished in 0:10
 DUMP: 73.83% done at 2448 kB/s, finished in 0:05
 DUMP: 100.00% done at 2489 kB/s, finished in 0:00
 DUMP: Volume 1 completed at: Sun Apr 19 01:10:57 2015
 DUMP: Volume 1 2989740 blocks (2919.67MB)
 DUMP: Volume 1 took 0:20:00
 DUMP: Volume 1 transfer rate: 2491 kB/s
 DUMP: 2989740 blocks (2919.67MB)
 DUMP: finished in 1200 seconds, throughput 2491 kBytes/sec
 DUMP: Date of this level 0 dump: Sun Apr 19 00:50:54 2015
 DUMP: Date this dump completed:  Sun Apr 19 01:10:57 2015
 DUMP: Average transfer rate: 2491 kB/s
 DUMP: DUMP IS DONE

¥Ð¥Ã¥¯¥¢¥Ã¥×¸µ¤Ï 2.85GB ¤Ç¡¢¼Â¹Ô½êÍ×»þ´Ö¤Ï 20ʬ¡£

¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë¤ÎÂ礭¤µ¤ÏÌó1.2GB¤À¤Ã¤¿¤Î¤Ç¡¢ 42% ¤Ë°µ½Ì¤µ¤ì¤Æ¤¤¤ë¡£

# ls -l /mnt/backup/raspi2-4-20150419-005054.601461088.dump.gz
-rwxr-xr-x 1 root root 1293060867  4·î 19 00:50 /mnt/backup/raspi2-4-20150419-005054.601461088.dump.gz

dump, Í­ÀþLAN, gzip °µ½Ì¤¢¤ê

Í­ÀþLAN ·Ðͳ¤ÇNAS¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿¡£ gzip°µ½Ì¤¢¤ê¡£4.0GB ¤Ç 26ʬ40Éá¢2630 kB/s¡£ ̵ÀþLAN¤è¤ê¤ï¤º¤«¤Ë®¤¤ (2491 kB/s ¢ª 2630 kB/s)¡£GigaEther¤ÊUSB-LAN¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤ò»È¤¨¤Ð¡¢¤â¤Ã¤È®¤¯¤Ê¤ë¤«¤â¡£

# dump -0 -f - /dev/root | gzip -c > /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump.gz
 DUMP: Date of this level 0 dump: Sun Apr 19 01:34:58 2015
 DUMP: Dumping /dev/root (/) to standard output
 DUMP: Label: none
 DUMP: Writing 10 Kilobyte records
 DUMP: mapping (Pass I) [regular files]
 DUMP: mapping (Pass II) [directories]
 DUMP: estimated 4205829 blocks.
 DUMP: Volume 1 started with block 1 at: Sun Apr 19 01:35:00 2015
 DUMP: dumping (Pass III) [directories]
 DUMP: dumping (Pass IV) [regular files]
 DUMP: 21.82% done at 3059 kB/s, finished in 0:17
 DUMP: 39.32% done at 2756 kB/s, finished in 0:15
 DUMP: 58.54% done at 2735 kB/s, finished in 0:10
 DUMP: 76.46% done at 2679 kB/s, finished in 0:06
 DUMP: 94.63% done at 2653 kB/s, finished in 0:01
 DUMP: Volume 1 completed at: Sun Apr 19 02:01:40 2015
 DUMP: Volume 1 4209400 blocks (4110.74MB)
 DUMP: Volume 1 took 0:26:40
 DUMP: Volume 1 transfer rate: 2630 kB/s
 DUMP: 4209400 blocks (4110.74MB)
 DUMP: finished in 1600 seconds, throughput 2630 kBytes/sec
 DUMP: Date of this level 0 dump: Sun Apr 19 01:34:58 2015
 DUMP: Date this dump completed:  Sun Apr 19 02:01:40 2015
 DUMP: Average transfer rate: 2630 kB/s
 DUMP: DUMP IS DONE

dump, ̵ÀþLAN, gzip °µ½Ì¤Ê¤·

̵ÀþLAN GW-USNANO2A ·Ðͳ¤ÇNAS¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿¡£ gzip°µ½Ì̵¤·¡£2.7GB ¤Ç 9ʬ20Éá¢5054 kB/s¡£

# dump -0 /dev/root -f /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump
 DUMP: Date of this level 0 dump: Sun Apr 26 10:29:22 2015
 DUMP: Dumping /dev/root (/) to /mnt/raspi2-4-20150426-102922.dump
 DUMP: Label: none
 DUMP: Writing 10 Kilobyte records
 DUMP: mapping (Pass I) [regular files]
 DUMP: mapping (Pass II) [directories]
 DUMP: estimated 2825425 blocks.
 DUMP: Volume 1 started with block 1 at: Sun Apr 26 10:29:24 2015
 DUMP: dumping (Pass III) [directories]
 DUMP: dumping (Pass IV) [regular files]
 DUMP: 62.85% done at 5918 kB/s, finished in 0:02
 DUMP: Closing /mnt/raspi2-4-20150426-102922.dump
 DUMP: Volume 1 completed at: Sun Apr 26 10:38:44 2015
 DUMP: Volume 1 2830310 blocks (2763.97MB)
 DUMP: Volume 1 took 0:09:20
 DUMP: Volume 1 transfer rate: 5054 kB/s
 DUMP: 2830310 blocks (2763.97MB) on 1 volume(s)
 DUMP: finished in 502 seconds, throughput 5638 kBytes/sec
 DUMP: Date of this level 0 dump: Sun Apr 26 10:29:22 2015
 DUMP: Date this dump completed:  Sun Apr 26 10:38:44 2015
 DUMP: Average transfer rate: 5054 kB/s
 DUMP: DUMP IS DONE

dump, USB¥á¥â¥ê, gzip °µ½Ì¤Ê¤·

USB¥á¥â¥ê SanDisk SDCZ80-032G ¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿¡£ ¥Ð¥Ã¥¯¥¢¥Ã¥×Àè¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ï FAT32¡£ gzip°µ½Ì̵¤·¡£2.7GB ¤Ç 4ʬ15Éá¢11,099 kB/s¡£

# parted -l
Model: SanDisk Extreme (scsi)
Disk /dev/sda: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      16.4kB  32.0GB  32.0GB  primary  fat32        lba


Model: SD USDU1 (sd/mmc)
Disk /dev/mmcblk0: 16.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  62.9MB  58.7MB  primary  fat16        lba
 2      62.9MB  15.1GB  15.0GB  primary  ext4

# mount /dev/sda1 /mnt
# dump -0 /dev/root -f /mnt/$(hostname --short)-$(date +%Y%m%d-%H%M%S).dump
 DUMP: Date of this level 0 dump: Sun Apr 26 10:48:28 2015
 DUMP: Dumping /dev/root (/) to /mnt/raspi2-4-20150426-104828.dump
 DUMP: Label: none
 DUMP: Writing 10 Kilobyte records
 DUMP: mapping (Pass I) [regular files]
 DUMP: mapping (Pass II) [directories]
 DUMP: estimated 2825425 blocks.
 DUMP: Volume 1 started with block 1 at: Sun Apr 26 10:48:30 2015
 DUMP: dumping (Pass III) [directories]
 DUMP: dumping (Pass IV) [regular files]
 DUMP: Closing /mnt/raspi2-4-20150426-104828.dump
 DUMP: Volume 1 completed at: Sun Apr 26 10:52:45 2015
 DUMP: Volume 1 2830310 blocks (2763.97MB)
 DUMP: Volume 1 took 0:04:15
 DUMP: Volume 1 transfer rate: 11099 kB/s
 DUMP: 2830310 blocks (2763.97MB) on 1 volume(s)
 DUMP: finished in 255 seconds, throughput 11099 kBytes/sec
 DUMP: Date of this level 0 dump: Sun Apr 26 10:48:28 2015
 DUMP: Date this dump completed:  Sun Apr 26 10:52:45 2015
 DUMP: Average transfer rate: 11099 kB/s
 DUMP: DUMP IS DONE
# umount /mnt
[ÊÔ½¸]

/ ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¥µ¥¤¥º¤ò14GiB ¤ËÅý°ì¤·¤¿ (2015-03-01) #

Ubuntu 14.04 Desktop ¤Î²¾ÁÛ¥Þ¥·¥ó¤ò»È¤Ã¤Æ¡¢Ê£¿ô¤ÎmicroSD ¤ËÆþ¤ì¤¿ Raspbian ¤ä Ubuntu (Raspberry Pi 2ÀìÍÑÈÇ) ¤Î / ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¥µ¥¤¥º¤ò 14 GiB (14 * 1024 * 1024) ¤ËÅý°ì¤·¤¿¡£

¤³¤¦¤ä¤Ã¤Æ¤ª¤±¤Ð¡¢16GB ¤Î MicroSD ¤ÎÍÆÎ̤¬Â¿¾¯¾¯¤Ê¤¯¤Æ¤â¡¢¥³¥Ô¡¼¤·¤ÆÆ°¤«¤»¤ë¤Ï¤º¡£ ¥³¥Ô¡¼¤Ë¤Ï DD for Windows - ¥·¥ê¥³¥ó¥ê¥Ê¥Ã¥¯¥¹³ô¼°²ñ¼Ò ¤Î¡Ö¥Ç¥£¥¹¥¯¥µ¥¤¥º¤è¤êÂ礭¤Ê¥¤¥á¡¼¥¸¥Õ¥¡¥¤¥ë¤Î½ñ¹þ¤òµö²Ä¡×¤¹¤ëµ¡Ç½¤ò»È¤¦¡£

¼ê½ç:

(º£²ó¤Ï PC ¤Ç VMware Workstation 11.1.0 ¤Ç¡¢Ubuntu 14.04 Desktop ¤Î²¾ÁÛ¥Þ¥·¥ó¤ò»È¤Ã¤Æ¤¤¤ë¡£¥¹¥¯¥ê¡¼¥ó¥·¥ç¥Ã¥È¤ò»£¤ë¤¿¤á)

1. (VMware ¤Ç) Ubuntu 14.04 Desktop ¤òµ¯Æ°¤¹¤ë¡£

2. gparted ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£¡Ösudo apt-get install gparted¡×

3. (VMware ¤ò»È¤Ã¤¿¤Î¤Ç: VM -> ¼è¤ê³°¤·²Äǽ¥Ç¥Ð¥¤¥¹ ¤Î USB microSD¥«¡¼¥É¥ê¡¼¥À¡¼ ¤ò¡ÖÀܳ¡×¤¹¤ë¡£)

gparted-005.png

4. microSD ¤ò¥«¡¼¥É¥ê¡¼¥À¡¼¤Ëº¹¤·¹þ¤à¤È¡¢¥Þ¥¦¥ó¥È¤µ¤ì¤ë¡£

5. gparted ¤Ç / ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤ÎÂ礭¤µ¤ò¾®¤µ¤¯¤¹¤ë¡£

5.1 Gparted(G) -> ¥Ç¥Ð¥¤¥¹¤ò¹¹¿·

gparted-006.png

5.2 microSD ¤Î¥Ç¥Ð¥¤¥¹¤òÁªÂò¤¹¤ë¡£¼ê¸µ¤Ç¤Ï /dev/sdf ¤À¤Ã¤¿

gparted-007.png

5.3 ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó2 ¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤·(¼ê¸µ¤Ç¤Ï/dev/sdf2)¡¢¡Ö¥¢¥ó¥Þ¥¦¥ó¥È(U)¡×¤òÁª¤Ö¡£

gparted-008.png

5.4 ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó2 ¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤·(¼ê¸µ¤Ç¤Ï/dev/sdf2)¡¢¡Ö¥ê¥µ¥¤¥º/°Üư(R)¡×¤òÁª¤Ö¡£

gparted-001.png

5.5 ¡Ö¿·¤·¤¤¥µ¥¤¥º¡×¤ò¾®¤µ¤¯¤·¤Æ¡¢¡Ö¥ê¥µ¥¤¥º/°Üư¡×¥Ü¥¿¥ó¤ò²¡¤¹¡£º£²ó¤Ï 14336 MiB (=14 * 1024 = 14 GiB) ¤Ë¤·¤¿¡£

gparted-002.png

5.6 ¥Ä¡¼¥ë¥Ð¡¼¤ÎÎФΡ֥Á¥§¥Ã¥¯¡×¤ò²¡¤·¤Æ¡¢Å¬ÍѤ¹¤ë¡£

gparted-003.png

6. ¥É¥Ã¥¯? ¤Î USB ¥á¥â¥ê¤Ã¤Ý¤¤¥¢¥¤¥³¥ó¤ò±¦¥¯¥ê¥Ã¥¯¤·¤Æ¡¢¡Ö¿Æ¥É¥é¥¤¥Ö¤ò¼è¤ê½Ð¤¹¡×¤òÁª¤Ö¡£microSD¤¬ÀÚ¤êÎ¥¤µ¤ì¤ë¤Î¤Ç¡¢¥«¡¼¥É¥ê¡¼¥À¡¼¤«¤é¼è¤ê½Ð¤¹¡£

gparted-004.png

[ÊÔ½¸]

microSD ¤ÎÍÆÎÌ¡¦Â®ÅÙ (2015-02-12) #

¾ðÊó¸»:

°Ê²¼¤ÎmicroSD¤ò»ÈÍѤ·¤¿¡£

1,2¤Ï¼ê»ý¤Á¤Îʪ¡£3¤Ïº£²ó¿·¤¿¤Ë¹ØÆþ¤·¤¿Êª¤Ç¡¢¤³¤ì¤ò¼ç¤Ë»È¤¦Í½Äê¡£

#³µÎ¬·¿ÈÖÍÆÎÌ(SDFormatter)®ÅÙ(Win32 Disk Imager write, read)
1Toshiba class 414.8GB (15,989,780,992 byte)write 8.8MB/s, read 13.4¡Á20.2MB/s2015-02-12
2Samsung class 10MB-MP16D14.6GB (15,710,121,472 byte)write 17.3MB/s, read 27¡Á32MB/s2015-02-12
3Transcend class 10 UHI-1, MLCTS16GUSDHC10U115.0GB (16,162,511,872 byte)write 32.2MB/s, read 31.8¡Á32.6MB/s2015-02-12
4Transcend class 10TS16GUSDU1E14.7GB (15,800,599,552 byte)write 12.4¡Á13.1MB/s, read 32.1¡Á36.6MB/s2015-02-22

®Å٤ϡ¢IODATA USB2-W63RW ¤È Seagate ST2000DM001 ´Ö¤ÎžÁ÷»þ¤ÎÃͤòµ­ºÜ¤·¤¿¡£

cd /sys/class/mmc_host/mmc?/mmc?:*
echo "man:$(cat manfid) oem:$(cat oemid) name:$(cat name) hwrev:$(cat hwrev) fwrev:$(cat fwrev)"
  • Toshiba class 4 : (̤³Îǧ)
  • MB-MP16D : (̤³Îǧ)
  • TS16GUSDHC10U1 : man:0x000074 oem:0x4a60 name:USDU1 hwrev:0x2 fwrev:0x0 (¼ê»ý¤Á¤Î4Ëç¤ÏÁ´¤ÆÆ±¤¸ÃͤÀ¤Ã¤¿)
[ÊÔ½¸]

fio - Flexible I/O Tester (2015-02-22) #

¤ò¸«¤Æ¡¢fio ¤ò»î¤·¤Æ¤ß¤¿¡£

fio ¤Ï git.kernel.dk Git - fio.git/summary ¤«¤éºÇ¿·¤Î¥¿¥° fio-2.2.5 ¤òÍѤ¤¤¿¡£

¼ê½ç:

sudo apt-get install -y libaio-dev
git clone -b fio-2.2.5 git://git.kernel.dk/fio.git
cd fio
./configure && make && sudo make install
cd ..
wget http://www.winkey.jp/downloads/visit.php/fio-crystaldiskmark
fio fio-crystaldiskmark | perl -ne '
print "$1 : " if(/(.+): \(groupid=/);
print "$1 " if(/bw=([\d. ]+[KM]?B\/s)/);
print "[ $1 IOPS]\n" if(/iops=(\d+)/)'

Transcend TS16GUSDHC10U1 (class 10, UHC-1, MLC):

Seq-Read : 19049KB/s [ 18 IOPS]
Seq-Write : 8478.4KB/s [ 8 IOPS]
Rand-Read-512K : 18929KB/s [ 36 IOPS]
Rand-Write-512K : 6140.9KB/s [ 11 IOPS]
Rand-Read-4K : 4142.3KB/s [ 1035 IOPS]
Rand-Write-4K : 114071B/s [ 27 IOPS]
Rand-Read-4K-QD32 : 5431.8KB/s [ 1357 IOPS]
Rand-Write-4K-QD32 : 187558B/s [ 45 IOPS]

Transcend TS16GUSDU1E (class 10):

Seq-Read : 18965KB/s [ 18 IOPS]
Seq-Write : 8285.8KB/s [ 8 IOPS]
Rand-Read-512K : 18921KB/s [ 36 IOPS]
Rand-Write-512K : 2258.6KB/s [ 4 IOPS]
Rand-Read-4K : 4293.2KB/s [ 1073 IOPS]
Rand-Write-4K : 602501B/s [ 147 IOPS]
Rand-Read-4K-QD32 : 5050.4KB/s [ 1262 IOPS]
Rand-Write-4K-QD32 : 372645B/s [ 90 IOPS]

Samsung MB-MP16D (class 10):

Seq-Read : 18875KB/s [ 18 IOPS]
Seq-Write : 10404KB/s [ 10 IOPS]
Rand-Read-512K : 18704KB/s [ 36 IOPS]
Rand-Write-512K : 1578.2KB/s [ 3 IOPS]
Rand-Read-4K : 5293.8KB/s [ 1323 IOPS]
Rand-Write-4K : 669128B/s [ 163 IOPS]
Rand-Read-4K-QD32 : 6519.2KB/s [ 1629 IOPS]
Rand-Write-4K-QD32 : 553794B/s [ 135 IOPS]

USB¥á¥â¥ê SDCZ80 32GB (EXT4 ¤Ç¥Õ¥©¡¼¥Þ¥Ã¥È):

Seq-Read : 27990KB/s [ 27 IOPS]
Seq-Write : 25493KB/s [ 24 IOPS]
Rand-Read-512K : 25486KB/s [ 49 IOPS]
Rand-Write-512K : 20748KB/s [ 40 IOPS]
Rand-Read-4K : 6051.0KB/s [ 1512 IOPS]
Rand-Write-4K : 2890.9KB/s [ 722 IOPS]
Rand-Read-4K-QD32 : 6115.4KB/s [ 1528 IOPS]
Rand-Write-4K-QD32 : 2284.9KB/s [ 571 IOPS]

USB¥á¥â¥ê¤Ï Linux¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤òºî¤Ã¤Æ¡¢EXT4¤Ç¥Õ¥©¡¼¥Þ¥Ã¥È¤·¤Æ¡¢·×¬Íѥǥ£¥ì¥¯¥È¥ê¤òºîÀ®:

$ sudo cfdisk /dev/sda
$ mke2fs -t ext4 /dev/sda1
$ sudo mount /dev/sda1 /mnt
$ sudo mkdir /mnt/tmp
$ sudo chmod 777 /mnt/tmp

/tmp/mnt ¤ò»È¤¦¥¸¥ç¥Ö¤òÍѰÕ:

$ diff fio-crystaldiskmark fio-crystaldiskmark-mnt
7c7
< directory=/tmp/
---
> directory=/mnt/tmp/

¼ê½ç¡Ê¥¨¥é¡¼¢ª¤ä¤êľ¤·¤ò´Þ¤à)

fio-2.2.5 ¤ò¼èÆÀ¤¹¤ë:

$ git clone -b fio-2.2.5 git://git.kernel.dk/fio.git

¥Ó¥ë¥É¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë:

$ ./configure && make && sudo make install
Operating system              Linux
CPU                           arm
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      32
zlib                          yes
Linux AIO support             no
POSIX AIO support             yes
POSIX AIO support needs -lrt  yes
POSIX AIO fsync               yes
Solaris AIO support           no
__sync_fetch_and_add          yes
libverbs                      no
rdmacm                        no
Linux fallocate               yes
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      yes
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_PRECISE       no
gettimeofday                  yes
fdatasync                     yes
sync_file_range               yes
EXT4 move extent              yes
Linux splice(2)               yes
GUASI                         no
Fusion-io atomic engine       no
libnuma                       no
strsep                        yes
strcasestr                    yes
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 yes
SCHED_IDLE                    yes
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                yes
pwritev/preadv                yes
IPv6 helpers                  yes
Rados Block Device engine     no
setvbuf                       yes
Gluster API engine            no
s390_z196_facilities          no
HDFS engine                   no
lex/yacc for arithmetic       no
    CC gettime.o
    CC ioengines.o
    CC stat.o
    CC log.o
    CC time.o
    CC filesetup.o
    CC eta.o
    CC verify.o
    CC memory.o
    CC io_u.o
    CC parse.o
    CC mutex.o
    CC options.o
    CC lib/rbtree.o
    CC smalloc.o
    CC filehash.o
    CC profile.o
    CC debug.o
    CC lib/rand.o
    CC lib/num2str.o
    CC lib/ieee754.o
    CC crc/crc16.o
    CC crc/sha512.o
    CC crc/sha1.o
    CC crc/crc32c.o
    CC crc/fnv.o
    CC crc/murmur3.o
    CC crc/crc32c-intel.o
    CC crc/xxhash.o
    CC crc/test.o
    CC crc/sha256.o
    CC crc/crc32.o
    CC crc/md5.o
    CC crc/crc7.o
    CC crc/crc64.o
    CC engines/cpu.o
    CC engines/mmap.o
    CC engines/sync.o
    CC engines/null.o
    CC engines/net.o
    CC memalign.o
    CC server.o
    CC client.o
    CC iolog.o
    CC backend.o
    CC libfio.o
    CC flow.o
    CC cconv.o
    CC lib/prio_tree.o
    CC json.o
    CC lib/zipf.o
    CC lib/axmap.o
    CC lib/lfsr.o
    CC gettime-thread.o
    CC helpers.o
    CC lib/flist_sort.o
    CC lib/hweight.o
    CC lib/getrusage.o
    CC idletime.o
    CC td_error.o
    CC profiles/tiobench.o
    CC profiles/act.o
    CC io_u_queue.o
    CC filelock.o
    CC lib/tp.o
    CC lib/bloom.o
    CC engines/posixaio.o
    CC engines/falloc.o
    CC engines/e4defrag.o
    CC engines/splice.o
    CC diskutil.o
    CC fifo.o
    CC blktrace.o
    CC cgroup.o
    CC trim.o
    CC engines/sg.o
    CC engines/binject.o
    CC lib/linux-dev-lookup.o
  LINK fio
  LINK t/fio-genzipf
  LINK t/fio-btrace2fio
  LINK t/fio-dedupe
  LINK t/stest
  LINK t/ieee754
  LINK t/axmap
  LINK t/lfsr-test
install -m 755 -d /usr/local/bin
install fio t/fio-genzipf t/fio-btrace2fio t/fio-dedupe tools/fio_generate_plots 
tools/plot/fio2gnuplot tools/genfio /usr/local/bin
install -m 755 -d /usr/local/man/man1
install -m 644 fio.1 /usr/local/man/man1
install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1
install -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1
install -m 755 -d /usr/local/share/fio
install -m 644 tools/plot/*gpm /usr/local/share/fio/

fio-crystaldiskmark ¤ò¼èÆÀ¤·¤Æ¡¢¼Â¹Ô¤¹¤ë¡Ä¡Ä¼ºÇÔ¡£libaio ¤Î shared object ¤¬¸«¤Ä¤«¤é¤Ê¤¤:

$ wget http://www.winkey.jp/downloads/visit.php/fio-crystaldiskmark

$ which fio
/usr/local/bin/fio

$ fio fio-crystaldiskmark
fio: engine libaio not loadable
fio: failed to load engine libaio
fio: file:ioengines.c:99, func=dlopen, error=libaio: cannot open shared object file: 
 No such file or directory

libaio ¤Î³«È¯¥Ñ¥Ã¥±¡¼¥¸¤òõ¤·¤Æ¡¢¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë:

$ apt-cache search libaio
libaio-dev - Linux kernel AIO access library - development files
libaio1 - Linux kernel AIO access library - shared library
libaio1-dbg - Linux kernel AIO access library - debugging symbols

$ sudo apt-get install libaio-dev
¥Ñ¥Ã¥±¡¼¥¸¥ê¥¹¥È¤òÆÉ¤ß¹þ¤ó¤Ç¤¤¤Þ¤¹... ´°Î»
°Í¸´Ø·¸¥Ä¥ê¡¼¤òºîÀ®¤·¤Æ¤¤¤Þ¤¹
¾õÂÖ¾ðÊó¤òÆÉ¤ß¼è¤Ã¤Æ¤¤¤Þ¤¹... ´°Î»
°Ê²¼¤ÎÆÃÊ̥ѥ屡¼¥¸¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹:
  libaio1
°Ê²¼¤Î¥Ñ¥Ã¥±¡¼¥¸¤¬¿·¤¿¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹:
  libaio-dev libaio1
¥¢¥Ã¥×¥°¥ì¡¼¥É: 0 ¸Ä¡¢¿·µ¬¥¤¥ó¥¹¥È¡¼¥ë: 2 ¸Ä¡¢ºï½ü: 0 ¸Ä¡¢ÊÝα: 0 ¸Ä¡£
27.8 kB ¤Î¥¢¡¼¥«¥¤¥Ö¤ò¼èÆÀ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤³¤ÎÁàºî¸å¤ËÄÉ²Ã¤Ç 136 kB ¤Î¥Ç¥£¥¹¥¯ÍÆÎ̤¬¾ÃÈñ¤µ¤ì¤Þ¤¹¡£
³¹Ô¤·¤Þ¤¹¤« [Y/n]? y
...

¥Ó¥ë¥É»þ¤ËÀ¸À®¤·¤¿¥Õ¥¡¥¤¥ë¤ò¾Ãµî¤·¤Æ¡¢¥Ó¥ë¥É¡õ¥¤¥ó¥¹¥È¡¼¥ë¤ò¤ä¤êľ¤¹:

$ git clean -x -f
$ ./configure && make && sudo make install
Operating system              Linux
CPU                           arm
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      32
zlib                          yes
Linux AIO support             yes  ¡ú¤³¤³¤¬ÊѲ½¤·¤¿
POSIX AIO support             yes
POSIX AIO support needs -lrt  yes
POSIX AIO fsync               yes
Solaris AIO support           no
__sync_fetch_and_add          yes
libverbs                      no
rdmacm                        no
Linux fallocate               yes
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      yes
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_PRECISE       no
gettimeofday                  yes
fdatasync                     yes
sync_file_range               yes
EXT4 move extent              yes
Linux splice(2)               yes
GUASI                         no
Fusion-io atomic engine       no
libnuma                       no
strsep                        yes
strcasestr                    yes
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 yes
SCHED_IDLE                    yes
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                yes
pwritev/preadv                yes
IPv6 helpers                  yes
Rados Block Device engine     no
setvbuf                       yes
Gluster API engine            no
s390_z196_facilities          no
HDFS engine                   no
lex/yacc for arithmetic       no
FIO_VERSION = fio-2.2.5
    CC gettime.o
    CC ioengines.o
    CC init.o
    CC stat.o
    CC log.o
    CC time.o
    CC filesetup.o
    CC eta.o
    CC verify.o
    CC memory.o
    CC io_u.o
    CC parse.o
    CC mutex.o
    CC options.o
    CC lib/rbtree.o
    CC smalloc.o
    CC filehash.o
    CC profile.o
    CC debug.o
    CC lib/rand.o
    CC lib/num2str.o
    CC lib/ieee754.o
    CC crc/crc16.o
    CC crc/sha512.o
    CC crc/crc7.o
    CC crc/sha1.o
    CC crc/crc32c.o
    CC crc/fnv.o
    CC crc/murmur3.o
    CC crc/crc32c-intel.o
    CC crc/xxhash.o
    CC crc/test.o
    CC crc/sha256.o
    CC crc/crc32.o
    CC crc/md5.o
    CC crc/crc64.o
    CC engines/cpu.o
    CC engines/mmap.o
    CC engines/sync.o
    CC engines/null.o
    CC engines/net.o
    CC memalign.o
    CC server.o
    CC client.o
    CC iolog.o
    CC backend.o
    CC libfio.o
    CC flow.o
    CC cconv.o
    CC lib/prio_tree.o
    CC json.o
    CC lib/zipf.o
    CC lib/axmap.o
    CC lib/lfsr.o
    CC gettime-thread.o
    CC helpers.o
    CC lib/flist_sort.o
    CC lib/hweight.o
    CC lib/getrusage.o
    CC idletime.o
    CC td_error.o
    CC profiles/tiobench.o
    CC profiles/act.o
    CC io_u_queue.o
    CC filelock.o
    CC lib/tp.o
    CC lib/bloom.o
    CC engines/libaio.o
    CC engines/posixaio.o
    CC engines/falloc.o
    CC engines/e4defrag.o
    CC engines/splice.o
    CC diskutil.o
    CC fifo.o
    CC blktrace.o
    CC cgroup.o
    CC trim.o
    CC engines/sg.o
    CC engines/binject.o
    CC lib/linux-dev-lookup.o
    CC fio.o
  LINK fio
    CC t/log.o
    CC t/genzipf.o
  LINK t/fio-genzipf
    CC t/btrace2fio.o
  LINK t/fio-btrace2fio
    CC t/dedupe.o
    CC t/debug.o
  LINK t/fio-dedupe
    CC t/stest.o
  LINK t/stest
    CC t/ieee754.o
  LINK t/ieee754
    CC t/axmap.o
  LINK t/axmap
    CC t/lfsr-test.o
  LINK t/lfsr-test
install -m 755 -d /usr/local/bin
install fio t/fio-genzipf t/fio-btrace2fio t/fio-dedupe tools/fio_generate_plots 
tools/plot/fio2gnuplot tools/genfio /usr/local/bin
install -m 755 -d /usr/local/man/man1
install -m 644 fio.1 /usr/local/man/man1
install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1
install -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1
install -m 755 -d /usr/local/share/fio
install -m 644 tools/plot/*gpm /usr/local/share/fio/
[ÊÔ½¸]

OS #

[ÊÔ½¸]

Ubuntu (2015-02-27) #

Raspberry Pi 2 ÍÑ¤Ë Ubuntu ¤¬¤Ç¤¿¤Î¤Ç¡¢¥¤¥ó¥¹¥È¡¼¥ë¤À¤±¤ä¤Ã¤Æ¤ß¤ë¡£

ARM/RaspberryPi - Ubuntu Wiki ¤«¤é¡¢Download 2015-02-19-ubuntu-trusty.zip ¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¡£2ʬ¤Û¤É³Ý¤«¤Ã¤¿¡£

¥¤¥á¡¼¥¸¤òmicroSD¥«¡¼¥É¤Ë½ñ¤­¹þ¤à¡£

ARM/RaspberryPi - Ubuntu Wiki ¤Ë½¾¤Ã¤Æºî¶È¤¹¤ë¡£

Raspberry Pi 2 ¤ËmicroSD¥«¡¼¥É¤È¥­¡¼¥Ü¡¼¥É¤È¥â¥Ë¥¿¤ò·Ò¤¤¤ÇÅŸ»¤òÅêÆþ¤·¡¢¥í¥°¥¤¥ó¤¹¤ë¡£ ¥Ñ¥Ã¥±¡¼¥¸¤ò¹¹¿·¤·¤Æ¡¢openssh-server ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¡¢IP¥¢¥É¥ì¥¹¤òÄ´¤Ù¤ë¡£

sudo apt-get update && sudo apt-get upgrade && sudo apt-get install openssh-server
ifconfig

(& ¤Ï Shift + 7 ¤ÇÆþÎϤǤ­¤ë)

2ÈÖÌܤΥѡ¼¥Æ¥£¥·¥ç¥ó¤òºî¤êľ¤·¡¢ºÆµ¯Æ°¤¹¤ë: 2ÈÖÌܤò¾Ã¤·¤Æ (d [ENTER] 2 [ENTER])¡¢2ÈÖÌܤòºî¤Ã¤Æ (n [ENTER} p [ENTER] 2 [ENTER] [ENTER] [ENTER])¡¢¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¾ðÊó¤ò½ñ¤­¹þ¤ó¤Ç½ªÎ»¤¹¤ë (w)¡£

sudo fdisk /dev/mmcblk0

Â礭¤µ¤òÊѤ¨¤Æ¡¢Êݸ¤¹¤ë¡£

sudo resize2fs /dev/mmcblk0p2
sudo reboot

¥¹¥ï¥Ã¥×¥Õ¥¡¥¤¥ë¤¬É¬Íפʤ顢°Ê²¼¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£¥¤¥ó¥¹¥È¡¼¥ë»þ¤Ë2GB (ÅëºÜ¥á¥â¥ê¤ÎÇÜ?) ³ÎÊݤµ¤ì¤ë¡£

sudo apt-get install dphys-swapfile

°Ê²¼¡¢Å¬Åö¤Ë:

2015-04-15

microSD ¥«¡¼¥É¤Ø¤Î½ñ¤­¹þ¤ß¤Ë VMware¾å¤ËÍѰդ·¤¿ Ubuntu 14.04 ¤ò»È¤Ã¤Æ¤ß¤¿¡£¤«¤Ê¤ê®¤¤¡£ ¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸¤ÏÀè½µ¥ê¥ê¡¼¥¹¤µ¤ì¤¿ 2015-04-06-ubuntu-trusty.zip ¤ò»È¤Ã¤¿¡£

¡úbmap-tools ¤È unzip ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
$ sudo apt-get install bmap-tools unzip

¡úmicroSD¥«¡¼¥É¤ËÆþ¤ì¤Æ¤ª¤¤¤¿¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸¤òŸ³«¤¹¤ë¡£
$ unzip /media/user/volumename/2015-04-06-ubuntu-trusty.zip
¡úmicroSD¥«¡¼¥É¤Î¥É¥é¥¤¥Ö¤òÄ´¤Ù¤Æ¡¢¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë
$ df | grep /media
/dev/sdf1        15G  152M   15G   1% /media/username/volumename

$ umount /dev/sdf1
¡úbmaptool¤Ç¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸¤òmicroSD¤Ë¾å½ñ¤­¤¹¤ë¡£1ʬ23.6ÉäǴ°Î»¤·¤¿¤Î¤Ç¤«¤Ê¤ê®¤¤¡£
$ sudo bmaptool copy --bmap 2015-04-06-ubuntu-trusty.bmap 2015-04-06-ubuntu-trusty.img /dev/sdf
bmaptool: info: block map format version 1.3
bmaptool: info: 458752 blocks of size 4096 (1.8 GiB), mapped 121181 blocks (473.4 MiB or 26.4%)
bmaptool: info: copying image '2015-04-06-ubuntu-trusty.img' to block device '/dev/sdf' 
 using bmap file '2015-04-06-ubuntu-trusty.bmap'
bmaptool: info: 100% copied
bmaptool: info: synchronizing '/dev/sdf'
bmaptool: info: copying time: 1m 23.6s, copying speed 5.7 MiB/sec

microSD ¤ò Raspberry Pi 2 ¤Ëº¹¤·¹þ¤ß¡¢¥â¥Ë¥¿¡¢¥­¡¼¥Ü¡¼¥É¡¢LAN¥±¡¼¥Ö¥ë¡¢ÅŸ»¤ò¼è¤êÉÕ¤±¤ë¡£ °Ê²¼Æ±¤¸¡£

2015-04-06-ubuntu-trusty-001.jpg

2015-04-06-ubuntu-trusty-002.jpg

[ÊÔ½¸]

Raspbian: kernel µ¯Æ°Ãæ¤Î warn: kernel lacks cgroups or memory controller not avaiable,... ¤ò¾Ã¤·¤¿ (2015-02-27) #

¾ðÊó¸»:

kernel µ¯Æ°Ãæ¤Î warn: kernel lacks cgroups or memory controller not avaiable,... ¤ò¾Ã¤¹¤¿¤á¤Ë¡¢/boot/cmdline.txt ¤Î dwc_otg... ¹Ô¤Ë¡Ö cgroup_enable=memory¡×¤òÄɲä·¤¿¡£

½¤ÀµÆâÍÆ:

# diff cmdline.txt.org cmdline.txt
1c1
< dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
---
> dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup_enable=memory elevator=deadline rootwait

¤Ê¤ª¡¢°ì²ó½¤Àµ¤ò¥ß¥¹¤Ã¤Æ kernel panic ¤¬È¯À¸¤·¤Æ¥í¥°¥¤¥ó¤Ç¤­¤Ê¤¯¤Ê¤Ã¤¿¤Î¤Ç¡¢microSD¥«¡¼¥É¤òWindows PC¤ËÆþ¤ì¤Æ½¤Àµ¤·¤¿¡£ (/boot ¤Ï FAT ¤Ê¤Î¤ÇWindows¤Ç¤âÊÔ½¸²Äǽ)

[ÊÔ½¸]

Raspbian: apt-get ¤È¤« (2015-02-15) #

Ubunto¤È¤«¤ÈƱ¤¸¡£

$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean && sudo apg-get autoremove

/var/cache/apt/archives ¤â¾Ã¤·¤¿¤¤¤Ê¤é¡¢¤µ¤é¤Ë

$ sudo apt-get clean

2015-02-17 python-rpi.gpio python3-rpi.gpio raspberrypi-bootloader wolfram-engine ¤Î¥¢¥Ã¥×¥Ç¡¼¥ÈÍè¤Æ¤¿¡£

$ sudo apt-get update && sudo apt-get upgrade
...
°Ê²¼¤Î¥Ñ¥Ã¥±¡¼¥¸¤Ï¥¢¥Ã¥×¥°¥ì¡¼¥É¤µ¤ì¤Þ¤¹:
  libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 
  omxplayer python-rpi.gpio python3-rpi.gpio raspberrypi-bootloader wolfram-engine
¥¢¥Ã¥×¥°¥ì¡¼¥É: 9 ¸Ä¡¢¿·µ¬¥¤¥ó¥¹¥È¡¼¥ë: 0 ¸Ä¡¢ºï½ü: 0 ¸Ä¡¢ÊÝα: 0 ¸Ä¡£
307 MB ¤Î¥¢¡¼¥«¥¤¥Ö¤ò¼èÆÀ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
...

$ dpkg -L python-rpi.gpio
...
/usr/share/doc/python-rpi.gpio/copyright
/usr/share/doc/python-rpi.gpio/changelog.gz
/usr/share/doc/python-rpi.gpio/changelog.Debian.gz
...
/usr/share/pyshared/RPi/__init__.py
/usr/share/pyshared/RPi.GPIO-0.5.11.egg-info
...
/usr/lib/python2.7/dist-packages/RPi/GPIO.so
...
/usr/lib/pyshared/python2.7/RPi
...
/usr/lib/python2.7/dist-packages/RPi/__init__.py
/usr/lib/python2.7/dist-packages/RPi.GPIO-0.5.11.egg-info
/usr/lib/pyshared/python2.7/RPi/GPIO.so
...
[ÊÔ½¸]

Raspbian: rpi-update (2015-02-15) #

2015-02-07 »þÅÀ¤Î Raspbian (2015-01-31 ÈÇ)

$ uname -a
Linux raspi2-1 3.18.5-v7+ #225 SMP PREEMPT Fri Jan 30 18:53:55 GMT 2015 armv7l GNU/Linux

2015-02-15 ¤Ë rpi-update ¤ò¼Â¹Ô¤·¤¿¤é¡¢kernel 3.18.7-v7+ ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¡£ ¤Þ¤¿¡¢Raspbian 2015-02-16 ¤ÎÇÛÉÛ¥¤¥á¡¼¥¸¤Ë¤Ï ¤³¤Î 3.18.7-v7+ ¤¬Æþ¤Ã¤Æ¤¤¤ë¡£

$ sudo rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7938  100  7938    0     0  26063      0 --:--:-- --:--:-- --:--:-- 31129
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 3.18.5-v7+
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    235      0 --:--:-- --:--:-- --:--:--   327
100 43.3M  100 43.3M    0     0   129k      0  0:05:43  0:05:43 --:--:--  259k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 3.18.7+
 *** depmod 3.18.7-v7+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to b2f6c103e5355bee90ff57f55cdf6d7005485a23
 *** A reboot is needed to activate the new firmware

(ºÆµ¯Æ°¸å)
$ uname -a
Linux raspi2-1 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
[ÊÔ½¸]

Raspbian: X¤Î²òÁüÅÙ (2015-02-13) #

FullHD¥â¥Ë¥¿ (1920x1080) (iiyama XU2290HS-B1) ¤ËHDMI¥±¡¼¥Ö¥ë¤ÇÀܳ¤·¤Æ¤¤¤ë¤Î¤Ë¡¢1920x1024 ¤Çɽ¼¨¤µ¤ì¤Ê¤¤¡£

x_1824_984.jpg

¡Ötvservice -s¡×¤Ç¤Ï1980x1080¤Èɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤Î¤À¤¬¡£

$ tvservice -s
state 0x12001a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive

2015-04-25 Raspbian 2015-02-16 ¤ò1¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ apt-get update , apt-get upgrade ¤·¤¿´Ä¶­¤Ç¤Ï¤Á¤ã¤ó¤È 1980x1080 ¤Çɽ¼¨¤µ¤ì¤¿¡£

[ÊÔ½¸]

Raspbian: ÀßÄê (2015-02-08) #

(¸å¤Ç½ñ¤¯)

raspi-config ¤È¡¢¼«Ê¬¤¬Debian/Ubuntu¤Ç¤è¤¯»È¤¦ÀßÄê¤ò¹Ô¤Ã¤¿¡£

Raspbian¤ÎÀßÄê

  • ¥Ð¡¼¥¸¥ç¥ó¤Ï 2015-01-31
  • apt-get update && apt-get upgrade ¤Ç¡¢¤¤¤¯¤Ä¤«¹¹¿·¤µ¤ì¤¿¡£
    • krb5-locales libgssapi-krb5-2 libk5crypto3 libkrb5-3 libkrg5support0 ntp unzip
  • TODO: raspi-config ¤Î¥¹¥¯¥ê¡¼¥ó¥·¥ç¥Ã¥È¼è¤Ã¤¿¤Î¤Ç¤Þ¤È¤á¤ë¡£config.txt ¤âŽ¤ë¤³¤È¡£

Debian/Ubuntu¤Î¤¤¤Ä¤â¤ÎÀßÄê

  • etc-keeper, mercurial, subversion
    • git¤Ï¥¤¥ó¥¹¥È¡¼¥ëºÑ¤ß¤À¤Ã¤¿
  • build-essential ¤Ï¥¤¥ó¥¹¥È¡¼¥ëºÑ¤ß¤À¤Ã¤¿¡£
  • emacs
  • /root ¤È /home/pi ¤â mercurial ¤Ç´ÉÍý¤·¤¿¡£
  • ¥­¡¼¥Ü¡¼¥É: CAPS¥­¡¼¤òCTRL¥­¡¼¤Ë¤·¤¿¡£/etc/default/keyboard ¤Ë¡ÖXKBOPTIONS="ctrl:nocaps" ¡×¤òÉÕ¤±²Ã¤¨¤ÆºÆµ¯Æ°¤·¤¿¤éOK¡£X¤âX¤Ê¤·¤Ç¤â¤³¤ì1¤Ä¤ÇOK¤é¤·¤¤¡£
  • Linux/bash ¤ÎÀßÄê¤òÄɲä·¤¿¡£
  • htop Æþ¤ì¤¿¡£

2015-02-22 2015-02-16 ÈǤΥ¤¥á¡¼¥¸¤¬½Ð¤Æ¤¿¡£

release_notes.txt ¤è¤ê:

2015-02-16:
  * Newer firmware with various fixes
  * New Sonic Pi release
  * Pi2 compatible RPi.GPIO
  * Updated Wolfram Mathematica
2015-01-31:
  * Support for Pi2
  * Newer firmware
  * New Sonic Pi release
  * Updated Scratch
  * New Wolfram Mathematica release
  * Updated Epiphany
[ÊÔ½¸]

¥Ò¡¼¥È¥·¥ó¥¯ (2015-03-07) #

Raspberry Pi 2Âæ¤Î¤¦¤Á¡¢ÊÒÊý¤Ë¼ê»ý¤Á¤Î¥Ò¡¼¥È¥·¥ó¥¯ (¡ï70¤¯¤é¤¤) ¤òÇ®ÅÁƳξÌ̥ơ¼¥× PA-069B ¤ÇŽ¤Ã¤Æ¤ß¤¿¡£

raspi2-headsink-before.jpg raspi2-headsink-after.jpg

·×¬ÊýË¡:

  • Raspberry Pi 2 Model B ¤ò2ÂæÍѤ¤¤Æ¡¢ÊÒÊý¤À¤±¥Ò¡¼¥È¥·¥ó¥¯¤òÁõÃ夷¡¢
  • °Ê²¼¤Î·×¬ÊýË¡¤Ç¡¢
  • °Ê²¼¤Î2¼ïÎà¤ÎÉé²Ù¤ò¤«¤±¤¿¤È¤­¤Î²¹ÅÙ¤ò¤½¤ì¤¾¤ì·×¬¤·¤¿¡£
    • (1)¥¢¥¤¥É¥ë: LAN¤ÈÅŸ»¤Î¤ßÀܳ¡£X Window¤Ê¤·
    • (2)OpenMP: while true; do ./Openmp-sample; done ¤ò¼Â¹Ô¡£Openmp-sample ¤Ï¥¬¥¦¥·¥¢¥ó¥Õ¥£¥ë¥¿3x3¤ò4¥³¥¢¤Ç¼Â¹Ô¡£

·ë²Ì:

  • ·×¬»þ¤Î¼¼²¹ 21.6¡î ¡Ê²¹ÅÙ·×)
(A) ¥Ò¡¼¥È¥·¥ó¥¯Ìµ¤·(B) ¥Ò¡¼¥È¥·¥ó¥¯¤¢¤ê(C) º¹ (A)-(B)
²¹ÅÙ·×BCM2836ÅÅή²¹ÅÙ·×BCM2836ÅÅή²¹ÅÙ·×BCM2836
(1) ¥¢¥¤¥É¥ë31.0031.4760.2533.4034.7040.25
(2) OpenMP52.2047.0780.4339.8041.1600.44
(3) º¹ (2)-(1)21.2015.6020.186.406.4560.1914.809.146
[ÊÔ½¸]

ÅŸ» (2015-02-07) #

Å۵·Ù¹ð¤Î¥Þ¡¼¥¯¤¬²èÌ̤α¦¾å¤Ë¤è¤¯É½¼¨¤µ¤ì¤ë¡£

ÅŸ»¥±¡¼¥Ö¥ë¤ÎÅ۵Äã²¼¤È¹Í¤¨¤Æ¡¢¥±¡¼¥Ö¥ë¤òÊѤ¨¤ÆÅ۵¤ò¬¤Ã¤Æ¤ß¤¿¤È¤³¤í¡¢¥±¡¼¥Ö¥ë¤Ë¤è¤Ã¤ÆÅ۵¤¬ÊѲ½¤·¤¿¡£

  • ÅŸ»¤Ë¤Ï¡¢¼ê»ý¤Á¤Î Buffalo BSMPA09BK (2A ¡ß2) ¤ò»È¤Ã¤¿¡£
  • Àܳ¤·¤¿µ¡ºà¤Ï¡¢SD¥«¡¼¥É¡¢HDMI¥â¥Ë¥¿¡¢USB 2.0 ¥Ð¥¹¥Ñ¥ï¡¼¥Ï¥Ö¡¢¥ï¥¤¥ä¥ì¥¹¥Þ¥¦¥¹¡¢¥­¡¼¥Ü¡¼¥É¡£
    • Å۵: 4.8VÁ°¸å¡¢ÅÅή 0.45mA¡£USB 2.0 ¥Ð¥¹¥Ñ¥ï¡¼¥Ï¥Ö¡¢¥ï¥¤¥ä¥ì¥¹¥Þ¥¦¥¹¡¢¥­¡¼¥Ü¡¼¥É¤òÈ´¤¯¤È¡¢ÅÅή 0.25mA¤À¤Ã¤¿¡£
  • USB¥±¡¼¥Ö¥ë¤Ë ¼ê»ý¤Á¤Î Amazon¥Ù¡¼¥·¥Ã¥¯ USB2.0¥±¡¼¥Ö¥ë 1.8m (¥¿¥¤¥×A¥ª¥¹- ¥Þ¥¤¥¯¥í¥¿¥¤¥×B¥ª¥¹) ¤ò»È¤Ã¤¿¤È¤³¤í¡¢Å۵Äã²¼¤¬Â¿¤¯¤Æ¡¢Raspbian¤Îµ¯Æ°Ãæ¤Ë Raspberry Pi 2 B ¤Î²èÌ̤α¦¾å¤Ë¥Þ¡¼¥¯¤¬¿ôÉá¢É½¼¨¤µ¤ì¤¿¡£µ¯Æ°¤¬´°Î»¤·¤¿¤éɽ¼¨¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿¡£GPIO pin 2(5V) - pin 6(GND) ´Ö¤Ç 4.72VÉÕ¶á¤À¤Ã¤¿¡£
  • Nexus7 2013 ÉÕ°¤ÎUSB¥±¡¼¥Ö¥ë¤Ç¤Ï¡¢4.89V¤¯¤é¤¤¡£¤³¤ì¤Ç¤âµ¯Æ°Ãæ¤Ë¥Þ¡¼¥¯¤¬¿ôÉá¢É½¼¨¤µ¤ì¤ë¡£
  • USB¥±¡¼¥Ö¥ë¤ò ¥ë¡¼¥È¥¢¡¼¥ë ¥¹¥Þ¡¼¥È¥Õ¥©¥ó¡¦¥¿¥Ö¥ì¥Ã¥ÈPCÂбþ ĶµÞ®½¼ÅÅmicroUSB¥±¡¼¥Ö¥ë 1.0m RC-UHCM10R ¤ËÊѤ¨¤¿¤È¤³¤í¡¢µ¯Æ°Ãæ¤Ë¥Þ¡¼¥¯¤¬É½¼¨¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿¡£
    • (2015-02-17) ¤È¡¢»×¤Ã¤Æ¤¿¤é¡¢Web¥Ö¥é¥¦¥¶µ¯Æ°¤·¤Æ¥¹¥¯¥í¡¼¥ë¤·¤¿¤é¡¢¥Þ¡¼¥¯¤¬É½¼¨¤µ¤ì¤¿¡£TODO: USB-HUB ¤ò¥»¥ë¥Õ¥Ñ¥ï¡¼¤Î¤ËÊѤ¨¤Æ¤ß¤ë¡£

ÅŸ»Å۵¤¬Â­¤ê¤Ê¤¤¤È¤­¡¢²èÌ̤α¦¾å¤Ëɽ¼¨¤µ¤ì¤ë¥Þ¡¼¥¯

PowerLow.jpg

4.726V Amazon¥Ù¡¼¥·¥Ã¥¯ USB2.0¥±¡¼¥Ö¥ë 1.8m (¥¿¥¤¥×A¥ª¥¹- ¥Þ¥¤¥¯¥í¥¿¥¤¥×B¥ª¥¹)

USBAmazon18.jpg

4.890V (Nexus 7 2013ÉÕ°¥±¡¼¥Ö¥ë)

USBNexus92013.jpg

4.973V ¥ë¡¼¥È¥¢¡¼¥ë ¥¹¥Þ¡¼¥È¥Õ¥©¥ó¡¦¥¿¥Ö¥ì¥Ã¥ÈPCÂбþ ĶµÞ®½¼ÅÅmicroUSB¥±¡¼¥Ö¥ë 1.0m RC-UHCM10R

USBRouteR.jpg

4.941V ¥ë¡¼¥È¥¢¡¼¥ë ¥¹¥Þ¡¼¥È¥Õ¥©¥ó¡¦¥¿¥Ö¥ì¥Ã¥ÈPCÂбþ ĶµÞ®½¼ÅÅmicroUSB¥±¡¼¥Ö¥ë 1.0m RC-UHCM10R + ¥ë¡¼¥È¥¢¡¼¥ë USB ´Ê°×Å۵¡¦ÅÅή¥Á¥§¥Ã¥«¡¼ 2¥Ý¡¼¥È½ÐÎÏ VAƱ»þɽ¼¨Âбþ RT-USBVA3

USBRouteR-AV.jpg

4.902V ¥ë¡¼¥È¥¢¡¼¥ë ¥¹¥Þ¡¼¥È¥Õ¥©¥ó¡¦¥¿¥Ö¥ì¥Ã¥ÈPCÂбþ ĶµÞ®½¼ÅÅmicroUSB¥±¡¼¥Ö¥ë 1.0m RC-UHCM10R + USB¥¹¥¤¥Ã¥Á¥±¡¼¥Ö¥ë

USBRouteR-SW.jpg

[ÊÔ½¸]

¥«¥Ð¡¼¤È¤« #

[ÊÔ½¸]

¤Û¤³¤ê¤è¤± (̤Ãå¼ê) #

2015-05-19

Adafruit Pi Protector for Raspberry Pi Model B+ / Pi 2 ID: 2292 - $7.50 ¤Î¾å¤À¤±¤¬Íߤ·¤¤¡£¾å¤Ëʪ¤òºÜ¤»¤ë¤Ä¤â¤ê¤¬Ìµ¤¤¤Î¤Ç¡¢¥¹¥Ú¡¼¥µ¡¼¤ò£²Ëܤǻ٤¨¤ë¤À¤±¤Ê¤é¡¢¤³¤¦¤¤¤¦·Á¤Î¤¬³Ú¤½¤¦¤À¡£

GPIO ¤Î²¼¤Ï¥Ú¥Æ¥Ã¥È¡ÜÈĤǤ¤¤¤¤Î¤Ç¡£

À£Ë¡¤Ï

[ÊÔ½¸]

¸ÇÄê (2015-02-08) #

mbed Nucleo L152RE | mbed, ¥Ö¥ì¥Ã¥É¥Ü¡¼¥É BB-801 - ½©·îÅÅ»ÒÄ̾¦¡¢Raspberry Pi 2 Model B:

base-top.jpg base-bottom.jpg

[ÊÔ½¸]

Raspberry Pi 2 Model B ¤òÆþ¼ê (2015-02-07) #

  • 2015-02-02 18»þ¤ËRS¥³¥ó¥Ý¡¼¥Í¥Ã¥È¤ËȯÃí¡£
  • 2015-02-06 10»þÅþÃå, ÉԺߤΤ¿¤áºÆÇÛã¡£(RS¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¤ÏÊ¿ÆüÇÛ㤵¤ì¤ë¤è¤¦»ØÄꤵ¤ì¤ë¤Î¤Ç)
  • 2015-02-07 10:30¤ËºÆÇÛã¤Ë¤Æ¼õ¤±¼è¤ê¡£

´ðÈĤΥ·¥ë¥¯¤Ï:

  • Raspberry Pi 2 Model B V1.1 / (C) Raspberry Pi 2014
  • 02 15
  • Made in the UK

¥Á¥Ã¥×¤Ï:

  • BROADCOM BCM2836RTF8G / TE1445 P10 / 430260-20 N3 W
  • SMSC LAN9514-JZX / B1426-A1B17 / 426VH9A / ATA-SG
  • ELPIDA 38132B4PB-80-F