Raspberry Pi Pico Wãããããæ¥æ¬ã§ã販売ãéå§ãã¾ãããæ¨å¹´6ææ«ã«ãªãªã¼ã¹ããã¦ãã9ã¶æå¾ ãããã¾ãããâ¦â¦ã
æç®±ã«ã¶ã¡è¾¼ãã ã180æ¥ã®ç¹ä¾ç³è«ããããããã°ä½¿ãã¯ãã¾ãããããããã¯ããã¨å¾åã«å¾ ã£ã¦ããã®ã§ãããããè²ã å®è£ ã§ãã
ãªããPico Wé¢é£ã®è¿æ³ã¨ãã¦ã¯ãå æä¸æ¬ã«å ¬å¼ã®SDKã«Bluetooth対å¿ãå ¥ã£ããã¨ã¨ãåããå æä¸æ¬ã«Pico Wã®ãµãã¼ãã追å ãããCircuitPython8.0.0ããªãªã¼ã¹ããããã¨ãæãããã¾ãããã£ã¦ãPicoWã§è²ã æ¬æ ¼çã«éã¹ãç°å¢ãæ´ã£ãã®ãããã¨æè¿ã ã£ãããã¾ãã
ã²ã¨ã¾ã3ã¤ããã£ã
ã¹ã¤ãããµã¤ã¨ã³ã¹ããã§ä¸éãã£ã±ãã®3ã¤åãããã£ã¦ã2æ¥ã§å°çããããã¨ããããã¾ãï¼OSCã®å±ç¤ºã«éã«åãããããããï¼æé©è¡¨ç¤ºã¯ãªã¼ã«ããã±ã¼ã¸ã®ä¸ã¨ãããã¾ããªãã¨ãå¾®å¦ãªã¨ããã«â¦â¦ãããã±ã¼ã¸ãæ¨ã¦ãããªããªããããããã£ã«ã ã ãä¿ç®¡ã§ãè¯ãï¼
ãã§æ©éå®è£ ã¾ã¤ãã1ã¤ã¯èªä½ã®uHAT Porter Picoã«å®è£ ãã¾ãããããä½ã«ä½¿ããã¨ãã¦ããã ã£ããå¿ããã®ã§ã¡ãã£ã¨OSCåãã«èãã¾ãã
ãã1ã¤ã¯ãã³ãããã¼ãå®è£ ããã¤ãã®ã«ã©ã¼GPIOãæ°åã§èªåå®è£ ãã¾ããã
ãã¨1ã¤ã¯ä¸æ¦ãã®ã¾ã¾ã¨ãã¦ãã²ã¨ã¾ãå ¨é¨ã«CircuitPythonãã¤ã£ããã§ããã¾ããã
CircuitPython8ãã¨ã¯ãã
CircuitPython8ã§ã¯ãsettings.tomlã¨ããæ¦å¿µã追å ããã¦ãããã«Wi-Fiã®è¨å®ãå ¥ããã¨osã¢ã¸ã¥ã¼ã«ããåç §ã§ããããWeb Workflowsãæå¹ã«ãªã£ãããã¾ãã
https://docs.circuitpython.org/en/latest/docs/workflows.html#web
ã¨ããã®ãç¥ããã«ãã¾ãã¯ãã¥ã¼ããªã¢ã«éãã«è¨å®ãããããªããåºã¦ãã¦ãããã¾ããã
```
CIRCUITPY_WIFI_SSID="<ç¡ç·AP>" CIRCUITPY_WIFI_PASSWORD="<ç¡ç·APã®ãã¹ãã¬ã¼ãº>" CIRCUITPY_WEB_API_PASSWORD="<Web Workflows>" CIRCUITPY_WEB_API_PORT=8080
```
ãã®ãã¨code.pyã«ä¸è¨ãã¥ã¼ããªã¢ã«ã«ããç¡ç·æ¥ç¶ãã¹ãã®ã¹ã¯ãªãããæ¸ãè¾¼ãã§åããã¨IPã¢ãã¬ã¹ã表示ããã¾ããã§ãhttp://IPã¢ãã¬ã¹:CIRCUITPY_WEB_API_PORTã«ã¢ã¯ã»ã¹ããã¨ãWeb Workflowsã表示ããã¾ãã
Web Workflowsã«ã¯ããã¡ã¤ã«ã®ç®¡çãã³ã¼ãã¨ãã£ã¿ãWebã·ãªã¢ã«ã³ã³ã½ã¼ã«ãæè¼ããã¦ãããã ãã¶ãªãããªæãã«ãªã£ã¦ãã¾ããã·ãªã¢ã«ã³ã³ã½ã¼ã«ãscreenã³ãã³ãã¨ãã使ãã°è¯ãã¨è¨ãè¦æ¹ãããã¾ããããã©ã¦ã¶ã§è¦ãããã¨ãã¯ã便å©ãªã®ã§ã¢ãªã£ã½ãã§ããã
ãã¡ã¤ã«ç®¡çãæã®FTPã¢ãããã¼ãã¼ã¿ãããªæãï¼ã¸ã¸ã¤ä¸¦æï¼
ã³ã¼ãã¨ãã£ã¿ããã¡ãããã¡ã¤ã«ãéãããä¿åãããå®è¡ãããã§ãã便å©ãã®ã§ããã
å¾è¿°ã®ã·ãªã¢ã«ã³ã³ã½ã¼ã«ã¨å¥ã®ã³ã³ã½ã¼ã«æ©è½ãããã¾ãã
ããã¦ã ãã¶ããã£ã±ãããã·ãªã¢ã«ã³ã³ã½ã¼ã«æ©è½ã表示ã®æè¿ããã«ã¼ã½ã«ç§»åããµãã¼ããªãã
ãªã«ããã ï¼
ã²ã¨ã¾ãã¯Webããæ å ±ãæ¾ã£ã¦ãã£ã¹ãã¬ã¤ã¢ãã«è¡¨ç¤ºããããHTTPãµã¼ãã¼ã«ãã¦ã¿ãããæ³åãã¦ãã¾ãã
ãã¨ãNTPã§æå»ãåå¾ããã®ãããã¨ã ãããªã®ã§ããããã»ã¼å¿ é çãªæãããã¾ããã
ã¨ããããã§ãããããããããå®è£ ã§ãããã¾ãå®ã¯äºåã«æ®éã®Picoã§ä½ããã¨ããã¯ä½ã£ããä¸èª¿ã¹æ¸ã¿ã ã£ãããã¦ããã®ã§ãããã«ããã¤ããã¿ãçºè¡¨ã§ããäºå®ã§ããããã®ãã¿ã«ã