embeded/AVR (ATmega,ATtiny)2021. 6. 28. 22:19

attiny2313에 엣지 트리거 핀 하나 이용해서 USB 1.1 구현을 한 듯.

음.. atmega128 등에서는 못쓰는건가?

No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt).

 [링크 : https://www.obdev.at/products/vusb/index.html]

 

Previous versions have been tested with IAR 4.10B/W32 and

[링크 : https://github.com/obdev/v-usb/blob/master/Readme.txt]

[링크 : https://github.com/obdev/v-usb]

 

다운로드 해서 보니 ATtny45 ATmega8에 대한 언급은 있는데

압축 파일 자체가 2012 인걸 봐서는.. 오랫동안 유지보수 안된 것 같긴하다..

[링크 : https://www.obdev.at/products/vusb/download.html]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

ATMEL AT32UC3A 시리즈  (0) 2023.07.04
AVR FFB(force feedback)  (0) 2021.06.29
avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
Posted by 구차니
embeded/raspberry pi2021. 6. 28. 16:14

usb hid 라이브러리

[링크 : https://circuitpython.org/libraries]

circuit python uf2 다운로드

[링크 : https://circuitpython.org/board/raspberry_pi_pico/]

 

step 1. circuit python uf2 파일 쓰기

BOOTSEL 누르고 부팅해서 adafruit-circuitpython-raspberry_pi_pico-en_US-6.3.0.uf2 파일을 드라이브에 던진다.

 

step 2. lib 복사

circuitpython이 설치되면 리부팅 되고 아래와 같은 구조의 디렉토리가 보이게 된다.

adafruit-circuitpython-bundle-6.x-mpy-20210625.zip 를 받아 zip 파일내의

adafruit_hid 디렉토리를 lib/adafruit_hid 에 복사한다.

[링크 : https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries]

 

step 3. code.py 작성

아래는 꽂으면 A만 미친듯이 눌러대는 녀석이다. (그러니 현재는 테러용 USB ㅋㅋ)

마치 shift가 눌린 것 처럼 작동하는데 코드는 좀 더 분석이 필요하다.

Import time

import board
import digitalio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode

# The Keycode sent for each button, will be paired with a control key
keys_pressed = [Keycode.A, "Hello World!\n"]
control_key = Keycode.SHIFT

# The keyboard object!
time.sleep(1)  # Sleep for a bit to avoid a race condition on some systems
keyboard = Keyboard(usb_hid.devices)
keyboard_layout = KeyboardLayoutUS(keyboard)  # We're in the US :)

while True:
    keyboard_layout.write('A')
    time.sleep(0.01)

 

Hello world 출력하는 키보드(!) 예제 ㅋㅋ

import time

import board
import digitalio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode

# The keyboard object!
time.sleep(1)  # Sleep for a bit to avoid a race condition on some systems
keyboard = Keyboard(usb_hid.devices)
keyboard_layout = KeyboardLayoutUS(keyboard)  # We're in the US :)

while True:
    keyboard_layout.write('H')
    keyboard_layout.write('e')
    keyboard_layout.write('l')
    keyboard_layout.write('l')
    keyboard_layout.write('o')
    keyboard_layout.write(' ')
    keyboard_layout.write('w')
    keyboard_layout.write('o')
    keyboard_layout.write('r')
    keyboard_layout.write('l')
    keyboard_layout.write('d')
    time.sleep(1)

[링크 : https://tutorial.cytron.io/.../keyboard-emulator-using-raspberry-pi-pico-maker-pi-pico-and-circuitpython/]

[링크 : https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython]

[링크 : https://learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse]

 

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

AArch64 linux cpu features  (0) 2021.06.30
citcuitpyrhon joystick  (0) 2021.06.28
rpi pico pinout  (0) 2021.06.28
rpi 3b+ with bt / uart  (0) 2021.06.28
rpi pico USB OTG를 이용한 오실로스코프  (0) 2021.06.27
Posted by 구차니
embeded/raspberry pi2021. 6. 28. 11:51

VBUS(GP40, 우측 상단)에 연결하면 USB Host 모드로만 작동해야 한다는 의미 같은데

아마 USB device 모드라면 USB를 통해 전원을 입력받아야 하기 때문이려나?

Whilst it is possible to connect the Raspberry Pi’s 5V pin to the Raspberry Pi Pico VBUS pin, this is not recommended.
Shorting the 5V rails together will mean that the Micro USB cannot be used. An exception is when using the Raspberry
Pi Pico in USB host mode, in this case 5V must be connected to the VBUS pin.

 

 

GP0이 TX GP1이 RX

 

LED는 GPIO25에 연결되어 있고, TP5로도 연결이 되어있는데

BOOTSEL은 TP6에만 되어있고 GPIO로 연결은 되어 있지 않다.

TP1 – Ground (close coupled ground for differential USB signals)
TP2 – USB DM
TP3 – USB DP
TP4 – GPIO23/SMPS PS pin (do not use)
TP5 – GPIO25/LED (not recommended to be used)
TP6 – BOOTSEL

[링크 : https://www.raspberrypi-spy.co.uk/2021/01/pi-pico-pinout-and-power-pins/#prettyPhoto]

 

[링크 : https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf]

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

citcuitpyrhon joystick  (0) 2021.06.28
rpi pico, circuitpython, USB HID  (0) 2021.06.28
rpi 3b+ with bt / uart  (0) 2021.06.28
rpi pico USB OTG를 이용한 오실로스코프  (0) 2021.06.27
rpi pico usb 저장소  (0) 2021.06.24
Posted by 구차니
embeded/raspberry pi2021. 6. 28. 11:44

라즈베리파이 3B를 사용중인데 ttyAMA0를 하니 minicom 자체가 먹통이 되서

rpi pico랑 연결하는글을 보다가 발견

$ minicom -b 115200 -o -D /dev/serial0

[링크 : https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf]

 

흐음.. serial0을 쓰도록 해야 할 것 같네.

$ ls -al /dev/serial*
lrwxrwxrwx 1 root root  5 Jun 28 02:17 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root  7 Jun 28 02:17 /dev/serial1 -> ttyAMA0

 

+

원래 시리얼통신 포트 이름은 /dev/ttyAMA0이다. 그런데 파이3에서는, 이전까지 /dev/ttyAMA0에 할당되어있던 시리얼포트가 블루투스에 할당되었다. 시리얼포트는 /dev/ttyS0로 옮겨졌다.

[링크 : http://lhdangerous.godohosting.com/wiki/index.php/라즈베리파이_시리얼_통신_설정...]

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

rpi pico, circuitpython, USB HID  (0) 2021.06.28
rpi pico pinout  (0) 2021.06.28
rpi pico USB OTG를 이용한 오실로스코프  (0) 2021.06.27
rpi pico usb 저장소  (0) 2021.06.24
rpi pico main.py 올리기 윈도우10, 우분투  (0) 2021.06.24
Posted by 구차니
embeded/esp322021. 6. 28. 11:11

http://ip << 웹기반 뷰어

http://ip:81/stream << 크롬 / vlc 스트리밍

 

물론(?) 당연히 한개 세션만 스트리밍 되는 한계로

웹에서 켜놓고 있으면 http://ip:81/stream 으로도 안나온다. -_-

 

[링크 : https://blog.naver.com/pa3018/221481983862]

[링크 : https://github.com/espressif/esp32-camera/issues/24]

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

esp32 freertos  (0) 2021.07.07
esp32cam setting  (0) 2021.07.06
LDO 발열?  (0) 2021.06.25
esp32-cam camerawebserver  (0) 2021.06.24
esp32 cpu 사양 및 성능  (0) 2021.06.23
Posted by 구차니
게임2021. 6. 27. 22:19

매형 결혼하고 선물로 드렸던 FSX가 잠시 돌아와서

우리집에서 놀러온김에 설치해서 해보았는데 어라.. 왜 이륙하고 나면 자꾸 지 멋대로 상승을 하는지

이해를 못하고 조이스틱으로 계속 내리찍으면서 평행비행을 유지했는데

 

유튜브 질(!) 하다 보니 비행기 조정시 꾸준히(?) 상승하기 위해서

조종간을 당기지 않고 트림을 이용해서 설정하면, 조종간을 놓아도 상승하다고 하는데

그게 문득 생각이 나서 단축키 찾는 중

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

 

조이스틱에는 트림키가 있을 것 같진 않은데.. 한번 찾아는 봐야 할 듯..

pgup / pgdn 혹은

ctrl-1,7 엘리베이터 트림

[링크 : https://myfoot.tistory.com/entry/4비행-조작키-알아보기]

[링크 : https://tsblog.simulz.kr/165]

 

셋팅에서 보니 elevator trim(down) / elevator trim(up) 으로 숫자키 1,7번이 할당되어 있는데 이게 그거 맞나?

'게임' 카테고리의 다른 글

magicka chapter 9 포기 -_ㅠ  (0) 2020.04.01
magicka 포기?  (0) 2020.03.30
magicka 챕터 4까지 완료!  (0) 2020.03.21
magicka 시작!  (0) 2020.03.20
remember me 한글 패치  (0) 2020.03.10
Posted by 구차니
embeded/raspberry pi2021. 6. 27. 08:23

USB OTG 케이블을 이용하여

간이 오실로스코프를 만들수 있다니 혹하는데 3.3V 까지 밖에 안되니 주의를 기울여야 할지도..

 

[링크 : https://hackaday.com/2021/06/26/raspberry-pi-pico-oscilloscope/]

[링크 : https://github.com/fhdm-dev/scoppy]

 

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

rpi pico pinout  (0) 2021.06.28
rpi 3b+ with bt / uart  (0) 2021.06.28
rpi pico usb 저장소  (0) 2021.06.24
rpi pico main.py 올리기 윈도우10, 우분투  (0) 2021.06.24
uf2 - USB Flash Format  (0) 2021.06.23
Posted by 구차니

조카가 놀러와서 이빨 빠졌대서 보니

먼가 하나가 보이는데.. 정채 불명

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

휴양!  (0) 2021.07.04
을라들 규강검진  (0) 2021.07.03
첫 애 둘째 애 자전거 타기  (0) 2021.06.19
개스키!!!!  (0) 2021.06.15
low batt  (0) 2021.06.12
Posted by 구차니

정상적으로 작동하지 않아서 코드를 보는데, typed_tensor()라는 부분을 발견.

 

typed_tensor (int tensor_index)
T *
Perform a checked cast to the appropriate tensor type (mutable pointer version).

[링크 : https://www.tensorflow.org/lite/api_docs/cc/class/tflite/interpreter#classtflite_1_1_interpreter_1a314...]

 

tensor (int tensor_index)
TfLiteTensor *
Get a mutable tensor data structure.

[링크 : https://www.tensorflow.org/lite/api_docs/cc/class/tflite/interpreter#classtflite_1_1_interpreter_1ac1d...]

[링크 : https://www.tensorflow.org/lite/api_docs/cc/class/tflite/interpreter]

 

+

[링크 : https://github.com/tensorflow/tensorflow/.../tensorflow/lite/examples/label_image/label_image.cc]

[링크 : https://github.com/tensorflow/tensorflow/.../tensorflow/lite/examples/label_image/bitmap_helpers_impl.h]

 

+

2021.06.28

이거랑 상관없었음

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

tensorflow lite on rpi4 64bit  (0) 2021.06.30
tensorflow delegate  (0) 2021.06.30
tflite yolov4  (0) 2021.06.14
tensorflow lite yolov4  (0) 2021.06.10
tensorflow lite interpreter->AllocateTensors()  (0) 2021.05.26
Posted by 구차니
embeded/esp322021. 6. 25. 10:09

LDO를 다들 설계잘해서 열이 안나는 거였나..

아니면 전류가 너무 높은건가?

 

[링크 : https://elec4.co.kr/article/articleView.asp?idx=18339]

[링크 : http://www.thelec.kr/news/articleView.html?idxno=3080]

[링크 : https://cafe.daum.net/HWD/3uXt/5365?svc=cafeapi]

 

 

+

2021.06.28

라즈베리의 3.3V 출력을 이용해서 켜봤는데..

부하가 걸리면 열 나는건 매한가지. 코어 자체가 클럭이 높아서 그런가 열이 좀 심한듯..

그리고 LDO가 열나는건지 PSRAM이 열나는건진 분간이 안되네

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

esp32cam setting  (0) 2021.07.06
esp32cam webservercam rtsp?  (0) 2021.06.28
esp32-cam camerawebserver  (0) 2021.06.24
esp32 cpu 사양 및 성능  (0) 2021.06.23
ov2640 on esp32-cam  (0) 2021.06.23
Posted by 구차니