i2c slave program

Dependencies:   mbed

Revision:
0:ad4485166cfe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/slave.h	Mon Jun 30 11:59:30 2014 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+I2CSlave slave(p28,p27);                       //configuring pins p27, p28 as I2Cslave
+Serial pc (USBTX,USBRX);
+void split(float);                             //function to split 4 bcurrentte data
+void write_to_master(char);                    //function to write data to master
+void FUNC_I2C_SLAVE_MAIN()
+
+struct SensorData                              //HK_data_structure
+{
+    float voltage[10];
+    float current[10];
+    float temp[10];
+    //float Battery[2];
+} Sensor;