Raspberry Pico Keyboard Emulator CircuitPython Getting Started

Опубликовано: 18 Март 2021
на канале: JJ Micro
2,163
51

#Raspberrypipico #Raspberrypico #thonny
Raspberry Pi Pico #Thonny with #CircuitPython getting started.
Adafruit libraries , keyboard and mouse emulator adafruit-hid
If Thonny couldn't find automatically open windows control panel and device manager find right com port.

Test progarm blink.py
Save this file as code.py on your CircuitPython drive.

import time
import board
import digitalio

led = digitalio.DigitalInOut(board.GP25) ## GP25 or LED
led.direction = digitalio.Direction.OUTPUT


while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)


Test program keyboard_test.py
Save this file as code.py on your CircuitPython drive.

import time
import board
import digitalio
import usb_hid

from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

keyboard = Keyboard(usb_hid.devices)
layout = KeyboardLayoutUS(keyboard)


button = digitalio.DigitalInOut(board.GP15) ## Pushbutton in PIN 20 , GP15
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.DOWN

while True:
if button.value:
layout.write("Raspberry Pi Pico \n") ## \n newline
time.sleep(0.1)


На этой странице сайта вы можете посмотреть видео онлайн Raspberry Pico Keyboard Emulator CircuitPython Getting Started длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь JJ Micro 18 Март 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,163 раз и оно понравилось 51 зрителям. Приятного просмотра!