ESP32 IO PIN | Function | Direction | BME280 | BQ27441-G1 | Comment |
---|---|---|---|---|---|
13 | Application Push button 1 | IN | N/A | N/A | Pull down push button |
15 | LED Green | OUT | N/A | N/A | LED |
16 | LED RED | OUT | N/A | N/A | LED |
26 | SCL | OUT | PAD 4 | PIN 2 | I2C |
27 | SDA | OUT | PAD 3 | PIN 1 | I2C |
21 | GPOUT | IN | N/A | PIN 12 | This open-drain output can be configured to indicate BAT_LOW |
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
CC=gcc # gcc || clang | |
CCOPTIONS = -g -Wall | |
LIBS = -lmosquitto#-ljson-c | |
all: mosquitto-demo.o | |
$(CC) -o mosquitto-demo mosquitto-demo.o $(LIBS) $(CCOPTIONS) |
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
std::unique_ptr < CommBase > CommFactory::create() { | |
bool isEmulator = android::base::GetBoolProperty("ro.kernel.qemu", false); | |
if (isEmulator) { | |
// return std::make_unique<PipeComm>(); | |
return std::make_unique < SocketComm > (); | |
} else { | |
// return std::make_unique<SocketComm>(); | |
return std::make_unique < PipeComm > (); | |
} | |
} |
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
#!/bin/bash | |
IP="192.168.1.22" | |
SUBJECT_CA="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=CA/CN=$IP" | |
SUBJECT_SERVER="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Server/CN=$IP" | |
SUBJECT_CLIENT="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Client/CN=$IP" | |
function generate_CA () { | |
echo "$SUBJECT_CA" | |
openssl req -x509 -nodes -sha256 -newkey rsa:2048 -subj "$SUBJECT_CA" -days 365 -keyout ca.key -out ca.crt |
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
pid_file /var/run/mosquitto.pid | |
persistence true | |
persistence_location /var/lib/mosquitto/ | |
log_dest file /var/log/mosquitto/mosquitto.log | |
listener 8883 | |
cafile /etc/mosquitto/certs/ca.crt | |
certfile /etc/mosquitto/certs/server.crt |
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
config_schema: | |
- ["i2c.enable", true] | |
- ["i2c.scl_gpio", 26] | |
- ["i2c.sda_gpio", 27] | |
- ["wifi.ap.enable", false] | |
- ["wifi.sta.enable", true] | |
- ["wifi.sta.ssid", "YOUR-SSID"] | |
- ["wifi.sta.pass", "YOUR-PASSKEY"] | |
- ["mqtt.server", "YOUR-BROKER-IP:8883"] | |
- ["mqtt.enable", true] |
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
// Imports the Google Cloud client library | |
const {BigQuery} = require('@google-cloud/bigquery'); | |
// Your Google Cloud Platform project ID | |
const projectId = 'bigquery-242619'; | |
const datasetId = "test_data"; | |
const tableId = "raw_data"; | |
const bqTimestamp = BigQuery.timestamp(new Date()); |
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
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
root /home/sudi/code/himinds-boosting-innovation-web-secure-cra/hn-app/build; | |
index index.html index.htm; | |
server_name MY_DOMAIN; | |
ssl_certificate /home/sudi/certbot/etc/live/MY_DOMAIN/fullchain.pem; | |
ssl_certificate_key /home/sudi/certbot/etc/live/MY_DOMAIN/privkey.pem; | |
location ~* \.(?:manifest|appcache|html?|xml|json)$ { |
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) { |
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 |