Skip to content

Instantly share code, notes, and snippets.

@TakehikoShimojima
Created July 19, 2018 08:46
Show Gist options
  • Select an option

  • Save TakehikoShimojima/174a4eb73b6875ab2e56b5a6d0e49b8c to your computer and use it in GitHub Desktop.

Select an option

Save TakehikoShimojima/174a4eb73b6875ab2e56b5a6d0e49b8c to your computer and use it in GitHub Desktop.
const Obniz = require("obniz");
const obniz = new Obniz("obniz_ID");
obniz.onconnect = async () => {
const bme280 = obniz.wired("BME280", {vio:6, vcore:5, gnd:4, csb:3, sdi: 2, sck: 1, sdo:0 });
await bme280.applyCalibration();
const val = await bme280.getAllWait();
console.log(val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment