mecha

Dependents:   2019NHK_A_manual_red 2019NHK_A_manual_red 2019NHK_A_manual_blue

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers towelest.h Source File

towelest.h

00001 #ifndef TOWELEST_H
00002 #define TOWELEST_H
00003 
00004 #include "mbed.h"
00005 #include "ikarashiMDC.h"
00006 #include "PID.h"
00007 #include "pinconfig_main.h"
00008 
00009 const int RS485_BAUD = 115200;
00010 
00011 class towelest 
00012 {
00013 public:
00014     towelest(Serial* RS485,int address,PinName Limit0); 
00015     void open();                 //展開
00016     void close();                //!展開
00017     void setPoint(int target);   //pid目標値
00018     void setPulse(int Loli);     //毎ループで呼び出し
00019     void pid_compute();          //毎ループで呼び出し
00020     void allstop();
00021 private:
00022     ikarashiMDC **Motor;
00023     PID pid;
00024     DigitalIn LimitSW0;
00025     Timer timer;
00026     float compute;
00027     float time;
00028     int Loli,loli,addres,target;
00029 };
00030 #endif