Decode routine for weather station WT440H or WT450H

Dependencies:   mbed

This piece of software decode Weahter station temperature and humidity freeware, by Lotfi BAGHLI, March, 2013

I hacked the TX WT440H, got 2 wires out (GND and DATA), http://www.upm-marketing.com/products/wd633+wt440h.html

I still want to get the data from a RX one (WS738) or a simple 433 MHz RX but signal pbs not yet solved In fact, from the builtin RX of the Weather station, it is ok, but from the external RX, the range is very small : 20 cm :-(

thanks to Jaakko Ala-Paavola, http://ala-paavola.fi/jaakko/doku.php?id=wt450h

for the protocol and decode routine

Connect 2 wires to the MBED : GND and Data Signal to p18

Temperature and Humidity are displayed on the Serial via USB of the MBED /media/uploads/lotfi_baghli/protocol_wt440.png

main.cpp

Committer:
lotfi_baghli
Date:
2013-03-30
Revision:
2:5a073ef49b21
Parent:
1:a9798dd70dbf
Child:
3:cd558875d654

File content as of revision 2:5a073ef49b21:

#include "mbed.h"

DigitalOut myled(LED1);
DigitalOut led2(LED2);
DigitalIn Rx433(p20);
Serial pc(USBTX, USBRX);
Ticker T1;

unsigned int i;
 
void T1Interrupt() {
    //myled = 1- myled;
    i++;
    if ((i&1)==1) myled = 1;
        else myled = 0;
}

int main() {
    i=0;
    pc.baud(115200);
//    T1.attach_us(&T1Interrupt,500000); // setup T1 interrupt
    T1.attach(&T1Interrupt,2.0); // setup T1 interrupt
    while(1) {
        led2 = !led2;
        wait(0.5);
        
//        i=(Rx433==1);
//        pc.printf("rx= %d ", i);
        pc.printf("%d", i);
//        i++;
    }
}