Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

How to add external sensor to CPX in makecode?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How to add external sensor to CPX in makecode?

by Mathpun on Mon Feb 17, 2020 1:52 am

Hello! I am trying to add a neopixel strip (working) and a flora color sensor to my CPX -- I know the CPX has a built in color sensor BUT I want the sensor to be in another place from my CPX -- so how can I add a sensor in makecode to the CPX? I have a feeling it has to do with add a pin but no clue ---

this guy (https://www.youtube.com/watch?v=tynax9kGSx4) add a servo and a light strip but since the light sensor is neither of those I wasnt sure how to do it :(

the flora color sensor is connect to the CPX in the following places: GND, SCL, SDA, 3.3V --- so which one is the pin that I would use??

Basically what are the block codes to add this sensor -- I know how to get a color sensor readings and display it on my neopixel strip with the built-in sensor and just trying to use readings from an external sensor -- thanks!!

Mathpun
 
Posts: 43
Joined: Mon Feb 19, 2018 1:35 pm

Re: How to add external sensor to CPX in makecode?

by johnpark on Mon Feb 17, 2020 12:43 pm

That sensor uses I2C to communicate, so in MakeCode you'd be looking at the Advanced > Pins > I2C blocks. I haven't tried this, so I'm not sure exactly how you specify the data (SDA) and clock (SCL) connections. I'll try to get this working and post my results.

johnpark
 
Posts: 764
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.