Skip to content

Instantly share code, notes, and snippets.

View hatone's full-sized avatar
🦋
Think deep, work hard.

Takako Ohshima hatone

🦋
Think deep, work hard.
View GitHub Profile
#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;
@hatone
hatone / gist:8fa109b00189ff213231
Last active December 6, 2015 04:23
brew cask
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
@hatone
hatone / test.java
Created November 12, 2016 02:57
Word Count Engine
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 {
@hatone
hatone / recv_weight.ino
Created September 19, 2017 03:25
recv_weight.ino
#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;