I'm a bit lost. I don't know if I'm doing this right.
Assuming the data capturing and decoding is right (I'm starting to think it may not be).
I'm trying to convert the binary data to dec and spot the patterns. Sadly the sensor doesn't have a screen and I don't have the weather station. So I'm using other sensors to get the readouts.
This is what I have. I am breaking the stream in to 4 bit chunks (4, 8 and 12) put together and converting it to decimal looking for my temp and humidity:
21.2C, 80%
11100010101110101111101111011000000111010100010100000100001001110000110:
0. 1110 14;
1. 0010 2; 11100010 226;
2. 1011 11; 00101011 43; 111000101011 3627;
3. 1010 10; 10111010 186; 001010111010 698;
4. 1111 15; 10101111 175; 101110101111 2991;
5. 1011 11; 11111011 251; 101011111011 2811;
6. 1101 13; 10111101 189; 111110111101 4029;
7. 1000 8; 11011000 216; 101111011000 3032;
8. 0001 1; 10000001 129; 110110000001 3457;
9. 1101 13; 00011101 29; 100000011101 2077;
10. 0100 4; 11010100 212; 000111010100 468;
11. 0101 5; 01000101 69; 110101000101 3397;
12. 0000 0; 01010000 80; 010001010000 1104;
13. 0100 4; 00000100 4; 010100000100 1284;
14. 0010 2; 01000010 66; 000001000010 66;
15. 0111 7; 00100111 39; 010000100111 1063;
16. 0000 0; 01110000 112; 001001110000 624;
11100010101110101111101111010100000111010100010100000100001010110101010:
0. 1110 14;
1. 0010 2; 11100010 226;
2. 1011 11; 00101011 43; 111000101011 3627;
3. 1010 10; 10111010 186; 001010111010 698;
4. 1111 15; 10101111 175; 101110101111 2991;
5. 1011 11; 11111011 251; 101011111011 2811;
6. 1101 13; 10111101 189; 111110111101 4029;
7. 0100 4; 11010100 212; 101111010100 3028;
8. 0001 1; 01000001 65; 110101000001 3393;
9. 1101 13; 00011101 29; 010000011101 1053;
10. 0100 4; 11010100 212; 000111010100 468;
11. 0101 5; 01000101 69; 110101000101 3397;
12. 0000 0; 01010000 80; 010001010000 1104;
13. 0100 4; 00000100 4; 010100000100 1284;
14. 0010 2; 01000010 66; 000001000010 66;
15. 1011 11; 00101011 43; 010000101011 1067;
16. 0101 5; 10110101 181; 001010110101 693;
38.5C, 20%
11100011101100010011100101011110000111000100111011000110101000001010011:
0. 1110 14;
1. 0011 3; 11100011 227;
2. 1011 11; 00111011 59; 111000111011 3643;
3. 0001 1; 10110001 177; 001110110001 945;
4. 0011 3; 00010011 19; 101100010011 2835;
5. 1001 9; 00111001 57; 000100111001 313;
6. 0101 5; 10010101 149; 001110010101 917;
7. 1110 14; 01011110 94; 100101011110 2398;
8. 0001 1; 11100001 225; 010111100001 1505;
9. 1100 12; 00011100 28; 111000011100 3612;
10. 0100 4; 11000100 196; 000111000100 452;
11. 1110 14; 01001110 78; 110001001110 3150;
12. 1100 12; 11101100 236; 010011101100 1260;
13. 0110 6; 11000110 198; 111011000110 3782;
14. 1010 10; 01101010 106; 110001101010 3178;
15. 0000 0; 10100000 160; 011010100000 1696;
16. 1010 10; 00001010 10; 101000001010 2570;
11100010101100010011100011111000000111010100111011000111000001100111111:
0. 1110 14;
1. 0010 2; 11100010 226;
2. 1011 11; 00101011 43; 111000101011 3627;
3. 0001 1; 10110001 177; 001010110001 689;
4. 0011 3; 00010011 19; 101100010011 2835;
5. 1000 8; 00111000 56; 000100111000 312;
6. 1111 15; 10001111 143; 001110001111 911;
7. 1000 8; 11111000 248; 100011111000 2296;
8. 0001 1; 10000001 129; 111110000001 3969;
9. 1101 13; 00011101 29; 100000011101 2077;
10. 0100 4; 11010100 212; 000111010100 468;
11. 1110 14; 01001110 78; 110101001110 3406;
12. 1100 12; 11101100 236; 010011101100 1260;
13. 0111 7; 11000111 199; 111011000111 3783;
14. 0000 0; 01110000 112; 110001110000 3184;
15. 0110 6; 00000110 6; 011100000110 1798;
16. 0111 7; 01100111 103; 000001100111 103;
-6.4C, 80%
11100010101010111111111101001100000111010101010000000000101100100001010:
0. 1110 14;
1. 0010 2; 11100010 226;
2. 1010 10; 00101010 42; 111000101010 3626;
3. 1011 11; 10101011 171; 001010101011 683;
4. 1111 15; 10111111 191; 101010111111 2751;
5. 1111 15; 11111111 255; 101111111111 3071;
6. 0100 4; 11110100 244; 111111110100 4084;
7. 1100 12; 01001100 76; 111101001100 3916;
8. 0001 1; 11000001 193; 010011000001 1217;
9. 1101 13; 00011101 29; 110000011101 3101;
10. 0101 5; 11010101 213; 000111010101 469;
11. 0100 4; 01010100 84; 110101010100 3412;
12. 0000 0; 01000000 64; 010101000000 1344;
13. 0000 0; 00000000 0; 010000000000 1024;
14. 1011 11; 00001011 11; 000000001011 11;
15. 0010 2; 10110010 178; 000010110010 178;
16. 0001 1; 00100001 33; 101100100001 2849;
Any ideas?
@Riva: I'm attaching further "improved" version of your sketch. If you can look pass the styling changes I "needed" there were couple of "serious" issues one with delay(100) being executed every loop() invocation, sync pulse detection was triggered when the pulse was longer than but not "smaller than" so was triggered very often (clearing the previous data - also changed). I've broken the debug LED a bit.
PulseReader.ino (6.13 KB)