bbcmicrobit / bbcmicrobit/micropython

i2c unknown

Open
#809 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
646
Forks
290
PR merge metrics
No merged PRs in 30d

Description

I'm new to microbit and I want to use it (v2) to read data from a sensor via i2c protocol.

I'm using the Microsoft MakeCode [website](https://makecode.microbit.org/#editor) to program the microbit.
Since I did not see any blocks to initialize and scan i2c connected sensors, I'm using micropython according to the documentation [here](https://microbit-micropython.readthedocs.io/en/stable/i2c.html)

However, there are errors saying that the i2c is unkown and can not find function init(), as depicted in the image below:

![image](https://github.com/user-attachments/assets/9f7ad473-e6b1-4f72-b744-59c1757cf7b1)

What am I missing here?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.