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.
Fork of petbottle_Loading by
petbottleLoading.h
00001 #ifndef PETBOTTLE_LOADING_H 00002 #define PETBOTTLE_LOADING_H 00003 #include "ikarashiMDC.h" 00004 #include "PID.h" 00005 #include "QEI.h" 00006 #include"pin_config.h" 00007 00008 #define loadingKP 30.0 00009 #define loadingKI 0.0 00010 #define loadingKD 0.0 00011 #define RATE 0.01 00012 00013 00014 /** 00015 * 装填・発射機構用クラス 00016 */ 00017 class petbottleLoading 00018 { 00019 public: 00020 /** 00021 * デフォルトコンストラクタ 00022 */ 00023 petbottleLoading(); 00024 00025 /** 00026 * 00027 * @0:最初の位置 00028 * @1:発射機構1まで移動モード 00029 * @2:発射機構2まで移動モード 00030 * @3:装填して原点に戻りボトルを落とすモード 00031 */ 00032 void petbottlemode(int loadingmode); 00033 00034 /** 00035 *装填機構状態表示 00036 * @0 : 装填中~~ 00037 * @1 : 装填完了! 00038 */ 00039 int state(); 00040 00041 int LoadingEncoder(); 00042 00043 void limit_sw(); 00044 00045 private: 00046 /*装填機構*/ 00047 void loadingasenble(); 00048 ikarashiMDC* petbottledrop; 00049 ikarashiMDC* petbotleslider; 00050 ikarashiMDC* petbottleIn; 00051 Serial RS485; 00052 DigitalOut RS485control; 00053 00054 double petbottledropPwm, petbotlesliderPwm, petbottleInPwm; 00055 PID loadingPid; 00056 QEI loadingencoder; 00057 InterruptIn limitSW1_,limitSW2_,limitSW3_; 00058 int limitSW1,limitSW2,limitSW3; 00059 bool limitSwFlag[3],limitSwFlag2[3], limitStatus[3]; 00060 int nowPals, loadingDistance, pullDistanceOfset; 00061 double Output_PID; 00062 int loadingmode; 00063 bool sw5flag; 00064 00065 /*受信系*/ 00066 bool receiveSuccessed; 00067 // Serial debug; 00068 Timer pt; 00069 float pdt; 00070 00071 00072 }; 00073 00074 00075 00076 #endif
Generated on Sat Jul 23 2022 17:35:49 by
1.7.2
