Skip to content

Commit

Permalink
esp8266とlpc113が頻繁にI2C通信に失敗していたため、デフォルトの通信速度を100kbpsに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
baba-r committed Oct 31, 2019
1 parent 85ad0f2 commit b4d01fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions VS-RC202/vs-rc202.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define WIRE_CLK 400000 //I2C clock 400kHz
#define WIRE_CLK 100000 //I2C clock 100kHz
#define DEV_ADDR 0x50 //Device address

//Register address
Expand Down Expand Up @@ -96,7 +96,7 @@
#define BUZZER_SCALE 0x83

#define SENS_NUM 3 //Number of sensor
#define SV_LIMIT_MIN -2500
#define SV_LIMIT_MIN -2500
#define SV_LIMIT_MAX 2500
#define OFFSET_LIMIT 500
#define SV_NUM 10 //Number of servo
Expand All @@ -106,7 +106,7 @@
#define LED_LIMIT 1000
#define MODE_OVERRIDE 0x00
#define MODE_SEQUENCE 0x01
#define SV_FLAG 0x01
#define SV_FLAG 0x01
#define TRIG 14 //SONIC trig pin
#define ECHO 12 //SONIC echo pin

Expand Down Expand Up @@ -257,4 +257,3 @@ int read2byte(unsigned char addr);
int read1byte(unsigned char addr);
int write2byte(unsigned char addr, short data);
int write1byte(unsigned char addr, unsigned char data);

0 comments on commit b4d01fc

Please sign in to comment.