{"categories":["python","raspberryPi"],"blog_url":"https://shuzo-kino.hateblo.jp/","author_url":"https://blog.hatena.ne.jp/shuzo_kino/","url":"https://shuzo-kino.hateblo.jp/entry/2023/06/13/235619","provider_url":"https://hatena.blog","author_name":"shuzo_kino","published":"2023-06-13 23:56:19","version":"1.0","title":"Raspberry Pi Pico Python SDK\u3000\u305d\u306e\uff13\uff1aI2C\u30de\u30b9\u30bf\u30fc","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshuzo-kino.hateblo.jp%2Fentry%2F2023%2F06%2F13%2F235619\" title=\"Raspberry Pi Pico Python SDK\u3000\u305d\u306e\uff13\uff1aI2C\u30de\u30b9\u30bf\u30fc - Bye Bye Moore\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"type":"rich","width":"100%","provider_name":"Hatena Blog","blog_title":"Bye Bye Moore","description":"\u5b9f\u969b\u306e\u3068\u3053\u308d from machine import Pin, I2C import utime slaveAddress = 0x42 registerAddress = 0x06 writeData = b'123' i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=100000) #\u63a5\u7d9a\u5148\u3092\u8abf\u3079\u308b i2c.scan() #slaveAddress\u306b\u5bfe\u3057\u66f8\u304d\u8fbc\u307f i2c.writeto(slaveAddress, writeData) utime.sleep(1) #slaveAddress\u304b\u30894\u30d0\u30a4\u30c8\u5206\u8aad\u307f\u51fa\u3059 i2c.readfrom(slaveAdd\u2026"}