Help for a newbie, Particle Photon project for smoke detector MQ-2 + temperature and Humidity AM3202

Hi to all!
I’m Marco from Italy.
I bought a Particle photon, a smoke sensor MQ-2 and temperature+humidity sensor AM3202 (DHT22).
I’d like to build a smoke detector for my 3d printer and receive via IFTTT a mail or a push notification once if it reveal a smoke during printing when i’m out of my home. In that case once i receive a message i can switch off the power of my 3D printer. For the temperature sensor i only want to check the temperature.
What i’m looking for is a wiring scheme and a code to insert in the particle IDE.
Really i’m very new to electronic so i ask to someone if can give me a hand.
i will appreciate very much.
Sorry for my english
Thanks again
Regards

It’s unlikely someone is going to hand you the finished code, unless you hire them. That said, most of the code is already available in various projects. You’ll just have to find them and ‘glue’ them together to make it fulfill your exact use-case.
There are libraries for both sensors, as well as examples for push notifications, so it shouldn’t be too hard. Give the search button a shot and see how far you get. Let us know when you run into a specific issue so we can assist with that, rather than trying to explain everything.

2 Likes

Ok thanks, i will try and i let you know if i need further help

You might have more luck finding libraries for the AM3202 when you look for it’s other name DHT22 (or just DHT or even PietteTech_DHT which is a well accepted library for that sensor)

Well , now i have found two project: the first for smoke detector http://www.instructables.com/id/WiFi-Smoke-Detector/ and the second for Temperature monitor with Blynk https://www.hackster.io/gusgonnet/temperature-humidity-monitor-with-blynk-7faa51.
Both project working for me as separate project but i want to mix them in the firmware
i tried to mix the two project (just copy and past the second project on the first) but i found 2 errors in the IDE when i try to compile the firmware ( void setup() and void.loop()
Here the firmware:

One rule of thumb: Don’t ever say this without also providing the actual error messages and the actual code that produced it (an screenshots are not considered showing your code) :wink:

We do have some real code wizzards on this forum, but I haven’t yet found one who also had the gift to mind read and/or remote heal any member’s code :sunglasses:

BTW, for frizzing diagrams, try to use consistent color coding for your wires (e.g. red for +Vcc, black or blue for GND, if you use a second power rail with different voltage orange for that, don’t reuse colors for different things, …)
This makes understanding your schema just that more easy for others and it’s especially “bad” to break conventions like using blue (commonly used of GND) for Vcc which is commonly drawn red. That just immediately triggers alarm whistles and bells for people used to these conventions.

Ok ok don’t be angry! I think this community is not for me because i’m really a newbie… however other communities like 3D printer (Original Prusa reserch) are reaaly different from this one, everyone would help you without saying nothing about what you told me. They help you and nothing else!!!
Good bye

Noone is angry - hence the emojis

@MarcoZ76, this community is renowned for helping! However, to learn you really need to try stuff and come back for guidance and then try a few more things. @ScruffR isn’t angry, he’s ridiculously committed to helping folks on this forum. Be patient, take it step by step and you’ll get there. Trust me when I say this IS for you but not if you don’t want to do some work (which I don’t suspect is the case). :slight_smile:

3 Likes


This could be a good starting point for you, MarcoZ76.
You say “sorry” for your English - are you German?

Thanks Postler, i’m italian.
However i solved my problem using only the smoke sensor withouth temperature sensor, so i just followed a project that worked well for my use.
Thanks anyway for your links
Regards

You may want to look at our Water Leak Sensor project, at:

This project uses a water level sensor that provides an analog signal to the photon and also a DHT11 (similar to DHT22 but cheaper and not as accurate) for temperature and humidity readings. The Photon code uses the Piettetech library that supports both types of temperature/humidity sensors. The project uses Blynk for an app that provides alarm notification for leak events as well as a nice display of temperature, humidity and alarm condition on the app. I imagine that your gas sensor would be used in an analogous way to our water level sensors.