게임/컨트롤러2018. 4. 24. 13:31

음.. 근데 이거는 하나도.. 두개로 나눠진걸 합쳐서 보낼수도 있으려나?


[링크 : https://www.youtube.com/watch?v=1k49VVNHvtU]

[링크 : https://learn.adafruit.com/diy-bluetooth-gamepad/overview]


큭.. 19.95$

좋은 제품이긴 한데 내가 상상한 걸 만들기에는 조금 많이 부족한 듯?

[링크 : https://www.adafruit.com/product/1535]


단순하게 On/Off만 되는 12개 짜리 조이스틱 보드인듯

Control and LEDs

To the right of the power pins, there are some control pins
  • RS - this is the reset pin. To reset the module, pull this pin to ground. It does not affect pairing.
  • L2 - this is the same output that is connected to the PairLED. If you want to put this in a box and have an external Pair indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
  • PB - this is the pair button pin. It is connected to the button onboard that is used to reset the pairing. If you want to make another, external pair button, connect a switch from this key to 3V (not ground!)
  • L1 - this is the same output that is connected to the KeyLED. If you want to put this in a box and have an external Key-press indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
  • RX - this is the UART input, used if you want to send UART->Keypress data, or re-map the buttons. It is 5V compliant, use 3V-5V TTL logic, 9600 baud.
  • TX - this is the UART output, used for watching debug data or re-mapping the buttons. It is 3V logic level output.

[링크 : https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/pinouts]



+

HC-05 인지 RN-42인지 잘 모르겠네.. 아무튼 이렇게 설정하면 HID JOYPAD로 인식을 하나보다 ㄷㄷ

    $$$                    //Enter command mode (no CR/LF)

    CMD

    

    SM,6                   //Set Mode = pairing

    AOK

    

    SN,SNESpad             //Set Name

    AOK

    

    S~,6                   //Set profile = HID

    AOK

    

    SH,0240                //Set report descriptor = joypad

    AOK

    

    R,1                    //Reset for settings to take effect.

[링크 : https://mitxela.com/projects/bluetooth_hid_gamepad]


그냥.. BT HID로 설정하고

6바이트 날리면 되는건가?


SoftwareSerial bluetooth(bluetoothRX, bluetoothTX);

//...


// Command Mode

// --------------

bluetooth.begin(9600);

delay(50); 

bluetooth.print("$$$");

delay(50); 

bluetooth.print("SN,HIDJoystick\r\n");

delay(50); 

bluetooth.print(" SU,57\r\n");

delay(50); 

bluetooth.print("S~,6\r\n");

delay(600); 

bluetooth.print("SH,0240\r\n");

delay(200); 

bluetooth.print("R,1\r\n");  

delay(400);


// HID Joystick Report

// --------------

bluetooth.write((byte)0xFD); //Start HID Report

bluetooth.write((byte)0x6);  //Length byte


// 1. X/Y-Axis

bluetooth.write(45);  //First X coordinate

bluetooth.write(-33); //First Y coordinate


// 2. X/Y-Axis

bluetooth.write(45);  //Second X coordinate

bluetooth.write(-33); //Second Y coordinate


// Buttons

bluetooth.write(B10000001); // Second Byte (Buttons 1-8)

bluetooth.write(B10000000); // Second Byte (Buttons 9-16)

[링크 : https://stackoverflow.com/questions/27661297/hid-reports-scan-codes-for-rn-42-hids-gamepad-profile]



+

RN-42

[링크 : http://eleparts.co.kr/goods/view?no=3555519] 48590

[링크 : http://eleparts.co.kr/goods/view?no=2276606]  22600


정확하게는 RN-42로는 안되고(SPP만 지원) RN42HID나 RN42NHID로 된 녀석이 필요하다.

대충 찾아 보는데.. RN42HID로 된 녀석들이 잘 안보이는지라.. 잘못샀다가는 돈만 날릴 듯?

[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/50002328A.pdf]


+

FB155BC

모델명은 같은데 HID 여부가 다르니 주의 

30000원 / 정찰가 인듯?

[링크 : http://www.eleparts.co.kr/goods/view?no=2161507]

[링크 : http://www.devicemart.co.kr/1065515]

'게임 > 컨트롤러' 카테고리의 다른 글

pxn2119pro 중고구매  (0) 2025.01.06
ex m air 펌웨어 (안드로이드 갤럭시 S10)  (0) 2023.01.25
조이스틱 분해 그리고.. 수...리?  (4) 2018.04.10
조이트론 두고보자.. ㅠㅠ  (2) 2018.04.09
track IR  (2) 2018.04.08
Posted by 구차니
개소리 왈왈/독서2018. 4. 24. 08:36

술술 잘 읽히는 재미있는 책

다만 소개서 수준이지 기술서적은 아니라

VR에 호기심이 많은 사람들에게는 도움이 될 만한 책이다.


근데 신기한 용어 발견


MIXED REALITY(혼합현실)

REAL ENVIRONMENT(현실)

- 그냥 우리가 사는 곳

AUGMENTED REALITY(증강현실)

- 물건에 덧 씌우는

AUGMENTED VIRTUALITY(증강가상)

- 현실의 물건을 가상의 세계로 통합

VIRTUAL ENVIRONMENT(가상)

- 이게 VR 인가?

[링크 : https://en.wikipedia.org/wiki/Reality%E2%80%93virtuality_continuum]

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


[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9788959894444]

'개소리 왈왈 > 독서' 카테고리의 다른 글

책 - 혼자 공부하는 가상현실 개념사전  (0) 2018.04.27
책 - WPF MVVM 일주일 만에 배우기  (2) 2018.04.27
책 - 챗봇혁명  (0) 2018.04.23
책 - 아버지의 인생수첩  (0) 2018.04.22
책 - 인생 망치는 법  (0) 2018.04.19
Posted by 구차니
개소리 왈왈/독서2018. 4. 23. 19:14

2016년 일본책

지금시점에서는 당연하고 별 기대도 없으며 당연한 기술이 된 챗봇이다


챗봇은 어떤 의미로는 HCI로서

컴퓨터/인공지능과 사람을 잇는 유저 인터페이스로 존재하지

챗봇 자체적으로 어떠한 무엇이 되진 못하지 않을까?


기술이 성숙해서

입력을 음성으로 받으면 시리

채팅으로 받으면 챗봇이 되는건데

이상의 어떠한 의미가 있을까?


진짜 중요한 건 그 뒤에 있는

인공지능을 위한 백데이터와

사용자별 특화 데이터

그리고 그 중에 답을 찾는 로직인데 말이다


기술이 더 발전해서 BCI가 당연한 시대가 온다면

뇌파나 직접 네트워크 연결을 통한 채팅이 챗봇의 미래가 아닐까?



알렉사 문제에 있듯(TV 소리 듣고 주문해버림)

사용자 목소리 인식이나, 상황 및 문맥 인식, 평소 행적을 통한 간접 인증 등

인간적인 행위들을 위한 많은 비인간적인 데이터들이

그 사람의 가상인격을 위한 백데이터로 축적되고

인공인격에 의한 에뮬레이션을 통해 비서를 규현해 낸다면

사용자 편의는 올라가겠지만


반대로 그렇게 구현된 인격은 자신인가

인간의 존재의의는? 라는 인간 정체성 문제가 발생하지 않을까?

내가 사라져도 AI에 의해 구현된 나의 인격이 존재해서 독립적으로 작동이 가능하다면

그거야 말로 내가 사라져도 다른 사람들이 알지 못한다는 공포로 연결되지 않을까?


[링크 : https://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9791157830831]

Posted by 구차니
embeded/raspberry pi2018. 4. 23. 14:16

오.. 어떤식으로 쓸 수 있을지 모르겠지만

라즈베리 3B 되면서 PMIC가 장착되었다고 한다.


근데 벤치상에... 3B는 그나마 양호한데..

3B+의 자비없는 대기전력.. ㄷㄷ (생각해보면 Odroid U3 급이긴 한데 성능은 누가 나으려나?)

[링크 : https://www.raspberrypi.org/magpi/raspberry-pi-specs-benchmarks/]


Witty Pi 라는 HAT은 RTC와 Power on/off 기능 추가

전원 버튼이 HAT에 추가되고 그걸 누르면 On 되고

On 상태에서 Off를 누르면 라즈베리가 SW적으로 종료절차를 따르게 된다.

Suspend도 지원하는 매력적인 녀석 (23.04USD 꽤 쎄네...)

[링크 : http://www.uugear.com/witty-pi-realtime-clock-power-management-for-raspberry-pi/]

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


I2C를 켜라고 하는것 봐서는 I2C를 통해 리눅스에게 전원 On/Off 상태를 알려주도록 되어 있는 듯?

Please notice that sudo is necessary to run this script. This script will automatically do 

these tasks in order:

1. Enable I2C on your Raspberry Pi

2. Install i2cctools, if it is not installed yet

3. Configure Bluetooth to use minicUART (Raspberry Pi 3 only)

4. Install wiringPi, if it is not installed yet

5. Install Witty Pi programs, if they are not installed yet

[링크 : http://www.uugear.com/doc/WittyPi_UserManual.pdf]



3B+은 2018년 3월 출시되었고

CPU 클럭 1.2->1.4로 상향

기가비트 이더넷 추가, PoE Ready

802.11ac 추가

의 차이가 존재한다.

[링크 : https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/]

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

rpi firmata  (0) 2018.05.11
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
라즈베리 파이 배포용 이미지 만들기  (0) 2018.02.23
Posted by 구차니
Linux API/linux2018. 4. 23. 13:46

잘은 모르겠지만.. PC에서 쓰이는 PWRBTN  같은 전원관련 스위치들은

PMIC를 통해 인터럽트를 발생시킨다고 하는데..

GPIO를 통한 인터럽트인지 I2C(혹은 SMBUS)를 통해 통보받은걸 인터럽트로 넘겨주는건진 모르겠다.


2.7.15 Power Control Signals

i.MX6 Qseven PMIC SOM supports two power control signals PWGIN and PWRBTN# on Qseven Edge connector.

PWGIN input from Qseven Edge connector is the active high signal which is used to enable the power of i.MX6

Qseven PMIC SOM. For more details on PWRGIN signal usage, refer section 3.1.2.

i.MX6 Qseven PMIC SOM supports PWRBTN# input from Qseven Edge connector which is the active low signal and

connected to i.MX6 CPU’s ONOFF pin. This pin can be used to On/Off the i.MX6 CPU by connecting push button in

the carrier board. When the board power is On, a button press between 750ms to 5s will send an interrupt to core to

request software to bring down the i.MX6 safely (if software supports). Otherwise, button press greater than 5s

results in a direct hardware power down which is applicable when software is unable to power Off the device. When

the i.MX6 CPU power supply is Off, a button press greater in duration than 750ms asserts an output signal to request

power from a power IC to power up the i.MX6 CPU. 

[링크 : http://www1.futureelectronics.com/doc/IWAVE%20SYSTEMS%20TECHNOLOGIES/G15MDataSheet.pdf]


 +static irqreturn_t pb_isr(int irq, void *dev_id)

+{

+ int ret;

+ int state;

+

+ ret = intel_soc_pmic_readb(DC_TI_SIRQ_REG);

+ if (ret < 0) {

+ pr_err("[%s] power button SIRQ REG read fail %d\n",

+ pb_input->name, ret);

+ return IRQ_NONE;

+ }

+

+ state = ret & SIRQ_PWRBTN_REL;

+

+ if (force_trigger && state) {

+ /* If we lost the press interrupt when short pressing

+ * power button to wake up board from S3, simulate one.

+ */

+ input_event(pb_input, EV_KEY, KEY_POWER, 1);

+ input_sync(pb_input);

+ input_event(pb_input, EV_KEY, KEY_POWER, 0);

+ input_sync(pb_input);

+ } else {

+ input_event(pb_input, EV_KEY, KEY_POWER, !state);

+ input_sync(pb_input);

+ pr_info("[%s] power button %s\n", pb_input->name,

+ state ? "released" : "pressed");

+ }

+

+ if (force_trigger)

+ force_trigger = 0;

+

+ return IRQ_HANDLED;

+}

+

+static int pb_probe(struct platform_device *pdev)

+{

+ int ret;

+

+ pwrbtn_irq = platform_get_irq(pdev, 0);

+ if (pwrbtn_irq < 0) {

+ dev_err(&pdev->dev,

+ "get irq fail: irq1:%d\n", pwrbtn_irq);

+ return -EINVAL;

+ }

+ pb_input = input_allocate_device();

+ if (!pb_input) {

+ dev_err(&pdev->dev, "failed to allocate input device\n");

+ return -ENOMEM;

+ }

+ pb_input->name = pdev->name;

+ pb_input->phys = "power-button/input0";

+ pb_input->id.bustype = BUS_HOST;

+ pb_input->dev.parent = &pdev->dev;

+ input_set_capability(pb_input, EV_KEY, KEY_POWER);

+ ret = input_register_device(pb_input);

+ if (ret) {

+ dev_err(&pdev->dev,

+ "failed to register input device:%d\n", ret);

+ input_free_device(pb_input);

+ return ret;

+ }

+

+ ret = request_threaded_irq(pwrbtn_irq, NULL, pb_isr,

+ IRQF_NO_SUSPEND, DRIVER_NAME, pdev);

+ if (ret) {

+ dev_err(&pdev->dev,

+ "[request irq fail0]irq:%d err:%d\n", pwrbtn_irq, ret);

+ input_unregister_device(pb_input);

+ return ret;

+ }

+

+ return 0;

+}

[링크 : https://github.com/.../uefi/cht-m1stable/patches/PWRBTN-add-driver-for-TI-PMIC.patch]


> +int intel_soc_pmic_set_pdata(const char *name, void *data, int len)

> +{

> + struct cell_dev_pdata *pdata;

> +

> + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);

> + if (!pdata) {

> + pr_err("intel_pmic: can't set pdata!\n");

> + return -ENOMEM;

> + }

> +

> + pdata->name = name;

> + pdata->data = data;

> + pdata->len = len;

> +

> + list_add_tail(&pdata->list, &pdata_list);

> +

> + return 0;

> +}

> +EXPORT_SYMBOL(intel_soc_pmic_set_pdata); 

[링크 : https://patchwork.kernel.org/patch/4227571/]



+

근데... 정기적으로 읽긴 그런 애매한 녀석이고..

이걸 인터럽트로 어떻게 던지지?



[링크 : https://www.intel.com/.../datasheets/7-series-chipset-pch-datasheet.pdf]

'Linux API > linux' 카테고리의 다른 글

fopen64  (0) 2019.06.24
ubuntu iio rotate key 찾기 또 실패  (0) 2019.05.27
linux kernel governor 관련 코드  (0) 2018.04.17
linux shared memory 관련  (0) 2016.12.22
linux ipc  (0) 2016.12.20
Posted by 구차니

기본 제공량 11G 다 쓰고 나서는

예전에 프로모션으로 제공된 100G가 자동으로 사용되고

총 잔여량이 99.81GB로 차감되서 사용된다.


근데.. 할일도 없이(?)

데이터 소진해서 정말로 되나 확인한다고

인터넷만 잡고 살았더니 삶이 피폐해진 느낌...




+

히이익 위약금.. 약정만료일 그켬!!!! ㅠㅠ


'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

게임 튜너와 안드로이드 해상도  (0) 2018.10.03
pf1000u와 3d 안경  (0) 2018.08.28
wibro egg 해지 청구서 도착  (0) 2018.04.16
egg 상품권 소식이 없네...  (0) 2018.04.12
LTE egg 도착!  (4) 2018.03.24
Posted by 구차니
개소리 왈왈/독서2018. 4. 22. 23:44

그냥 토닥토닥 해주는 책

가끔 아들을 언급하거나

자기 직접을 말할때 빼고는

부드러운 도덕책 읽는 느낌이라고 해야하나?

이렇게 살아왔고 이랬던 적도 있고

이런게 아쉬웠던 때도 있고

그렇게 살아왔고 그렇게 살아간다 라는 따스한 내용



[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?&barcode=9791156024200]

Posted by 구차니
이론 관련/전기 전자2018. 4. 22. 23:24

Simple PLD - SPLD ?

Complex PLD - CPLD


GAL : Generic Logic Array

PAL :  Programmable Array Logic

PLD : Programmable Logic Device

CPLD : Complex Programmable Logic Device

FPGA : Field Programmable Gate Array 

[링크 : https://www.embeddedrelated.com/showthread/comp.arch.embedded/9278-1.php]

'이론 관련 > 전기 전자' 카테고리의 다른 글

balanced unbalanced  (0) 2018.05.14
MFCCs - Mel-frequency cepstral coefficients  (0) 2018.05.02
pmos nmos cmos  (0) 2018.04.12
Retiming  (0) 2018.04.12
XNOR ?  (0) 2018.04.12
Posted by 구차니

중국분위기인줄 알았는데..

일본과 중국의 하이퍼퓨전?


중국식 의복인줄 알았는데

배경이 점점 사무라이와 기모노 같은게 나오더니

앨리스가 입는 옷도 먼가 미묘하게.. 기모노 같은 느낌 -ㅁ-


예전에 24%에서 못넘긴거 같은데 그래도 진척이 있네..

그래도 나름 오래한거 같은데.. 고작 36% 라니 ㅠㅠ


심심해서 메뉴에 장비목록 구경







새로운 스테이지에 추가된 기능 체인을 당긴다!


내 앞날인가.. 피가 쓰으~윽 ㄷㄷ


꼬치할때 그 충인가..? 한자랑 약해서

근데 중국같으면서도 슬슬 일본 틱한 저 느낌..




여기부터 헐.. 중국이 아니라 일본이었어? 라는 느낌 팍팍

전형적인 일본의 오니 + 사무라이 구만?


순간 얼핏 보고 일장기인줄..


마작패 같아서 미묘하게 국적불명


장수말벌은 지가 무슨 제다이도 아니고 후추 기관총으로 쏘면

칼로 막아낸다 -_- 빡쳐서 망아지 샷! 하면 이런 이펙트 뜸 ㅋㅋ

무난하게(?) 잡는 법은

토끼 폭탄으로 유인해서 터트리고 기관총 갈기면 끝~



어라.. 치마에도 해골이 ㅋㅋ




군주말벌.. 느므느므 심하게 일본틱하네..


아까 장수말벌보다 강력한 이펙트로 총을 막는다 -_-

야이 -_-


갑자기 앨리스 교주님 된 느낌..


이제.. 기모노 일본 여인... -ㅁ-???!

걍 이제 부터 생각을 포기 ㅋㅋㅋ

전형적인(?) 서양의 오리엔탈리즘인가 싶어짐







먼가 트라우마걸릴 만한 구도인데? ㅋㅋ (크라이시스 1 참고)


언리얼 엔진으로 이런 것도 만들수 있구나~


앞서 배타고 2차원 횡스크롤 할떄는 그래도 3D 느낌이었는데

이제 2D 느낌의 횡스크롤 이다!





저기 붓달린데는 '火' 에서 불이 나고 체력 갂이는데

남은 체력 상관없이 한 세번 정도 닿으면 게임오버.. -_-

점프해서 피할수도 없고 걍 옆으로 피하는 수 밖에 없다.


궁수말벌.. 총알 아까워...

공중에서 있다 보니 피나 이빨을 못 얻음 ㅠㅠ


먹물말벌은 한자로 써있는 돌이 본체인데

그걸 빨리 파괴하지 않으면 나사벌 같은 녀석들이 날아들어서 달라붙는다.









스토리상 쟤네 이 거리에서 털순 없음 ㅠㅠ

그것도 모르고 장거리 저격하는데 왜 안죽어?!?! 이러는 중


순서대로 종쳐야 문 열립니다~

보안이 허술하구만?



얘가 먹물말벌 본체


돌이라 칼로는 못 뽀개고 망아지 망치로 깨야 한다.



기관총이 자꾸 과열되니까(풀업해도 과열되는 시간이 길어지더라도 어쩔수 없으니..)

같이 스왑해서 쓸 수 있는 주전자포를 업그레이드 하기로 결정!



2단계는 안해봤는데.. 3단계는 빨간색으로 바뀌고 좀더 고오오오급스럽게 바뀜


그리고 폭발시 녹색으로 터짐, 웬지 독으로 디버프 걸어줄거 같다 ㅋㅋ





나 교주아니다.. -_-



무진장 짜증났던 곳

해파리 같은 놈들 세넘 정도 나오는데 자동 조준이 자꾸 이상하게 바뀌어서

바닥에 떨어지면 죽여야 하는데 다음놈 떄리고 있어서 처리 못해

어쩔수 없이 그냥 몇대 맞아 가면서 후다닥 진행하는 걸로 해결

가장 위로 가서는 좀 잡히는데 아래서는 잡아도 잡아도 계속 다른 애들이 오는건지

제대로 못잡아서 부활하는건지 모르겠다.



부채가 떠있는 곳인데 먼가 멋지게 나옴 ㅋㅋ





Posted by 구차니
embeded/odroid2018. 4. 22. 15:30

문의를 했는데

일단.. 정체 불명의(?) 스위치는 power off시(shutdown 명령을 통한) 다시 켜는 용도

음.. 그럼 꾸욱 누르고 있으면 강제 종료 되려나?



그리고 max_freq를 500~600MHz에 거버너 performance라는데

기본이  performance고 1.7GHz인데


$ sudo cpufreq-set -f 500000 

$ sudo cat cpuinfo_cur_freq 500000

위의명령을 통해서 변경하고 확인해봐도 소비전력이 2.35W 이하로 떨어지진 않는다.

내가 모르는 다른 무언가가 있는건가?



governor는 performance로 맞추고 max_freq를 500~600Mhz 정도로 변경하면 1.5Watt까지 줄어들것 같습니다.

물론 USB 장치의 소비전류는 별도로 생각한 경우입니다.


SW1은 Power Off 상태에서 보드의 전원을 켤때 사용합니다.

오드로이드 보드는 Suspend/Resume같은 sleep 기능을 지원하지 않습니다. 

[링크 : http://com.odroid.com/sigong/nf_board/nboard_view.php?brd_id=odroidu2&bid=8238]


HDMI mini 컨버터를 두고 와서 확인을 못하는데..

켜져있는 상태에서 스위치를 누르니.. Xorg가 45%로 치솟는다.

전원 OFF UI를 그려준다고 난리피는걸까?


+

2018.04.23

음.. 말그대로 전원스위치로 인식을 하는 듯?

문득.. 리눅스 쪽으로 전원 스위치를 어떻게 인식시키는지 궁금해지네?



한참 있다가 죽어 버렸네..

power off/on 기능을 겸하는 듯

(다만 오프라인에서 켤수 없으면 죽은걸 살릴수 없으니 별 의미는 없네)

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

오랫만에 지름!  (2) 2018.09.07
odroid eMMC / SD 리더 호환성  (0) 2018.05.14
odroid u3 mediawiki 설치해보니..  (0) 2018.04.19
odroid u3 소비전력 재측정  (0) 2018.04.17
odroid u3 boot.ini  (0) 2018.04.17
Posted by 구차니