embeded/odroid2021. 9. 19. 18:40

1.8 V를 머하는데 쓰지 -ㅁ-?!?!? ㅠㅠ

 

Pin #37 Pin #40
ADC.AIN1 ADC.AIN

/sys/class/saradc/ch1 /sys/class/saradc/ch0

 

ADC's maximum sample rate is 50kSPS. ODROID-C2 has 10bit resolution (0~1023). ODROID-C4/N2 has 12bit resolution (0~4095).
But the actual sample rate is 8kSPS if you access it via sysfs due to the limited file IO speed.

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/adc]

'embeded > odroid' 카테고리의 다른 글

odorid c2 usb otg gadget keyboard as hid  (0) 2021.09.23
odroid c2 OTG와 mass storage  (0) 2021.09.19
odroid c2 lircd output 성공  (0) 2021.09.18
lirc irrecord, odroid c2 성공 (ubuntu 18.04.3)  (0) 2021.09.17
odroid c2 lirc  (0) 2021.09.14
Posted by 구차니

어떻게 보면 역설적인 이야기이도 하고

도치가 되어도 맞아들어가는 이야기인데

 

사람의 능력을 키우기 위해서는 다양한 경험을 겪어야 하고

쌓여진 경험은 그 사람의 능력이 된다.

 

경험이 능력을 만들기도

능력이 경험을 만들기도 하니

 

참 아이러니 하구만.

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

먼가 만들어 볼까  (0) 2021.09.22
피곤피곤  (0) 2021.09.20
하얗게 불태움  (0) 2021.09.14
으아아아아  (0) 2021.09.07
휴가인데 야근  (0) 2021.09.03
Posted by 구차니

젊어서(?) 그런가 어떻게 된게 예전 복실이 보다 유지비가 많이 드냐 ㅠㅠ

 

동물등록 2만

진료비 1.1만

피부약 2만?

검사비 2만?

약 값 얼마

머 대충 이렇게 합산되서 8.2만 정도 나왔던 듯

 

아무튼 세균성 피부병이라 언넝 낫길

 

 

그 와중에 냄새 이상해서 버리려고 놔둔 햄을 (1kg) 한 200g 남기고 다 먹으심 -_-

어쩐지 물을 미친듯이 마시고 밥을 잘 먹더라니 -_-

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

내일 백신 2차!  (0) 2021.10.07
코로나 3273  (0) 2021.09.25
장보기  (0) 2021.09.12
필터구매!  (0) 2021.09.08
별이 털 밈  (0) 2021.09.06
Posted by 구차니
embeded/odroid2021. 9. 18. 00:43

irrecord가 ubuntu 20.04 에서 안되서 일단 18.04로 시도해서 성공.

ubuntu-18.04.3-3.16-minimal-odroid-c2-20190814.img

 

다시 한번 irrecord -f 옵션으로 20.04에서 시도해봐야 할 듯.

+

20.04 에서 해봤는데 -f 옵션으로 raw 처리하니 입력은 받을 수 있는 듯.

값이 미묘하게 다르긴 하지만 되는 것 같기도 하고?

 

 

GPIO IR 회로.

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/lirc_gpio_blaster]

 

간단하게 IR LED를  9번과(IR LED -극) 11번(IR LED +극)에 연결하면 된다.

거리가 60cm 정도만 떨어져도 인식이 안되기 시작해서 문제지 -_-

그래서 TR을 이용해서 전원을 공급받고 GPIO로 On/Off만 해주는 건가..

[링크 : https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors]

 

환경설정 파일

# cat /etc/lirc/lirc_options.conf
# These are the default options to lircd, if installed as
# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
# manpages for info on the different options.
#
# Some tools including mode2 and irw uses values such as
# driver, device, plugindir and loglevel as fallback values
# in not defined elsewhere.

[lircd]
nodaemon        = False
driver          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/aarch64-linux-gnu/lirc/plugins
permission      = 666
allow-simulate  = No
repeat-max      = 600

[lircmd]
uinput          = False
nodaemon        = False

[modinit]
code = /sbin/modprobe meson-ir

[lircd-uinput]
add-release-events = True
release-timeout = 50
release-suffix = _EVUP

 

커스텀(?) 리모컨 파일 추가.

서비스 재기동 전에는 해당 디렉토리의 파일을 새로 불러들이진 않는다.

# cat /etc/lirc/lircd.conf.d/monex.lircd.conf

# Please take the time to finish this file as described in
https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.10.0(default) on Fri Sep 17 12:28:52 2021
# Command line used: -d /dev/lirc0
# Kernel version (uname -r): 3.16.72-46
#
# Remote name (as of config file): monex
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  monex
  bits           32
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8970  4517
  one           561  1692
  zero          561   569
  ptrail        563
  repeat       8970  2289
  gap          107503
  toggle_bit_mask 0x0
  frequency    38000

      begin codes
          key_power                0x10EFEB14 0xFFFFFFFF
          key_menu                 0x10EF3BC4 0xFFFFFFFF
          key_up                   0x10EF49B6 0xFFFFFFFF
          key_down                 0x10EF1BE4 0xFFFFFFFF
          key_left                 0x10EFE916 0xFFFFFFFF
          key_right                0x10EFF906 0xFFFFFFFF
          key_ok                   0x10EF51AE 0xFFFFFFFF
          key_exit                 0x10EF2BD4 0xFFFFFFFF
          key_mute                 0x10EFFB04 0xFFFFFFFF
      end codes

end remote

 

서비스 재기동 및 gpio ir tx 설정

irsend를 통해서 보낼대 조금 귀찮게 디바이스 설정을 해주어야 한다.

$ service lircd stop
$ modprobe lirc_dev
$ modprobe lirc_odroid gpio_out_pin=247 softcarrier=1 invert=1
$ service lircd restart
$ lircd --driver=default --device=/dev/lirc1 --output=/var/run/lirc/lirc1 --pidfile=/var/run/lirc/lirc1.pid
$ irsend SEND_ONCE monex KEY_POWER -d /var/run/lirc/lirc1

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/lirc_gpio_blaster/irblaster_lirc_setup_ubuntu18.04]

'embeded > odroid' 카테고리의 다른 글

odroid c2 OTG와 mass storage  (0) 2021.09.19
odroid c2 ADC  (1) 2021.09.19
lirc irrecord, odroid c2 성공 (ubuntu 18.04.3)  (0) 2021.09.17
odroid c2 lirc  (0) 2021.09.14
odroid c2 i2c  (0) 2021.09.11
Posted by 구차니
embeded/odroid2021. 9. 17. 21:52

ubuntu-18.04.3-3.16-minimal-odroid-c2-20190814.img.xz 파일을 받아서 시도하니 된다.

2020년 중반 이후로 먼가 안된다는 글이 보이던데.. 구버전으로 가니 단번에 되네 -_-

 

아래의 명령어로

$ irrecord -d /dev/lirc0

monex 43인치 UHD 모니터 리모컨 읽은 내용

 $ cat monex.lircd.conf

# Please take the time to finish this file as described in
https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.10.0(default) on Fri Sep 17 12:28:52 2021
# Command line used: -d /dev/lirc0
# Kernel version (uname -r): 3.16.72-46
#
# Remote name (as of config file): monex
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  monex
  bits           32
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8970  4517
  one           561  1692
  zero          561   569
  ptrail        563
  repeat       8970  2289
  gap          107503
  toggle_bit_mask 0x0
  frequency    38000

      begin codes
          key_power                0x10EFEB14 0xFFFFFFFF
          key_menu                 0x10EF3BC4 0xFFFFFFFF
          key_up                   0x10EF49B6 0xFFFFFFFF
          key_down                 0x10EF1BE4 0xFFFFFFFF
          key_left                 0x10EFE916 0xFFFFFFFF
          key_right                0x10EFF906 0xFFFFFFFF
          key_ok                   0x10EF51AE 0xFFFFFFFF
          key_exit                 0x10EF2BD4 0xFFFFFFFF
          key_mute                 0x10EFFB04 0xFFFFFFFF
      end codes

end remote

 

아래의 명령어로

$ irrecord -d /dev/lirc0 -r

monex 43인치 UHD 모니터 리모컨 읽은 내용

$ cat mo_raw.lircd.conf

# Please take the time to finish this file as described in
https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.10.0(default) on Fri Sep 17 12:39:22 2021
# Command line used: -d /dev/lirc0 -f
# Kernel version (uname -r): 3.16.72-46
#
# Remote name (as of config file): mo_raw
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  mo_raw
  flags RAW_CODES|CONST_LENGTH
  eps            30
  aeps          100

  gap          107463

      begin raw_codes

          name key_power
             8956    4523     570     559     569     558
              569     561     567    1687     568     559
              568     559     569     560     568     559
              568    1685     569    1685     569    1686
              569     560     568    1685     569    1686
              569    1685     569    1685     570    1686
              569    1685     570    1686     568     562
              566    1687     568     561     567    1685
              569    1686     569     561     567     560
              567     561     567    1686     568     561
              567    1685     569     560     568     560
              567

          name key_menu
             8985    4496     520     608     519     609
              519     608     519    1734     521     608
              519     611     517     608     520     608
              519    1734     521    1733     522    1732
              522     608     520    1733     521    1733
              521    1733     522    1733     522     608
              519     608     520    1733     522     631
              496    1733     522     607     520    1733
              522    1733     522    1733     521    1733
              521     609     518    1734     521     635
              493    1735     523     605     540     589
              540

          name key_exit
             8956    4522     571     560     567     584
              544     560     567    1686     572     557
              568     558     569     562     566     560
              568    1685     569    1686     569    1684
              570     559     569    1684     570    1685
              570    1685     569    1685     569     561
              567    1686     568     560     567     561
              567    1685     569     561     567     560
              568    1686     568    1686     568     564
              564    1686     568    1686     569     561
              567    1685     569    1686     568     560
              568

          name key_up
             8958    4523     570     559     568     560
              567     562     565    1686     569     559
              568     560     568     561     567     561
              566    1684     571    1684     570    1684
              570     560     568    1685     569    1687
              568    1686     568    1685     570     560
              567    1686     568     560     568     561
              566    1686     569     584     543     560
              568    1685     569    1686     569     584
              543    1686     569    1685     569     560
              568    1686     568    1686     572     581
              544

          name key_down
             8957    4525     566     585     543     563
              565     563     565    1685     569     585
              543     561     567     560     567     561
              566    1687     546    1708     546    1710
              545     584     543    1710     545    1711
              544    1712     543    1711     545     583
              544     583     545     585     542    1711
              544    1710     546     585     542    1710
              545    1710     547    1708     545    1710
              545    1709     546     585     542     584
              544    1710     545     585     543     608
              520

          name key_left
             8958    4525     544     584     543     583
              545     585     543    1709     546     584
              543     585     543     583     544     584
              567    1687     571    1683     571    1685
              570     558     570    1684     571    1684
              571    1683     572    1684     571    1683
              572    1682     572    1683     571     559
              569    1684     570     559     569     559
              569    1684     571     558     569     561
              567     559     569    1684     570     561
              567    1684     570    1685     570     583
              544

          name key_right
             8936    4543     576     552     575     553
              575     553     575    1678     577     552
              576     553     574     554     574     577
              554    1677     574    1679     577    1678
              577     553     574    1679     577    1678
              577    1678     577    1678     576    1679
              576    1679     576    1678     577    1677
              578    1678     577     554     574     553
              575    1679     575     553     575     553
              575     552     576     557     571     555
              573    1679     577    1678     576     553
              575

      end raw_codes

end remote

 

irrecord -r  옵션을 주니 세세하게 내용이 다르게 생성된다.

그래도.. raw 옵션주고 만드는데 나중에 추가하기 편하려나? mode2로 생성할때도 raw로 나오니까?

 

이제 odroid c2에 IR LED 달고 출력도 되면 개꿀~!

'embeded > odroid' 카테고리의 다른 글

odroid c2 ADC  (1) 2021.09.19
odroid c2 lircd output 성공  (0) 2021.09.18
odroid c2 lirc  (0) 2021.09.14
odroid c2 i2c  (0) 2021.09.11
odroid c2 wiringpi pinout  (0) 2021.09.10
Posted by 구차니
embeded/raspberry pi2021. 9. 17. 13:46

라즈베리 파이 zero에서 USB 메모리 스틱처럼 인식을 시킬수 있다는데

2B나 3B 등에서는 아무래도 회로적으로 USB OTG 구성이 되어 있지 않으니 안될 것 같고

rpi CM4만 해도 OTG가 굽는 용도로 있으니 어떻게 든 가능할 것 같은데.. 확신은 없음

 

반대로 OTG가 존재하는 odroid 등에서는 가능하려나?

 

$ sudo modprobe g_mass_storage removable=1 ro=1

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

[링크 : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_File_Storage]

'embeded > raspberry pi' 카테고리의 다른 글

rpi4에서 gpio readall 실행 안될 때  (0) 2021.09.24
rpi 4 lirc tx, rx  (0) 2021.09.23
rpi stretch lirc irrecord 실패  (0) 2021.09.16
lirc 제조사별 키코드  (0) 2021.09.16
lirc를 이용한 리모컨 신호 복제  (0) 2021.09.13
Posted by 구차니
embeded/raspberry pi2021. 9. 16. 19:18

머가 문제일까..

 

[링크 : https://raspberrypi.stackexchange.com/questions/104008/lirc-irrecord-wont-record-buster-mode2-works]

 

+

stretch가 문제가 아니라

decoded에 문제가 있는지 raw로 하니 잘 된다.

'embeded > raspberry pi' 카테고리의 다른 글

rpi 4 lirc tx, rx  (0) 2021.09.23
rpi USB 메모리 스틱처럼 만들기? rpi zero  (0) 2021.09.17
lirc 제조사별 키코드  (0) 2021.09.16
lirc를 이용한 리모컨 신호 복제  (0) 2021.09.13
rpi 에서 ir 읽기  (0) 2021.09.11
Posted by 구차니
프로그램 사용/minicom2021. 9. 16. 16:20

통신을 주고 받으면서 해당 내용을 파일로 저장하는 기능.

ctrl-a,z 에서 "Capture on/off.....L" 을 눌러 들어가면

+-------------------------------------------------------------------+
|                      Minicom Command Summary                      |
|                                                                   |
|              Commands can be called by CTRL-A <key>               |
|                                                                   |
|               Main Functions                  Other Functions     |
|                                                                   |
| Dialing directory..D  run script (Go)....G | Clear Screen.......C |
| Send files.........S  Receive files......R | cOnfigure Minicom..O |
| comm Parameters....P  Add linefeed.......A | Suspend minicom....J |
| Capture on/off.....L  Hangup.............H | eXit and reset.....X |
| send break.........F  initialize Modem...M | Quit with no reset.Q |
| Terminal settings..T  run Kermit.........K | Cursor key mode....I |
| lineWrap on/off....W  local Echo on/off..E | Help screen........Z |
| Paste file.........Y  Timestamp toggle...N | scroll Back........B |
| Add Carriage Ret...U                                              |
|                                                                   |
|             Select function or press Enter for none.              |
+-------------------------------------------------------------------+

 

저장할 파일명을 물어본다. minicom을 실행한 현재 디렉토리를 기준으로 저장된다.

+-----------------------------------------+
|Capture to which file?                   |
|> minicom.cap                            |
+-----------------------------------------+

'프로그램 사용 > minicom' 카테고리의 다른 글

minicom lf에 cr 붙이기  (0) 2023.01.05
minicom 16진수로 보기  (0) 2022.08.25
minicom timestamp  (0) 2021.09.16
minicom 폭 늘리기  (0) 2021.01.28
/dev/tty 를 sudo 쓰지 않고 사용하기  (0) 2020.09.24
Posted by 구차니
Linux2021. 9. 16. 16:15

라즈베리에 달린 USB 시리얼을 아래와 같이 실행해주고

$ socat /dev/ttyUSB0,raw,echo=0 tcp-listen:8888,reuseaddr

 

putty에서 raw 소켓으로 붙이니

 

양방향으로 소켓을 통해 전송이 가능하다.

로그인은 하고 usbtty로 붙이려면 어떻게 하면 되려나?

[링크 : https://unix.stackexchange.com/questions/201757/]

'Linux' 카테고리의 다른 글

bash multiple session history  (0) 2021.10.01
특정 pts에서 프로그램 실행하기  (0) 2021.09.27
리눅스 콘솔에서 gmail 통해 메일 보내기는 실패 ㅠㅠ  (0) 2021.09.15
linux sw raid  (0) 2021.08.30
glibc 버전 얻기  (0) 2021.07.09
Posted by 구차니
embeded/raspberry pi2021. 9. 16. 15:57

'embeded > raspberry pi' 카테고리의 다른 글

rpi USB 메모리 스틱처럼 만들기? rpi zero  (0) 2021.09.17
rpi stretch lirc irrecord 실패  (0) 2021.09.16
lirc를 이용한 리모컨 신호 복제  (0) 2021.09.13
rpi 에서 ir 읽기  (0) 2021.09.11
rpi 3b update, install 실패  (0) 2021.09.10
Posted by 구차니