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
#include <Wire.h> | |
#define MPU6050_ACCEL_XOUT_H 0x3B // R | |
#define MPU6050_WHO_AM_I 0x75 // R | |
#define MPU6050_PWR_MGMT_1 0x6B // R/W | |
#define MPU6050_I2C_ADDRESS 0x68 | |
typedef union accel_t_gyro_union{ | |
struct{ | |
uint8_t x_accel_h; |
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
brew cask install google-chrome | |
brew cask install iterm2 | |
brew cask install skype | |
brew cask install todoist | |
brew cask install sequel-pro | |
brew cask install sublime-text | |
brew cask install intellij-idea | |
brew cask install alfred | |
brew cask install 1password | |
brew cask install cinch |
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
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
public class Main { |
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 RECV_PIN 5 | |
#define TIMEOUT_US 30000 | |
#define DETECT_INTERVAL_MS 10000 | |
int recv_data(uint32_t *data) { | |
int count = 0; | |
while (true) { | |
unsigned long pulse = pulseIn(RECV_PIN, HIGH, TIMEOUT_US); | |
if (pulse == 0){ | |
break; |
OlderNewer