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 구차니
embeded/raspberry pi2015. 9. 4. 18:44

pigpio 라는 다른 라이브러리가 존재한다.

[링크 : http://abyz.co.uk/rpi/pigpio/examples.html]


라즈베리 B 인거 같은데..

출력은 22Mhz 까지(단순하게 on/off만) 가능

[링크 : http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/]


아무튼..

TSL235R 라는 녀석이 결과물이 주파수로 나와서

그걸 이용하는 예제

#!/usr/bin/python

import RPi.GPIO as GPIO


GPIO.setmode(GPIO.BCM)

GPIO.setup(25, GPIO.IN)


impuls_count = 0

# Do next lines for i.e. 1000ms:

GPIO.wait_for_edge(25, GPIO.FALLING)

impuls_count = impuls_count + 1


[링크 : http://stackoverflow.com/..../how-to-get-the-frequency-of-a-square-wave-in-a-python-script] 





Posted by 구차니

손댈게 많구나...

tag cloud는 이제 쓰지도 않으니 버려두더라도....


syntax highlighter는 다시 적용해야 하나...

[링크 : http://blueray21.tistory.com/30]


그나저나 거의 5년 만에 블로그 단장이네


'개소리 왈왈 > 블로그' 카테고리의 다른 글

방문자 급감 ㅠㅠ  (0) 2015.09.17
싸이월드 새단장?? 서비스 종료?  (0) 2015.09.14
네이버가.. 50% 돌파?  (2) 2015.07.31
출장 3일의 여파?  (2) 2015.07.16
출장여파 ㅋㅋㅋ  (0) 2015.07.12
Posted by 구차니
Linux2015. 9. 3. 16:01

2009년 부터 개발되어 오기 시작한 녀석..

[링크 : https://archive.fosdem.org/2012/schedule/event/693/127_iio-a-new-subsystem.pdf]

 

sysfs나 캐릭터 디바이스로 하드웨어와 통신을 하기 위한 인터페이스(?)라고 하면 되나..

아무튼 온도 센서 등과 같은 gpio를 이용하는 비표준 통신 장비들과(그래서 I2C 이런것과 달리 Industrial이라고 한 듯)

통신을 할 수 있도록 해주는 것으로 보이는 sub-system 이다.

 

 

[링크 : http://wiki.analog.com/software/linux/docs/iio/iio]

 

+

2022.06.20

[링크 : https://www.kernel.org/doc/html/v4.12/driver-api/iio/index.html]

'Linux' 카테고리의 다른 글

iotop  (0) 2016.01.19
리눅스에서 메모리 뱅크 확인하기  (0) 2015.10.30
insmod / modprobe 차이  (0) 2015.08.25
리눅스 device tree  (0) 2015.04.29
커널 컴파일 옵션 neon 과 cpu feature  (0) 2015.04.28
Posted by 구차니
embeded/raspberry pi2015. 9. 3. 09:45

dht 관련 dtoverlay가 존재하는게 생각이 나서 삽질..

Name:   dht11

Info:   Overlay for the DHT11/DHT21/DHT22 humidity/temperature sensors

        Also sometimes found with the part number(s) AM230x.

Load:   dtoverlay=dht11,<param>=<val>

Params: gpiopin                  GPIO connected to the sensor's DATA output.

                                 (default 4)


[링크 : https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README] 


오홍 존재는 하네?(라즈비안)

$ sudo find / -name dht11.ko

/lib/modules/4.1.6+/kernel/drivers/iio/humidity/dht11.ko

/lib/modules/4.1.6-v7+/kernel/drivers/iio/humidity/dht11.ko


$ sudo modprobe dht11

$ lsmod | grep dht11

dht11                   3531  0

industrialio           35498  1 dht11


$ modinfo dht11

filename:       /lib/modules/4.1.6-v7+/kernel/drivers/iio/humidity/dht11.ko

license:        GPL v2

description:    DHT11 humidity/temperature sensor driver

author:         Harald Geyer <harald@ccbib.org>

srcversion:     136C0D2A25E76F8042B460C

alias:          of:N*T*Cdht11*

depends:        industrialio

intree:         Y

vermagic:       4.1.6-v7+ SMP preempt mod_unload modversions ARMv7 


/boot/overlays 에 파일이 존재하지 않아도 커널에 모듈로 내장되어 있는지 리부팅후 lsmod로 확인이 가능하다.

$ sudo vi /boot/config.txt

dtoverlay=dht11


/sys/devices/platform $ ls -al

합계 0

drwxr-xr-x 17 root root    0  9월  3 09:40 .

drwxr-xr-x  9 root root    0  9월  3 09:40 ..

drwxr-xr-x  2 root root    0  9월  3 09:44 alarmtimer

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD0.0

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD1.1

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD2.2

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD3.3

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD4.4

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD5.5

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD6.6

drwxr-xr-x  2 root root    0  9월  3 09:44 bcm2835_AUD7.7

drwxr-xr-x  8 root root    0  9월  3 09:44 clocks

drwxr-xr-x  3 root root    0  9월  3 09:42 dht11@0

drwxr-xr-x  2 root root    0  9월  3 09:40 regulatory.0

drwxr-xr-x  2 root root    0  9월  3 09:44 serial8250

drwxr-xr-x 17 root root    0  9월  3 09:40 soc

drwxr-xr-x  2 root root    0  9월  3 09:44 timer

-rw-r--r--  1 root root 4096  9월  3 09:40 uevent


어짜피 이녀석은.. 위의 녀석의 심볼릭 링크

/sys/bus/iio/devices/iio:device0 $ ls -al

합계 0

drwxr-xr-x 2 root root    0  9월  3 09:42 .

drwxr-xr-x 3 root root    0  9월  3 09:42 ..

-r--r--r-- 1 root root 4096  9월  3 09:42 dev

-rw-r--r-- 1 root root 4096  9월  3 09:42 in_humidityrelative_input

-rw-r--r-- 1 root root 4096  9월  3 09:42 in_temp_input

-r--r--r-- 1 root root 4096  9월  3 09:42 name

lrwxrwxrwx 1 root root    0  9월  3 09:42 of_node -> ../../../../firmware/devicetree/base/dht11@0

lrwxrwxrwx 1 root root    0  9월  3 09:42 subsystem -> ../../../../bus/iio

-rw-r--r-- 1 root root 4096  9월  3 09:42 uevent



집에가서 센서 달고 해봐야지..


lm-sensor에서 dht11을 iio를 통해 값을 불러 올 수 있도록 수정 된 듯?

[링크 : http://lists.lm-sensors.org/pipermail/lm-sensors/2013-July/039283.html]



GPIO4 라고 되어있는데.. 그냥 핀번호 상으로 4번에 하니 먼가 되긴한다..

$ gpio readall

 +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+

 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |

 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+

 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |

 |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5V      |     |     |

 |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |

 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |

 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |

 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |

 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |

 |  22 |   3 | GPIO. 3 |  OUT | 1 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |

 |     |     |    3.3v |      |   | 17 || 18 | 1 | OUT  | GPIO. 5 | 5   | 24  |

 |  10 |  12 |    MOSI | ALT0 | 0 | 19 || 20 |   |      | 0v      |     |     |

 |   9 |  13 |    MISO | ALT0 | 0 | 21 || 22 | 1 | OUT  | GPIO. 6 | 6   | 25  |

 |  11 |  14 |    SCLK | ALT0 | 0 | 23 || 24 | 1 | OUT  | CE0     | 10  | 8   |

 |     |     |      0v |      |   | 25 || 26 | 1 | OUT  | CE1     | 11  | 7   |

 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |

 |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |

 |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |

 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |

 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |

 |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |

 |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |

 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+

 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |

 +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+ 


/sys/bus/iio/devices/iio:device0 $ sudo cat in_*

65000

24000


/sys/bus/iio/devices/iio:device0 $ sudo cat in*
95000
19000

/sys/bus/iio/devices/iio:device0 $ sudo cat in_*
cat: in_humidityrelative_input: 입력/출력 오류
cat: in_temp_input: 연결 시간 초과

$ dmesg
[   93.266278] iio iio:device0: Only 0 signal edges detected
[   94.390030] dht11: WARNING: decoding ambiguous
[   95.416292] iio iio:device0: Only 0 signal edges detected
[  105.476356] iio iio:device0: Only 0 signal edges detected
[  113.646349] iio iio:device0: Only 0 signal edges detected
[  165.000461] dht11: WARNING: decoding ambiguous
[  199.120659] dht11: WARNING: decoding ambiguous
[  201.230684] dht11: WARNING: decoding ambiguous
[  204.160759] dht11: WARNING: decoding ambiguous
[  205.186935] iio iio:device0: Only 0 signal edges detected

저 값이 무슨 의미인지도 모르겠고.. (그냥 65% 24도로 보면되려나?)

잘 안읽히거나 연결 시간 초과로 읽는데 오래 걸리기도 하니까..

여러번 계속 읽어 봐야 한다. ㄷㄷㄷ



+

2015.09.09

그래도 어떤 사람은 75% 성공률로 읽는다는데.. 난 더 낮은 느낌?

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?p=779355]


쓰레드로 된건 읽기 왜케 힘드냐 -_-

[링크 : http://www.spinics.net/lists/linux-iio/msg19328.html]

Posted by 구차니
embeded/raspberry pi2015. 9. 3. 09:13

생각해보니.. 음속은 기온에 비례하는데

공식으로는 대충


음속 = (331.3 + 0.606 * 섭씨) m/s

0도에서 약 331m인데

실온이면 약 18도 로 잡고(10.908m/s) 342.208m/s

근사치로 340 정도 잡으면 될거 같긴한데


[링크 : https://en.wikipedia.org/wiki/Speed_of_sound]


어짜피 DHT-11 온도/습도 센서가 있으니까..

이걸로 온도 잰걸로 음속을 환산해주면 좀더 정확해지려나? +_+


[링크 : http://eleparts.co.kr/EPXF6C83]

[링크 : http://eleparts.co.kr/EPXF43N9]


Posted by 구차니