Go Down

Topic: Temp, Humidity CO2 sensor and library. (Read 51 times) previous topic - next topic

34R7

Dankuwel, Rob Tillaart!

I just ordered a logic converter, I'll let you know what's the outcome!

Cheers!

vespapierre

Hi,
I have tried DirtGambit's library, tried all the possibilities ( 5v, pins, and so on ) what can be found here, but the same problem:
Code: [Select]
Celcius : 0.00
Fahrenheit : 32.00
Humidity : 0.00
CO2 : 0
Digital Filter : 0

I am trying this with Mega board...

Maybe there is a problem with the sofwareserial...? When using sim900 shield, there was a hwserial lib instead of the swserial...
Do you have any idea?
It would be great to make it work on mega...

vespapierre

#47
Jul 07, 2014, 11:29 pm Last Edit: Jul 08, 2014, 08:06 am by vespapierre Reason: 1
Dear All,

I have found the solution to use this sensor with mega 2560!
As Softwareserial notes:
"Note:
Not all pins on the Mega and Mega 2560 support change interrupts,
so only the following can be used for RX:
10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69"

So let's connect the RX pin of the sensor to mega pin 51, and TX pin of the sensor to mega pin 50 and use DirtGambit's sketch with modification:

Code: [Select]
SoftwareSerial nss(50,51); // TX and RX pins

And smile when you realise this is working fine after calibration!

34R7


Thanks, vespapierre! Works like a charm now!

vespapierre

Happy to hear that!!! Great!
Note: if you are using MEGA 2560 board, and you are using ICSP pins ( for example wiznet shield ), than do not use 50 - 51 pins, because ICSP using in this case 50-51-52 pins. So in case try using other pins from the availables( for example 11-12).
Usually pin10 is wiznet, pin4 is sd, pin13 is onboard led on mega...
Anyway I do not know what and where is 62, 63, 64, 65, 66, 67, 68, 69  ...  :~

34R7


Anyway I do not know what and where is 62, 63, 64, 65, 66, 67, 68, 69  ...  :~

Pin 54 is A0, so pin 62 is A8, 63 is A9, 64 is A10...  I just tried out A8-A9, and it works perfectly!
Hope thIS gives you some more options.

vespapierre

aaah thanks! I am testing on pins 11-12. works also perfect :)

tartak00

Hello All. New to this forum and arduino so im at a loss for what im doing wrong.

I've used the new code/re calibration last listed to yield positive CO2 readings, yet my humidity and temperature readings are all 0. Is this an error within the sensor or my doing?

hector915

Hi everybody , Recently I've got the cozir wide range



I just read the datasheet and the process  to do the calibration part is the same I've used the library provided by
DirtGambit and robtillaart  ,my doubt is about this process we need to calibrate the sensor each time I turn on the arduino device or I do need to recalibrate the sensor ?

Thanks for your support.

Hector

roder

I've used the library provided by
DirtGambit and robtillaart 
Where are these libraries available?  They do not seem to be attached to this thread. :(

ajaved200

Hi, I have the same issue as roder have.. I can not find the library cozir.h attached with the post

ajaved200

yes.
the lib is attached on the first post (it includes the .h file)
Dear robtillaart,
I can not find the cozir.h file attached with the first post. Could you please guide me how can I download this file.

Regards,
Abbas

robtillaart

I have to search for the latest version I have, 
"I'll be back"
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

robtillaart

Attached my latest cozir 0.1.03 lib version. There is a sketch included which compiles.
Disclaimer: I still do not have such sensor so I cannot test it in real life ...

@DirtGambit
Is it OK to include this library in my Github repo?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

ajaved200

Thanks a lot Rob for the file.
I tried to run it but on monitor nothing is displaying. I am using 1.0.5 version. May be its compatibility issue ?

Go Up