Skip to content

Instantly share code, notes, and snippets.

#include <SoftwareSerial.h>
// 2:RX,3:TXでシリアル通信する宣言
SoftwareSerial mySerial(2, 3);
long int Tido = 35431721;
long int Tkeido = 139317210;
String inputString = "";
String Data[16];
#!/usr/bin/python
import sys
import smbus
import time
import math
import datetime
bus = smbus.SMBus(1)
address = 0x1e
#!/usr/bin/python
import sys
import smbus
import math
import time
import datetime
# Power management registers
power_mgmt_1 = 0x6b
#!/usr/bin/python
import sys
import serial
import time
import datetime
ser=serial.Serial("/dev/ttyAMA0",9600)
start = datetime.datetime.now()