Skip to content

Instantly share code, notes, and snippets.

View erdemarslan's full-sized avatar
🙄
I may be slow to respond.

Erdem Arslan erdemarslan

🙄
I may be slow to respond.
View GitHub Profile
@erdemarslan
erdemarslan / micropython i2c scanner
Created November 6, 2021 18:19 — forked from projetsdiy/micropython i2c scanner
Micropython i2c scanner
# Scanner i2c en MicroPython | MicroPython i2c scanner
# Renvoi l'adresse en decimal et hexa de chaque device connecte sur le bus i2c
# Return decimal and hexa adress of each i2c device
# https://projetsdiy.fr - https://diyprojects.io (dec. 2017)
import machine
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))
print('Scan i2c bus...')
devices = i2c.scan()