Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ADS1015 USBDevice MCP4725
Revision 7:cdd74b6e2595, committed 2014-05-08
- Comitter:
- jamesdem1123
- Date:
- Thu May 08 01:50:11 2014 +0000
- Parent:
- 6:7691e36d2337
- Commit message:
- fix zac
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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);