Adafruit tft screen and Big sound sensor

I have two questions, Its kinda restricted to post on this site and also restrictions for replying.

My questions here is.

  1. how to get this work. I had good convo, but it got cut off because to manye replies for a day (limit 18).

There is an alternative SPI interface on the Photon
image
But for that you’d need to modify the library to use SPI1 instead of SPI and re-direct RST, DC and CS too.

e.g.

MOSI -> D2
SCK  -> D4
CS   -> D5 
DC   -> D6
RST  -> D7

Ideally the library would provide a constructor that also allows to pass in the SPI interface to use in order to keep it portable. But for the time being you’d just hard code SPI1

2.How can i use D0 to detect sound??? i tried with a led to test it, but the led was always on.
and i only got 228 as serial output.

Thanks for help.

I cannot see a any restrictions on your account.
Unfortunately you had some “double posts” that triggered the system to flag some of your posts and I think you also flagged one of your posts and the number of flags received in a short period may have temporarily silenced your account.
When you want to change a post you’ve already made, you can use the image instead of creating a new post - that may also prevent running into the max posts per day limit for new users.

How did you wire your sound sensor and where does the 228 come from?
We’d need to see that code too :wink:

Have you tried adjusting the trigger level for the sensor via the potentiometer?

@ScruffR

Thank you, i will try to remeber that and practise it :slight_smile:

I managed to make the souns work :smiley:

But do i need to use the analogs pins? or D pins? I want a scream to make led light up.

It works, but i med to be very close to the mic to make it work. All my analogs pins is used for the screen now.

To move the screen from SPI toSPI1 you just need to replace all occurances of SPI. in the library to SPI1. :wink:

Depending on your sensor some variants have both an analog and a digital output.
While the threshold for the digital one is set via the potentiometer to go from LOW to HIGH at a set loudness the analog will give a voltage proportional to the loudness.

However, when using analog pins you must make sure that the signal never exceeds 3.3V to avoid damaging the ADC on that pin.

Thank you!

Regarding the sound sensor. This is the one I am using:

If i use the D0 pin, will it be okay to use more than 3.3 voltage ?

Cause i tried to increase or decrease the sensitivity, but that dosent work. I have to adjust it all the time.

Can use of multiple use of sensors disturb eachother?

On the Photon all (except A3 and A6/DAC) GPIO pins are 5V tolerant.
You should just not have internal pull-resistors enabled or using ADC (aka analogRead()) on the pin.

Shouldn't

Is it possible to show me some examples? Cause right now i have to tap on the mic to make the led go on. :frowning:

I haven’t got such a sensor at hand so I cannot really provide you with specifics or how good that sensor would be suited for what you are intending to do.

However, when you set the pin mode via pinMode(yourPin, INPUT) you won’t have any internal pull resistors attached and when you use digitalRead() and not analogRead() you should be safe even with a 5V signal.

If you want to use analogRead() you may want to either use a voltage divider to bring the 5V signal into the 3.3V range or use a 3.3V Zener Diode to cut off any access voltage.

Thank you!

It got better with giving it a 5V signal. This sound sesnor is not good. a cheap one :frowning:

When you say i can use analogRead(). Will that mean i can use a D pin on the photon as an A pin?

Nope, analogRead() can only be used with A pins.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.