![](/media/cache/group/11700697_10200701668420946_8214886085951071495_o.jpg.50x50_q85.jpg)
โปรแกรมของบอร์ด Motion
Dependencies: BEAR_Reciever Motor eeprom iSerial mbed
Fork of DogPID by
Diff: main.cpp
- Revision:
- 21:1c04c4afe3b7
- Parent:
- 20:7e6d56655336
- Child:
- 23:999dd41eef14
- Child:
- 24:d4942687f026
--- a/main.cpp Sun Jan 24 09:05:17 2016 +0000 +++ b/main.cpp Tue Jan 26 18:05:51 2016 +0000 @@ -420,9 +420,9 @@ } /*******************************************************/ -void Rc() +inline void Rc() { - //myled =1; + myled =1; uint8_t data_array[30]; uint8_t id; uint8_t ins; @@ -434,18 +434,21 @@ if(status == ANDANTE_ERRBIT_NONE) { CmdCheck((int16_t)id,data_array,ins); } - //myled =0; + } /*******************************************************/ int main() { - //Recieve.attach(&Rc,0.080); + //Recieve.attach(&Rc,0.025); //Start_Up(); SET_UpperPID(); SET_LowerPID(); while(1) { + myled =0; + //wait_ms(10); + ///////////////////////////////////////////////////// start //Set Set_point Up_PID.setSetPoint(Upper_SetPoint); @@ -455,6 +458,10 @@ Move_Upper(); Move_Lower(); ///////////////////////////////////////////////////// stop =306us + //uint8_t aaa[1]={10}; + //com.sendBodyWidth(0x01,aaa); + Rc(); + //wait_ms(1); } }