Pages: 1 2 [3]   Go Down
Author Topic: pulseIn Bug  (Read 4758 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1893
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

westfw
Quote
So is this "resolved" in the sense that the changed behavior is now understood?

Yes it is resolved in the sense that the change is understood.

Quote
If it's understood, is it believed to be a good change that happens to break this person's apps
.
Depends on your point of view. I think the 2 previous posts explain this in depth.

Quote
or a bad changed that has caused a real bug?
I don't think anyone would call it a real bug. Think about it like upgrading your car. You may be happy that you can transport more but you can be sad you can't cross the smallest bridges anymore.

Best regards
Jantje

Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have some sort the same problem:

I have a temperature and humidity sensor with following protocol:
2 bytes for humidity, 2 bytes for temperature and 1 byte for checksum
25us puls is 0, 60us puls is 1 and there is 40us timeout between pulses.

With Arduino IDE 1.0 i get just 20 bits (every secound bit) but with Arduino IDE 0018 it works just fine.

What do you suggest me to do?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13477
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have some sort the same problem:

I have a temperature and humidity sensor with following protocol:
2 bytes for humidity, 2 bytes for temperature and 1 byte for checksum
25us puls is 0, 60us puls is 1 and there is 40us timeout between pulses.

With Arduino IDE 1.0 i get just 20 bits (every secound bit) but with Arduino IDE 0018 it works just fine.

What do you suggest me to do?

First start a thread for your own problem as your problem is different from the OP.

Second, PulseIn() is for detecting and measuring one pulse, it is not for reading a pulse-train. Then you get exactly the effect you are talking about. If your sensor is (looks like) a DHT11 or DHT22 you can use this lib - http://arduino.cc/playground/Main/DHTLib - as it does (almost) exactly what you need

Hope this helps
Logged

Rob Tillaart

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

Pages: 1 2 [3]   Go Up
Jump to: