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 MyLib by
defines.h
00001 #include "mbed.h" 00002 #define R 0 00003 #define L 1 00004 #define DEBUG 0 00005 #define DEBUG_R 1 00006 #define CALIB 0 00007 #define SetupCMD 'A' 00008 #define Respons 'S' 00009 #define dataNum 12+3 00010 00011 #define NOTINPUT -1 00012 #define LOADMOTION -3 00013 #define TIMEOUT -2 00014 00015 #if !CALIB 00016 //1号機 00017 //uint16_t MinimumRangeR[4] = {4000,40000,53500,16000}; 00018 //uint16_t MaxmumRangeR[4] = {55000,51000,58900,45000}; 00019 //uint16_t MinimumRangeL[4] = {31500,8000,30000,19800}; 00020 //uint16_t MaxmumRangeL[4] = {48000,46400,46200,45000}; 00021 //2号機 00022 00023 uint16_t MinimumRangeR[4] = {11900,32600,52100,0xffff-37800}; 00024 uint16_t MaxmumRangeR[4] = {54500,48000,56000,0xffff-8900}; 00025 uint16_t MinimumRangeL[4] = {62900,11300,37700,14200}; 00026 uint16_t MaxmumRangeL[4] = {45800,56000,27900,44000}; 00027 #endif 00028 #if CALIB 00029 uint16_t MinimumRangeR[4] = {0,0,0,0}; 00030 uint16_t MaxmumRangeR[4] = {0xffff,0xffff,0xffff,0xffff}; 00031 uint16_t MinimumRangeL[4] = {0,0,0,0}; 00032 uint16_t MaxmumRangeL[4] = {0xffff,0xffff,0xffff,0xffff}; 00033 #endif 00034 00035 union floatInByte 00036 { 00037 uint16_t si; 00038 unsigned char c[2]; 00039 }; 00040 #define BIT(n) (1 << n) 00041 union charInBool 00042 { 00043 bool Bool[8]; 00044 uint8_t data; 00045 }; 00046 00047 uint8_t RXData[dataNum] = {'0'}; 00048 Nunchuck ctrl(D4,D5); 00049 int8_t accData[2][3];
Generated on Sun Jul 17 2022 14:24:18 by
 1.7.2
 1.7.2 
    