diff --git a/FC_InferfaceBoard/Analog_Out.ino b/FC_InferfaceBoard/Analog_Out.ino index 32f3d6b..30a4895 100644 --- a/FC_InferfaceBoard/Analog_Out.ino +++ b/FC_InferfaceBoard/Analog_Out.ino @@ -1,4 +1,4 @@ -String AO_setup(int i, int Rng) { +void AO_setup(int i, int Rng) { DFRobot_GP8403 AO; bool needBegin = true; @@ -38,9 +38,9 @@ String AO_setup(int i, int Rng) { } if(needBegin){ // If not begin yet - Serial.println("AO_0 init begin"); + Serial.println("AO init begin"); while(AO.begin()!=0); - Serial.println("AO_0 init succeed"); + Serial.println("AO init succeed"); AO.setDACOutVoltage(0, 0); AO.setDACOutVoltage(0, 1); delay(20); @@ -54,9 +54,10 @@ String AO_setup(int i, int Rng) { } } RngAO[i] = Rng; + Serial.println("AO FIN"); } -String AO_Write(int i, int volt) { +void AO_Write(int i, int volt) { DFRobot_GP8403 AO; int ch; diff --git a/FC_InferfaceBoard/FC_InferfaceBoard.ino b/FC_InferfaceBoard/FC_InferfaceBoard.ino index 62fb291..12a8e54 100644 --- a/FC_InferfaceBoard/FC_InferfaceBoard.ino +++ b/FC_InferfaceBoard/FC_InferfaceBoard.ino @@ -63,7 +63,7 @@ DFRobot_GP8403 AO_10(&Wire,0x5D); DFRobot_GP8403 AO_12(&Wire,0x5E); DFRobot_GP8403 AO_14(&Wire,0x5F); -int voltOffset = 185; +int voltOffset = 0;//185; int RngAO[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // ========== ========== Processing diff --git a/FC_InferfaceBoard/Processes.ino b/FC_InferfaceBoard/Processes.ino index aa89f1f..58ea9d7 100644 --- a/FC_InferfaceBoard/Processes.ino +++ b/FC_InferfaceBoard/Processes.ino @@ -201,4 +201,15 @@ String Prcss_RngAO(unsigned int data[], int dataSize){ } str += RcvOK; return str + FIN; +} + +String Prcss_ChMC9(unsigned int data[], int dataSize){ + String str = "ChMC9!:"; + int d = 2; + for(int i=0 ; i