足回り動かすためのライブラリ

使用例

#include "scrp_slave.hpp"
#include "core.hpp"

#include "mbed.h"

ScrpSlave sendpwm(PC_12,PD_2 ,PH_1 ,SERIAL_TX,SERIAL_RX,0x0807f800);
Robot AKASHIKOSEN(50.8,25.4,322.5,259.75);
Core RBT(&AKASHIKOSEN,OMNI4,0.02);

int main(){

/*--------------SETUP--------------*/
AKASHIKOSEN.setCWID(0,1,2,3);
AKASHIKOSEN.setSWID(4,5,6,7);
    
RBT.addENC(PC_4,PA_13,512,4,0);
RBT.addENC(PA_14,PA_15,512,4,1);
RBT.addENC(PC_2,PC_3,512,4,2);
RBT.addENC(PC_10,PC_11,512,4,3);
RBT.addENC(PA_7,PA_6,512,4,4);
RBT.addENC(PA_9,PA_8,512,4,5);
RBT.addENC(PC_1,PC_0,512,4,6);
RBT.addENC(PC_5,PA_12,512,4,7);

RBT.START();
/*--------------LOOP--------------*/
Position pos;
while(true){
    pos = RBT.getStatus();
    printf("x:%lf,y:%lf,theta:%lf\n",pos.x,pos.y,pos.theta);
    RBT.LOOP();
}
}

History

asd default tip

2021-10-29, by hamohamo [Fri, 29 Oct 2021 09:20:31 +0000] rev 11

asd


asd

2021-10-28, by hamohamo [Thu, 28 Oct 2021 10:58:56 +0000] rev 10

asd


ads

2021-10-26, by hamohamo [Tue, 26 Oct 2021 15:55:15 +0000] rev 9

ads


asd

2021-10-22, by hamohamo [Fri, 22 Oct 2021 09:41:23 +0000] rev 8

asd


asd

2021-10-22, by hamohamo [Fri, 22 Oct 2021 07:44:53 +0000] rev 7

asd


lkn

2021-10-21, by hamohamo [Thu, 21 Oct 2021 16:16:01 +0000] rev 6

lkn


hkh;

2021-10-18, by hamohamo [Mon, 18 Oct 2021 08:15:39 +0000] rev 5

hkh;


sad

2021-10-13, by hamohamo [Wed, 13 Oct 2021 10:00:55 +0000] rev 4

sad


pe

2021-10-13, by hamohamo [Wed, 13 Oct 2021 08:47:03 +0000] rev 3

pe


pepepe;

2021-10-13, by hamohamo [Wed, 13 Oct 2021 08:12:34 +0000] rev 2

pepepe;