è³¼å ¥ãããã¼ãã®åä½ç¢ºèªã¨ãã¦ãã£ã¦ã¿ããCircuitPythonã使ãã
ãã¼ããã¼ãã¼ã®èµ·åã¨ã¢ãããã¼ã
RST端åã¨GND端åãç´ æ©ã2åã·ã§ã¼ããããã ããã¨ãNICENANO
ã¨ãããã©ã¤ããè¦ããããã«ãªãã¯ãã
NICENANOã«ããINFO_UF2.TXT
ãè¦ãã¨ãã¼ããã¼ãã®ãã¼ã¸ã§ã³ãããããCircuitPythonã®8.2以éã使ãã«ã¯ãã¼ããã¼ãã¼ã®ãã¼ã¸ã§ã³ 0.6.1以éãå¿
è¦ã
確èªããã¨ããå³ã®ããã« 0.6.0 ã ã£ãã®ã§ã¢ãããã¼ãããã
Board-ID: nRF52840-nicenano
ã¨ããã¨ãããè¦ã¦ããããã®ã㨠ãã®IDã«ç´ã¥ããã¡ã¼ã ã¦ã§ã¢ãé¸ãã§æ¸ãè¾¼ãå¿
è¦ãããããã
SuperMini nRF52840ã®CircuitPythonã®ãã¼ã¸ã® Update UF2 Bootloader ã®ã¨ãããè¦ãã
å
·ä½çãªã¢ãããã¼ãæ¹æ³ãæ¸ãã¦ãããã¼ã¸ã¸ã®ãªã³ã¯ãããã®ã§ãããåèã«æ¸ãè¾¼ãã
ðhttps://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/update-bootloader
ä¸è¨ã®ãã¼ã¸ã«ãããä¸çªå®å
¨ã¨ãã Use UF2
ã¨ããããæ¹ãé¸ã¶ããã¡ã¤ã«ããã©ãã°ã¢ã³ãããããããã°ããã
対象ãã¡ã¤ã«ã¯ update-nice_nano_bootloader-x.x.x_nosd.uf2
ã¨ããæãã®ãã¤ã
ããã§å
ã»ã©ç¢ºèªããBoard-IDãå½¹ã«ç«ã¤ã
ãã©ãã°ã¢ã³ãããããããã¨ãã£ãããã©ã¤ããè¦ããªããªã赤LEDã®ç¹æ»
ã®ä»æ¹ãã¡ãã£ã¨å¤ããï¼ã»ãã®ãå
ã â ãã³ãã³ã£ã¨ããç¹æ»
ã«å¤ãã)ã
1ç§ãããããã¨ï¼ãããããªã»ããå¦çãèµ°ãï¼ããã¾ã§æ¸ããã¦ããããã°ã©ã ãèµ·åãããå·¥å ´åºè·ç¶æ
ã®ã¾ã¾ãªãLEDãç¹æ»
ãããã¤ã
ããããã¦ãã¼ããã¼ããèµ·åãããINFO_UF2.TXTã«æå¾ ãããã¼ããã¼ãã®ãã¼ã¸ã§ã³ãæ¸ããã¦ããã°æåï¼
CircuitPython 㧠Lãã«
ã¨ãã£ã¦ãåºæ¿ã«å®è£
ããã¦ããLEDãå
ãããã ãããã¬ãããã¼ãã¨ãã§å¥éLEDãã¤ãªãããã§ã¯ãªãã
Superminiç¨ã®CircuitPythonç°å¢ãå°å
¥ããå¾ãã¼ããåèµ·åããã¨ãã©ã¤ãåã CIRCUITPY
ã¨å¤ããã¯ãã
ããã¨ãArduino IDEã®ã·ãªã¢ã«ã¢ãã¿ã¼ãªã©ã§Superminiã¨éä¿¡ã§ããããã«ãªã£ã¦ãã(ãã¼ã¬ã¼ã:115200, NL&CRã§æ¹è¡)ãPythonã®å¯¾è©±ã¢ã¼ãREPLã使ã£ã¦
board.xxx
ã§ã¢ã¯ã»ã¹ã§ãããã³ã®ä¸è¦§ãåå¾ããã
LED
ã£ã¦ã®ãå®è£
æ¸ã¿ã®LEDã¨æãããã
LEDã¯åºæ¿ãè¦ãéãã¾ã ãã¨ä¸ã¤ã¯ããã®ã ããããã£ã½ãIDã¯ã»ãã«ã¯ãªãã£ãã
]0;ðBLE:Off | Done | 9.2.1\[2K[0GAuto-reload is on. Simply save files over USB to run them or enter REPL to disable. Press any key to enter the REPL. Use CTRL-D to reload. ]0;ðBLE:Off | REPL | 9.2.1\ Adafruit CircuitPython 9.2.1 on 2024-11-20; SuperMini NRF52840 with nRF52840 >>> import board >>> dir(board) ['__class__', '__name__', 'AIN0', 'AIN2', 'AIN5', 'AIN7', 'BAT_VOLT', 'I2C', 'LED', 'MISO', 'MOSI', 'NFC1', 'NFC2', 'P0_02', 'P0_04', 'P0_06', 'P0_08', 'P0_09', 'P0_10', 'P0_11', 'P0_12', 'P0_13', 'P0_15', 'P0_17', 'P0_20', 'P0_22', 'P0_24', 'P0_26', 'P0_29', 'P0_31', 'P1_00', 'P1_01', 'P1_02', 'P1_04', 'P1_06', 'P1_07', 'P1_11', 'P1_13', 'P1_15', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'TX', 'UART', 'VCC_OFF', '__dict__', 'board_id'] >>>
CIRCUITPYãã©ã¤ãã® code.py
ã以ä¸ã®ããã«æ¸ãæããã¨ããã£ã½ãç¹æ»
ã®ä»æ¹ã«ãªãã¯ãã
ãã£ã¦ã¿ãã°ãããããå·¥å ´åºè·æã½ããã§ç¹æ»
ãã¦ãã赤ãLEDã board.LED
ã§æ±ããã
import board import digitalio import time led = digitalio.DigitalInOut(board.LED) led.direction = digitalio.Direction.OUTPUT while True: led.value = True time.sleep(0.8) led.value = False time.sleep(0.2)