Created
May 29, 2017 00:54
-
-
Save takehaya/a6093e1ff2a00156a8f933aaf849b6d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// デバッグ設定 | |
#define DEBUG // 有効にするとシリアル出力が有効になります。 | |
#ifdef DEBUG | |
#define Serialbegin Serial.begin | |
#define Serialprint Serial.print | |
#define Serialprintln Serial.println | |
#else | |
#define Serialbegin | |
#define Serialprint | |
#define Serialprintln | |
#endif | |
//制御 | |
#define DC_MOTER_IN1_1 15 | |
#define DC_MOTER_IN1_2 14 | |
#define SERVO_IN 13 | |
#define LED_Light 2 | |
// I2Cアドレス | |
#define DRV_ADR 0x64 // DRV8830のI2Cアドレス | |
#define CTR_ADR 0x00 // CONTROLレジスタのサブアドレス | |
#define FLT_ADR 0x01 // FAULTレジスタのアドレス | |
#define DC_MOTER_IN1_SDA 5 | |
#define DC_MOTER_IN1_SCL 14 | |
// ブリッジ制御 | |
#define M_STANBY B00 // スタンバイ | |
#define M_REVERSE B01 // 逆転 | |
#define M_NORMAL B10 // 正転 | |
#define M_BRAKE B11 // ブレーキ | |
// 電圧定義 | |
//#define MAX_VSET 0x15 // 1.69V 行ける | |
#define MAX_VSET 0x1A // 2V 制御無理 | |
//#define MAX_VSET 0x26 // 3.05V 制御無理 | |
#define MIN_VSET 0x09 // 0.72V | |
//ssid,pass | |
const char ssid[] = "ESPCar"; | |
const char pass[] = "ESP8266ap"; | |
//////////////// ipaddress //////////////// | |
// the IP address for the shield: | |
IPAddress ip(192, 168, 7, 101); | |
//IPAddress gateway(192, 168, 7, 101); | |
//IPAddress subnet(255, 255, 255, 0); | |
const unsigned int localPort = 30000;//port設定 | |
const int OSC_PACKET_SIZE = 256;//パケットサイズ | |
char packetBuffer[OSC_PACKET_SIZE];//パケットバッファ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment