| ESP32 IO PIN | Function | BME680 | BQ27441 | MH-Z19B | ADXL345 | Comment |
|---|---|---|---|---|---|---|
| 13 | Application PB 1 | N/A | N/A | N/A | Pull down push button | |
| 17 | LED Green | N/A | N/A | N/A | LED | |
| 16 | LED RED | N/A | N/A | N/A. | LED | |
| 32 | SCL | PAD 4 | PIN 2 | N/A. | PIN14 | I2C |
This file contains hidden or 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
| FROM ubuntu:bionic | |
| RUN apt-get update && apt-get install -y \ | |
| software-properties-common \ | |
| apt-utils \ | |
| curl \ | |
| cppcheck \ | |
| flawfinder | |
| RUN add-apt-repository ppa:mongoose-os/mos && apt-get update && apt-get install -y mos |
| Type | Comment |
|---|---|
| Feature | Double the size of the PCB |
| Feature | Add BME680 to design, communication via I2C |
| Feature | Add Winsen MH-Z19B to design, communication via UART |
| Feature | Debug, keep breakout pins to listen to Tx, Rx, GND between Winsen and ESP32 |
| Feature | Double the size of the PCB |
| Feature | Add enclosure holes for CBRS01VWH, can be used without Winsen sensor |
| CR | Remove BME280 |
| CR | PWRLED1 LED should be controlled by ESP32 |
This file contains hidden or 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
| { | |
| "data": { | |
| "remaining_capacity": 2.635, | |
| "full_available_capacity": 1.254, | |
| "battery_level": 100, | |
| "temperature": 26.9685, | |
| "voltage": 4.185 | |
| }, | |
| "device_id": "esp32_XXXXXX" | |
| } |
This file contains hidden or 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
| { | |
| "data": { | |
| "pressure": 1007.2416, | |
| "humidity": 21.27, | |
| "temperature": 24.5 | |
| }, | |
| "device_id": "esp32_XXXXXX" | |
| } |
This file contains hidden or 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
| { | |
| "data": { | |
| "core_temperature": 25.555556, | |
| "firmware": "1.0.1a", | |
| "model": "env ib-1", | |
| "uptime": 573618.977327, | |
| "free_ram": 196396, | |
| "total_ram": 283228 | |
| }, | |
| "device_id": "esp32_XXXXXX" |
This file contains hidden or 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
| // Default sensors address for BME280 | |
| let BME280_I2C_ADDRESS = 0x76; | |
| let BQ27441_I2C_ADDRESS = 0x55; | |
| let BQ27441_COMMAND_CONTROL = 0x00; // Control | |
| let BQ27441_COMMAND_TEMP = 0x02; // Temperature 0.1°K | |
| let BQ27441_COMMAND_VOLTAGE = 0x04; // Voltage mV | |
| let BQ27441_COMMAND_FLAGS = 0x06; // Flags | |
| let BQ27441_COMMAND_NOM_CAPACITY = 0x08; // NominalAvailableCapacity mAh | |
| let BQ27441_COMMAND_AVAIL_CAPACITY = 0x0A; // FullAvailableCapacity mAh |
This file contains hidden or 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
| $ mos call I2C.Scan | |
| [ | |
| 85, | |
| 118 | |
| ] | |
| Command completed. |
| ESP32 IO PIN | Function | Direction | BME280 | BQ27441-G1 | Comment |
|---|---|---|---|---|---|
| 26 | SCL | OUT | PAD 4 | PIN 2 | I2C |
| 27 | SDA | OUT | PAD 3 | PIN 1 | I2C |
This file contains hidden or 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
| const functions = require('firebase-functions'); | |
| var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | |
| var xmlParser = require('fast-xml-parser'); | |
| const POSTS_URL = 'https://medium.com/feed/@suru.dissanaike'; | |
| const FetchData = (response) => { | |
| var request = new XMLHttpRequest(); | |
| request.onreadystatechange = () => { | |
| if (request.readyState == 4 && request.status == 200) { |