'2015/09'에 해당되는 글 90건

  1. 2015.09.10 리눅스 커널 인자 console 과 부팅시간
  2. 2015.09.10 라즈베리 B+ USB 전류 제한해제?
  3. 2015.09.10 html5
  4. 2015.09.10 html event
  5. 2015.09.09 카메라의 원리
  6. 2015.09.08 css 관련 4
  7. 2015.09.08 jquery
  8. 2015.09.08 div 태그
  9. 2015.09.08 microchip PIC
  10. 2015.09.07 라즈베리 파이 - wiring pi GPIO 인터럽트
embeded/raspberry pi2015. 9. 10. 15:06

115k의 경우 미세하게 차이가 나지만...

라즈베리 파이 2라서 이정도 인데..

더 사양이 낮은걸로 가면 어떻게 되려나? 간격이 좁혀지려나? 궁금해지네..

나중에 PC에서도 해봐야겠다.

(빠르게 처리하고 출력이 느려서 발목잡히는거라면..

성능이 느린 녀석일수록 낮은 baud rate에서도 느려지지 않을 가능성이 높아 보이네..)


결론 : 시리얼 콘솔로 출력을 안하는게 미세하게라도 부팅을 빠르게 해준다.

       단, 느리면 미친듯이 느려짐(ex 2400bps)


시리얼 콘솔 OFF

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


[    5.538787] i2c /dev entries driver

[    8.942949] random: dd urandom read with 125 bits of entropy available

[    9.218847] random: nonblocking pool is initialized

[    9.239318] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   10.899741] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   14.062018] cfg80211: Calling CRDA to update world regulatory domain

[   14.508474] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS

[   17.215920] cfg80211: Calling CRDA to update world regulatory domain 


시리얼 콘솔 115k

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


[    6.610517] i2c /dev entries driver

[    8.755376] random: nonblocking pool is initialized

[   10.337207] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   11.845371] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   15.171890] cfg80211: Calling CRDA to update world regulatory domain

[   15.575988] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS

[   18.323100] cfg80211: Calling CRDA to update world regulatory domain


시리얼 콘솔 2.4k

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,2400 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


[   65.375014] i2c /dev entries driver

[   69.878454] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   71.466722] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   74.321086] cfg80211: Calling CRDA to update world regulatory domain

[   75.156305] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS

[   77.474999] cfg80211: Calling CRDA to update world regulatory domain



+

시리얼 초기화에 시간이 이상하리 만치 오래 걸리고

확실히 메시지 출력에 시간소요 되는게 다르다.

115k - 0.004278초

[    0.696002] console [ttyAMA0] enabled

[    0.700280] bcm2835-mbox 3f00b880.mailbox: mailbox enabled


2.4k - 0.175674 초

[   24.166507] console [ttyAMA0] enabled

[   24.342181] bcm2835-mbox 3f00b880.mailbox: mailbox enabled




+

2015.09.15

quiet 주면 로그가 출력이 거의 안되니까

부팅 시간에 영향을 거의 주지 않는다.

유의미한 부팅시간 차이는 없는 듯


no quiet / no console

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


$ dmesg

[    1.873744] smsc95xx v1.0.4

[    1.941273] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:7c:e2:4e

[    2.158823] udevd[175]: starting version 175

[    4.436091] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    4.657410] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    5.213253] fuse init (API version 7.23)

[    8.630851] random: dd urandom read with 121 bits of entropy available

[    9.128626] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[    9.533223] random: nonblocking pool is initialized

[   10.676478] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   11.380752] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS 


quiet / 2400bps

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,2400 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet


$ dmesg

[    1.787155] smsc95xx v1.0.4

[    1.849754] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:7c:e2:4e

[    2.159625] udevd[175]: starting version 175

[    4.475902] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    4.687585] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    5.243639] fuse init (API version 7.23)

[    8.657857] random: dd urandom read with 122 bits of entropy available

[    9.236423] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[    9.285362] random: nonblocking pool is initialized

[   10.784245] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   11.661120] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS 


quiet / 115k

$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet


$ dmesg

[    1.787064] smsc95xx v1.0.4

[    1.848037] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:7c:e2:4e

[    2.083949] udevd[175]: starting version 175

[    4.375384] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    4.588231] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    5.138807] fuse init (API version 7.23)

[    8.506983] random: dd urandom read with 123 bits of entropy available

[    9.087136] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[    9.132055] random: nonblocking pool is initialized

[   10.595072] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[   11.272396] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS 



[링크 : http://elinux.org/Disable_Console]

[링크 : https://www.kernel.org/doc/Documentation/kernel-parameters.txt]



+

2015.09.16


라즈베리 B에서 테스트

2400bps로 설정하면 라즈베리 B나 2B나 부팅시간이 거의 동일해진다 ㄷㄷ


# cat /flash/cmdline.txt

boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet


[    6.260069] lirc_rpi: auto-detected active low receiver on GPIO pin 18

[    6.260446] lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0

[    6.260465] lirc_rpi: driver registered!

[    9.116106] Console: switching to colour dummy device 80x30

[   10.033464] pcm512x 1-004d: Failed to reset device: -5

[   10.033606] pcm512x: probe of 1-004d failed with error -5

[   10.038823] pcm512x 1-004c: Failed to reset device: -5

[   10.038972] pcm512x: probe of 1-004c failed with error -5

[   11.996185] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   11.996923] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[   13.503507] input: lircd as /devices/virtual/input/input0

[   13.513621] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

[   13.543861] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


# cat /flash/cmdline.txt

boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200


[    7.583641] lirc_rpi: auto-detected active low receiver on GPIO pin 18

[    7.584050] lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0

[    7.584073] lirc_rpi: driver registered!

[    7.590570] systemd[1]: Reached target Local File Systems.

[    7.590980] systemd[1]: Started Rebuild Journal Catalog.

[    7.607263] systemd[1]: Started Load Kernel Modules.

[    7.673956] systemd[1]: Started Journal Service.

[    7.835377] systemd-journald[149]: Received request to flush runtime journal from PID 1

[   11.254985] Console: switching to colour dummy device 80x30

[   12.137394] pcm512x 1-004d: Failed to reset device: -5

[   12.137547] pcm512x: probe of 1-004d failed with error -5

[   12.142543] pcm512x 1-004c: Failed to reset device: -5

[   12.142698] pcm512x: probe of 1-004c failed with error -5

[   14.273315] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   14.276243] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[   15.827031] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

[   15.861468] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[   15.930351] input: lircd as /devices/virtual/input/input0


# cat /flash/cmdline.txt

boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,2400


[   59.096555] lirc_rpi: auto-detected active low receiver on GPIO pin 18

[   59.096935] lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0

[   59.096958] lirc_rpi: driver registered!

[   59.253490] systemd[1]: Mounted Temporary Directory.

[   59.530181] systemd[1]: Started Remount Root and Kernel File Systems.

[   59.910190] systemd[1]: Started Create list of required static device nodes for the current kernel.

[   60.106840] systemd[1]: Started Setup machine-id.

[   60.323515] systemd[1]: Started Set ondemand threshold.

[   60.500170] systemd[1]: Started Show Version.

[   60.716824] systemd[1]: Started Load Kernel Modules.

[   60.950148] systemd[1]: Started Kodi config dir rebrand.

[   61.146860] systemd[1]: Started Mounting swapfile.

[   61.376843] systemd[1]: Started udev Coldplug all Devices.

[   61.848866] systemd[1]: Starting Swap.

[   62.016818] systemd[1]: Reached target Swap.

[   62.017203] systemd[1]: Mounted FUSE Control File System.

[   62.018077] systemd[1]: Mounted Configuration File System.

[   62.018331] systemd[1]: Starting Apply Kernel Variables...

[   62.213534] systemd[1]: Starting Journal Service...

[   62.377729] systemd[1]: Starting Create Static Device Nodes in /dev...

[   62.620386] systemd[1]: Starting Setup Timezone data...

[   62.804543] systemd[1]: Started Debug /var/log relink.

[   63.003508] systemd[1]: Started Journal Service.

[   64.752792] systemd-journald[160]: Received request to flush runtime journal from PID 1

[   69.797632] pcm512x 1-004d: Failed to reset device: -5

[   69.797788] pcm512x: probe of 1-004d failed with error -5

[   69.802172] pcm512x 1-004c: Failed to reset device: -5

[   69.802323] pcm512x: probe of 1-004c failed with error -5

[   71.876799] Console: switching to colour dummy device 80x30

[   75.422833] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

[   75.425714] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[   76.986887] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

[   76.995598] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[   78.083255] input: lircd as /devices/virtual/input/input0



Posted by 구차니
embeded/raspberry pi2015. 9. 10. 13:40

wiring pi gpio 유틸 도움말을 보던 중에

어? 이런 기능이?

혹시.. 2B에도 적용되려나?


usbp   high | low

Change  the USB current limiter to high (1.2 amps) or low (the default, 600mA)

This is only applicable to the model B+


[링크 : https://projects.drogon.net/testing-setting-the-usb-current-limiter-on-the-raspberry-pi-b/]



+ 2015.09.11

어? 2b랑 b+이랑 보드 같은거 아니었어!??!?

pi@raspberrypi ~ $ gpio usbp high

USB power contol is applicable to B+ boards only.

pi@raspberrypi ~ $ gpio usbp low

USB power contol is applicable to B+ boards only. 


차이를 모르겠다 -_-a

아무튼.. 설정은 되는데 테스트는 나중에 USB 하드라도 물려봐야지 머..

pi@raspberrypi ~ $ gpio -g write 38 0

pi@raspberrypi ~ $ gpio -g mode 38 out

pi@raspberrypi ~ $ gpio -g write 38 1


I know the following:


Setting max_usb_current=1 sets the available current over USB to 1.2A (default is 600mA)

This can help if you have a decent power supply (2A, at least) and need to power something like a small external HDD or something that needs 300+ mA.

This feature is only available on the B+ and Pi model 2 (at the time of this writing)

[링크 : http://raspberrypi.stackexchange.com/.../is-setting-max-usb-current-1-to-give-more-power...]



max_usb_current


Together with the raspberry PI B+ a new config.txt setting was introduced.


  max_usb_current=1

when adding this line the USB power manager will change its output current limit (for all 4 USB ports combined) from 600mA to double that, 1200mA.

[링크 : http://elinux.org/RPiconfig#USB_Power]



---

집에와서 해보니..

두개중에 하나만 해줘도 되는거 같고..

$ cat /boot/config.txt 

safe_mode_gpio=4

max_usb_current=1


이렇게 38번 핀을 high 로 해도 USB 하드가 바로 전력소비가 커버되는지 삑삑삑삑

스핀들 모터가 못돌다가 조용해진다.(인식/마운트 성공)

$ gpio -g mode 38 out

$ gpio -g write 38 1 



결론 B+이나 2B나 같으니 2B에서도 된다!

Posted by 구차니

이렇게만 보면 먼가 할게 없어 보이는데... (어?)

[링크 : https://namu.wiki/w/HTML5]


이걸 읽으려니 쥐날거 같네? ㅠㅠ

[링크 : http://www.w3.org/TR/html5/]



결론(?)은 표준 맞추면 읽기 도구라던가 이런걸로 더 편하게 할 수 있다,.

nav 태그가 시맨텍 웹 관련 추가됨

font / applet / frame 이 사용불가!


frame이 불가능해졌기에 ajax 열풍이 분걸려나?

'Programming > javascript & HTML' 카테고리의 다른 글

<link> 관련 약어 정리  (0) 2015.09.14
node.js / angular.js ...  (0) 2015.09.11
html event  (0) 2015.09.10
jquery  (0) 2015.09.08
div 태그  (0) 2015.09.08
Posted by 구차니

뜬금없는 깨달음

아.. 이래서 HTML5를 쓰는구나(onresize 이벤트... 요녀석.. 반응형 웹의 핵심?)


[링크 : http://www.w3schools.com/tags/ref_eventattributes.asp]

'Programming > javascript & HTML' 카테고리의 다른 글

node.js / angular.js ...  (0) 2015.09.11
html5  (0) 2015.09.10
jquery  (0) 2015.09.08
div 태그  (0) 2015.09.08
javascript closure  (0) 2013.01.07
Posted by 구차니

정리가 잘되어 있는 곳이 있어서 링크 저장


관련 포스팅


[링크 : http://darkpgmr.tistory.com/32] 카메라 캘리브레이션

[링크 : http://darkpgmr.tistory.com/31] 왜곡보정

[링크 : http://darkpgmr.tistory.com/37] 라이브 왜곡 보정

[링크 : http://darkpgmr.tistory.com/122] 위치 및 자세 파악


---


초점 거리(f)

밝기(F값)

화각(AOV)


F= f/D(diameter - 조리개 지름)

화각 θ = 2*atan(L/(2*f)) = L/f [rad]. (L: Film Size, f: 초점 거리)

MOD(Minimum Object Distance, 최소 초점 거리)


[링크 : http://holoprogrammer.blogspot.kr/search/label/Machine%20Vision]

'이론 관련 > 사진 광학 관련' 카테고리의 다른 글

안구 해부도?  (0) 2015.11.01
삼각측량 소스코드...  (0) 2015.10.19
스테레오 카메라 - 에피폴라 제한조건  (0) 2015.08.25
샤프니스 계산  (0) 2015.05.28
rolling shutter effect / jello effect ..  (0) 2015.05.22
Posted by 구차니
Programming/css2015. 9. 8. 14:44

CSS도 공부해보자 -_-!!!





HTML comments : <!-- 로 시작하고 -->로 끝난다. 

CSS comments : /* 로 시작하고 */


[링크 : https://nolboo.github.io/blog/2013/07/22/beginners-guide-to-html-and-css-1-slash-10/]



<link href="style.css" rel="stylesheet" type="text/css">


<style type="text/css">

@import url(style.css); 

</style>


<style type="text/css">

.logo {color: #eeeeee;} 

</style>


<p style="height:100px; color:blue">

[링크 : http://webdir.tistory.com/338]



The selector points to the HTML element you want to style.

The declaration block contains one or more declarations separated by semicolons.

[링크 : http://www.w3schools.com/css/css_syntax.asp]

[링크 : http://www.w3schools.com/css/default.asp]


+ 2015.09.16

Inline Styling (Inline CSS)

Internal Styling (Internal CSS)

External Styling (External CSS)

[링크 : http://www.w3schools.com/html/html_css.asp]

'Programming > css' 카테고리의 다른 글

CSS / JS 파일 용량 줄이기  (0) 2015.09.18
css selector  (0) 2015.09.14
css box model  (0) 2014.05.15
크롬과 IE에서 CSS 차이점 - body / background-color  (2) 2011.03.09
CSS Naked day!  (2) 2009.04.09
Posted by 구차니

전 회사에서 잠시 맛만 봤는데

짱짱! 이랄까.. 아무튼 자바 스크립트 기반이라 js 파일 하나를 외부에서 끌어 오거나

내장해야 하는게 약간의 흠


[링크 : http://www.sqler.com/bjQuery/378488]

[링크 : https://jquery.com/]


jquery 버전에 따라 ie 지원범위가 다르다

[링크 : https://jquery.com/browser-support/]

'Programming > javascript & HTML' 카테고리의 다른 글

html5  (0) 2015.09.10
html event  (0) 2015.09.10
div 태그  (0) 2015.09.08
javascript closure  (0) 2013.01.07
javascript - DOM inspector in Firefox  (0) 2010.08.19
Posted by 구차니

HTML 태그 밖에 쓰지 못했었는데..

한번 DIV로 스킨도 바꿀겸 공부 해봐야지...


결론(?)은

DIV를 이용해서 나란히 하려면 float 특성을 사용해라.. 인가?


[링크 : http://yongja.tistory.com/48]

[링크 : http://aboooks.tistory.com/74]


[링크 : http://mobicon.tistory.com/158]


div class / id

[링크 : http://yongja.tistory.com/15]

[링크 : http://div.or.kr/css-studying/id,class...%A9]



+

2015.09.16

<p id="p01">I am different</p>

p#p01 {

    color:blue;

}


<p class="error">I am different</p>

p.error {

    color:red;

}


Use id to address single elements. Use class to address groups of elements.

[링크 : http://www.w3schools.com/html/html_css.asp]


table은 전체가 로딩되기 전에 렌더링 하지 않아 div를 추천

[링크 : http://egloos.zum.com/pnpcrow/v/5048788]


div / span 차이

[링크 : http://boogis.tistory.com/48]

'Programming > javascript & HTML' 카테고리의 다른 글

html event  (0) 2015.09.10
jquery  (0) 2015.09.08
javascript closure  (0) 2013.01.07
javascript - DOM inspector in Firefox  (0) 2010.08.19
HTML의 style="filter:filter_name()"  (0) 2010.08.06
Posted by 구차니
embeded2015. 9. 8. 11:04

그냥 둘러보는 중?

일단 느낌은.. AVR/8051 보다 좀 더 저가의 주변기기 특화형 컨트롤러?

다량의 ADC와 더 적은 메모리 / 플래시

서로 일장일단이 있어 보이는데..


[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/39582C.pdf]


컴파일러로는 CCS compiler 라는게 있는 듯

[링크 : http://www.ccsinfo.com/]

    [링크 : https://www.ccsinfo.com/downloads/ccs_c_manual.pdf]

'embeded' 카테고리의 다른 글

링커 스크립트 문법(ld syntax)  (0) 2015.12.17
시리얼 저항 / 직렬 저항 / 댐핑 저항  (0) 2015.12.17
9$ computer C.H.I.P?  (0) 2015.05.27
PowerQUICC  (0) 2015.04.02
S29AL016J 플래시 메모리 BYTE/WORD MODE  (0) 2014.12.23
Posted by 구차니
embeded/raspberry pi2015. 9. 7. 16:43

흐음.. 한번 써봐야지


int waitForInterrupt (int pin, int timeOut) ;

gpio edge 0 falling


int wiringPiISR (int pin, int edgeType,  void (*function)(void)) ;

INT_EDGE_FALLING

INT_EDGE_RISING

INT_EDGE_BOTH

INT_EDGE_SETUP


gpio edge <pin> rising/falling/both/none

This enables the given pin for edge interrupt triggering on the rising, falling or both edges. (Or none which disables it)



       edge   This exports a GPIO pin  in  the  /sys/class/gpio  directory,  set  the

              direction  to  input and set the edge interrupt method to none, rising,

              falling or both.  Use like the  export  command  above  and  note  that

              BCM_GPIO pin number is used not not wiringPi pin numbering.


              Like the export commands above, ownership is set to that of the calling

              user, allowing subsequent access from user programs  without  requiring

              root/sudo. 


[링크 : http://wiringpi.com/reference/priority-interrupts-and-threads/]

[링크 : https://projects.drogon.net/raspberry-pi/wiringpi/functions/]

Posted by 구차니