I hereby claim:
- I am kd8bxp on github.
- I am kd8bxp (https://keybase.io/kd8bxp) on keybase.
- I have a public key whose fingerprint is 9545 12FF F306 04E0 F6FB E4BB B6B7 DA61 5E5C 9A9D
To claim this, I am signing this object:
hardware.pin9.configure(ANALOG_IN); | |
function getTemp() { | |
local supplyVoltage = hardware.voltage(); | |
local voltage = supplyVoltage * hardware.pin9.read() / 65535.0; | |
local c = (voltage - 0.5) * 100 ; | |
local c_str = format("%.01f", c); | |
server.log("Current temp is "+c_str+" °C"); |
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
import paho.mqtt.client as paho | |
import os | |
device_id = '1' | |
device_secret = '1234' | |
random_client_id = '1234' | |
def on_connect(client, data, flags, rc): | |
print('Connected, rc: ' +str(rc)) |
/* | |
Basic ESP8266 MQTT example | |
This sketch demonstrates the capabilities of the pubsub library in combination | |
with the ESP8266 board/library. | |
It connects to an MQTT server then: | |
- publishes "hello world" to the topic "outTopic" every two seconds | |
- subscribes to the topic "inTopic", printing out any messages | |
it receives. NB - it assumes the received payloads are strings not binary |
<?php | |
$filen = "ip.txt"; | |
if (file_exists($filen)) {echo " script check file is Ok \r\n ";} else {$handle = fopen ($filen, "w"); fwrite($handle, "0"); | |
fclose($handle); } | |
$handle=fopen($filen, 'r'); | |
$check = trim(fgets($handle), "\r\n"); //last ip address | |
fclose ($handle); | |
$ip=exec("ifconfig wlp1s0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"); //Dell Desktop |
void setup() { | |
Serial.begin(9600); | |
Serial.println(""); | |
Serial.println(""); | |
Serial.println("Check ID in:"); | |
Serial.println("https://www.wemos.cc/verify_products"); | |
Serial.printf("Chip ID = %08X\n", ESP.getChipId()); | |
Serial.println(ESP.getChipId()); | |
Serial.println(""); | |
Serial.println(""); |
#include <WiFi.h> | |
#include <ESP32WebServer.h> | |
void setup() | |
{ | |
Serial.begin(9600); | |
delay(10); | |
uint64_t chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length: 6 bytes). |
irection: Backward. Count: 50 | |
Direction: Backward. Count: 98 | |
Direction: Backward. Count: 0 | |
Direction: Backward. Count: 52 | |
Direction: Backward. Count: 100 | |
Direction: Backward. Count: 150 | |
Direction: Backwa⸮Hl⸮k⸮D6⸮⸮Z⸮<⸮⸮Direction: Backward. Count: 38 | |
Direction: Backward. Count: 82 | |
Direction: Backward. Count: 0 | |
Direction: Backward. Count: 52 |
/* Modified by LeRoy Miller (c) 2017, modification shows how to do the base project with just one Arduino UNO | |
* | |
* Highly based on https://www.instructables.com/id/Add-Lights-and-Spooky-Music-to-Your-Jack-O-Lantern/ | |
* By More than the Sum | |
* | |
*/ | |
#include <Adafruit_NeoPixel.h> | |
#include <TimedAction.h> |