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.
Dependencies: AQM0802A HMC6352 MultiSerial PID Servo mbed
def.h
- Committer:
- lilac0112_1
- Date:
- 2015-01-27
- Revision:
- 1:e3248f278663
File content as of revision 1:e3248f278663:
/*回り込みの計算用*/ #define PI 3.141593/*割と早めにきってある*/ #define SHORT_LEN 15 /*cm換算 楕円のB辺の長さを定義しておく*/ #define ADDRESS_R 0xA0 #define ADDRESS_L 0xC0 /*BusIn sw 入力値*/ #define Calibration 0x01 #define Kicker 0x02 #define Debug1 0x04 #define Debug2 0x08 #define StartS 0x10 #define READ_IR 0x01 //送る物指定 #define READ_PING 0x02 /*Pattern*/ #define Nomal 0 #define TEST 1 #define DEMO 2 /*Ir Boarder*/ #define NEAR 250 #define MID 200 #define FAR 150 /*Servo*/ #define HOME 0.0 #define UNIT 360.0 / 12 #define CORRECTION 11.0 / 9.0 * (-1.0) //補正値 #define ONE (HOME + 1*UNIT)*CORRECTION #define TWO (HOME + 2*UNIT)*CORRECTION #define THREE (HOME + 3*UNIT)*CORRECTION #define FOUR (HOME - 2*UNIT)*CORRECTION #define FIVE (HOME - 1*UNIT)*CORRECTION #define SIX HOME*CORRECTION #define SEVEN (HOME + 1*UNIT)*CORRECTION #define EIGHT (HOME + 2*UNIT)*CORRECTION #define NINE (HOME - 3*UNIT)*CORRECTION #define TEN (HOME - 2*UNIT)*CORRECTION #define ELEVEN (HOME - 1*UNIT)*CORRECTION #define TWELVE HOME*CORRECTION #define F90 +90.0 #define L90 -90.0 #define FIRST 1-1 #define SECOND 2-1 #define THIRD 3-1 #define FOURTH 4-1 #define FIFTH 5-1 #define SIXTH 6-1 #define SEVENTH 7-1 #define EIGHTH 8-1 #define NINTH 9-1 #define TENTH 10-1 #define ELEVENTH 11-1 #define TWELFTH 12-1 //ex.) Servo::position(float degrees) //○ Servo.position(HOME); //× Servo=HOME; //Servo=0.5≡Servo.position(0);