CPX I2C in MakeCode

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dogolearn
 
Posts: 25
Joined: Mon Sep 19, 2022 7:14 pm

CPX I2C in MakeCode

Post by dogolearn »

Hi-

I would like to add an I2C display (like adafruit https://www.adafruit.com/product/181 or 292)to my Circuit Playground Express and then program it using MakeCode. Has this been done? Is there some example code we could look at?

I also will want to add a temperature sensor (off-board), so that is another I2C communication we want to work out. If there is a good example we could follow, that would be great.

I've done lots of I2C in Arduino (and frankly, at work in semiconductor labs), but I'm coaching some young kids and we're currently using Make:Code and Circuit Playground Express and the kids are REALLY benefitting from that environment. Such a super idea.

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: CPX I2C in MakeCode

Post by johnpark »

One place to start for i2c devices is the i2c blocks in the Advanced > Pins category in MakeCode.

This forum post explores dealing with an i2c sensor in some detail: https://forum.makecode.com/t/cpx-makeco ... ol/13004/2

This is an example of using an i2c display: https://makecode.adafruit.com/60036-71761-78224-81626

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”