tes ir atas semua

Dependencies:   mbed ADS1115 StepperMotor SRF05 TPA81new

main.cpp

Committer:
hisyamfs
Date:
2019-01-17
Revision:
15:da7a15289893
Parent:
14:207770fefedf
Child:
16:771d84a80e3d

File content as of revision 15:da7a15289893:

#include "mbed.h"
#include "TPA81new.h"

Serial pc(USBTX,USBRX);
TPA81 tpax(PB_9, PB_8, 0xDC);
TPA81 tpay(PB_3, PB_10, 0xDE);

int main()
{
    //tpax.changeaddress(0xDC,0xDE);
    while(1) {
        pc.printf("%d", tpay.getTemp(0));
        int i;
        pc.printf("\nTPA Y \n");
        tpay.Read();
        for (i=2; i<=9; i++) {
            pc.printf("%d ",tpay.getTemp(i));
        }

        pc.printf("\nTPA X \n");
        tpax.Read();
        for (i=2; i<=9; i++) {
            pc.printf("%d ",tpax.getTemp(i));
        }
        pc.printf("\n");


        wait(0.5); // 200 ms


    }
}