Huzzah Analog pin


#1

Anyone know how to specify a luminosity sensor on Analog pin A on a huzzah?


#2

Hello,
It should be like an Arduino:

int lumens = analogRead(A0);

From the site of the adafruit: This pin has a ~1.0V maximum voltage, so if you have an analog voltage you want to read that is higher, it will have to be divided down to 0 - 1.0V range


#3

Thanks for the 1v max reminder. I may have damaged it already, I’ll try another board.


#4

So sad. :frowning:


#5

I’m pretty sure I’ve fed in more than 1v (less than 3.3v) on this pin and it was fine, just didn’t read anything over 1v. I would recommend trying less than 1v to verify it will works.


#6

I had the digital read in the wrong place. Needs to be inside the particular Cayenne Out ().