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 "AQM0802BigDigit.h" | |
//----- I2C interface ----- | |
void AQM0802BigDigit::WriteCommand(uint8_t data) | |
{ | |
Wire.beginTransmission(0x3E); | |
Wire.write(0x00); | |
Wire.write(data); | |
Wire.endTransmission(true); | |
} |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include "bme280Interface.cpp" | |
int main() | |
{ | |
BME280Interface bme280; | |
if (bme280.measurement() == -1) | |
{ |
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<wiringPiI2C.h> | |
class BME280Interface | |
{ | |
public: | |
static const int devID = 0x76; | |
private: | |
int fd; | |
static const unsigned char osrs_t = 1; //Temperature oversampling x 1 | |
static const unsigned char osrs_p = 1; //Pressure oversampling x 1 |
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
#coding: utf-8 | |
import smbus | |
import time | |
bus_number = 1 | |
i2c_address = 0x72 | |
bus = smbus.SMBus(bus_number) |
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
/* | |
* I2C SensorHub Ver1.0 | |
* created 18 Sep. 2015 | |
* function: | |
* communicate to AD converter(A0,A1,A2,and A3 port) on Aruduino UNO via I2C bus. | |
* based on SUMBus protocol (almost, uncertain) | |
* Editor : PiT | |
* 07 Oct. 2015 V1.1 A0_MSB,A0_LSB,..A3_MSB,A3_LSBをReadOnlyに変更 | |
* 07 Oct. 2015 V1.0.1 コメント:レジスタマップの間違いを修正 | |
* 01 Oct. 2015 V1.0 release |