0

Gemma MakeCode -- Use DotStar as Onboard Light Sensor?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Gemma MakeCode -- Use DotStar as Onboard Light Sensor?

by KathyCeceri on Fri Oct 30, 2020 12:40 pm

I know an LED can be used as a light sensor, and the Gemma M0 has an onboard DotStar RGB light. The MakeCode Maker extensions include an onboard light sensor menu. So I'm wondering if the onboard DotStar can be used as a light sensor. I couldn't find any Learning Guides that use it that way. Thanks!

KathyCeceri
 
Posts: 45
Joined: Sun Mar 02, 2014 7:30 pm

Re: Gemma MakeCode -- Use DotStar as Onboard Light Sensor?

by adafruit_support_bill on Fri Oct 30, 2020 1:22 pm

Unfortunately, no. The Dotstar pixels have their own built-in drivers and the control interface allows you to send commands to control the red, blue and green channels. It does not give you direct analog access to the actual photodiodes.

adafruit_support_bill
 
Posts: 81544
Joined: Sat Feb 07, 2009 10:11 am

Re: Gemma MakeCode -- Use DotStar as Onboard Light Sensor?

by KathyCeceri on Fri Oct 30, 2020 1:45 pm

Thank you. I just realized there's also a red indicator LED on the board. I'm guessing that would not work either?

KathyCeceri
 
Posts: 45
Joined: Sun Mar 02, 2014 7:30 pm

Re: Gemma MakeCode -- Use DotStar as Onboard Light Sensor?

by adafruit_support_bill on Fri Oct 30, 2020 2:47 pm

The LED is connected to D13 which is a digital pin. To use a LED as a light sensor, you would need to connect it to pin with analog input capability such as pins A0, A1 or A2.

adafruit_support_bill
 
Posts: 81544
Joined: Sat Feb 07, 2009 10:11 am

Re: Gemma MakeCode -- Use DotStar as Onboard Light Sensor?

by KathyCeceri on Fri Oct 30, 2020 7:57 pm

Thanks for explaining. Doesn't look like it will work for the project I'm doing with my students. Next time I'll budget for Micro:bits, if we can't swing CPX!

KathyCeceri
 
Posts: 45
Joined: Sun Mar 02, 2014 7:30 pm

Please be positive and constructive with your questions and comments.