![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
IGGE Power board
Dependencies: mbed ADS1015 USBDevice MCP4725
Diff: main.cpp
- Revision:
- 7:cdd74b6e2595
- Parent:
- 6:7691e36d2337
--- a/main.cpp Thu May 01 00:11:28 2014 +0000 +++ b/main.cpp Thu May 08 01:50:11 2014 +0000 @@ -87,10 +87,12 @@ if(can2.write(CANMessage(ID, counter, 8))) { // printf("Message sent: %x%x\r\n", counter[1],counter[0]); - // printf("Should be: %d, %d, %d, %d\r\n", int1,int2,int3,int4); - led2=0; + // printf("Should be: %d, %d, %d, %d\r\n", int1,int2,int3,int4);"); + led1=0; } - led1=0; + else + printf("CAN ERROR"); + } @@ -204,7 +206,7 @@ printf("CANBUS TRANMISSION COMPLETE\r\n"); printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"); //relNet=!relNet; - relSens= !relSens; + // relSens= !relSens; //relCpuPower=!relCpuPower; @@ -217,12 +219,12 @@ sending_values(powerArr[0],powerArr[1],powerArr[2],powerArr[3],1); sending_values(powerArr[4],powerArr[5],powerArr[6],powerArr[7],2); sending_values(powerArr[8],powerArr[9],0,0,3); - relNet=!relNet; - relSens= !relSens; + // relNet=!relNet; + //relSens= !relSens; - relCpuPower=!relCpuPower; - relCpuRst =!relCpuRst; - relUsr=!relUsr; + //relCpuPower=!relCpuPower; + //relCpuRst =!relCpuRst; + // relUsr=!relUsr; #endif } @@ -233,7 +235,7 @@ { graph.attach(&sendArray, (1)); //update array every 10 seconds - + can2.frequency(500000); //initialize relays relSens= 0; @@ -241,8 +243,10 @@ relCpuPower=0; relCpuRst =0; relUsr=0; - - +wait(3); +sending_values(1,1,1,1,4); +wait(.01); +sending_values(0,0,0,0,4);