Skip to content

Instantly share code, notes, and snippets.

@ingoiot
ingoiot / test unit converter
Created March 15, 2020 21:11
test unit converter
let units = {
"prozent": {
"min": "0",
"max": "100",
"unit": "%",
"value": "50"
},
"mA": {
"min": "4",
@ingoiot
ingoiot / index.html
Created March 13, 2020 10:50
Messbereich umwandeln4
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 class="display-6 text-center mb-3">Messbereich umwandeln</h2>
<div class="row">
<table class="table table-hover">
<tbody>
@ingoiot
ingoiot / 4-wire-fan-pwm arduino nano DS18B20
Created March 4, 2020 14:47
4-wire-fan-pwm arduino nano DS18B20
// fancontrol - fan speed control by analog sensor input (light? heat? etc.)
// (c) 2016 Martin Espinoza <martin.espinoza@gmail.com>
//
// sources:
// http://arduino.stackexchange.com/questions/25609/need-help-to-set-pwm-frequency-to-25khz/25623#25623
// https://forum.arduino.cc/index.php?topic=209133.0
// http://www.instructables.com/id/Fan-RPM-With-Internal-Hall-Effect-Sensor-and-Ardui/?ALLSTEPS
//
// requires atmega168 or 328 at 16MHz (e.g. Nano) for 25 MHz PWM
@ingoiot
ingoiot / Espruino ESP8266 Temperature Webserver
Created March 1, 2020 14:38
Espruino ESP8266 Temp Webserver
var wifi = require("Wifi");
wifi.connect("AP", {password:"12345678"}, function(err){
console.log("connected? err=", err, "info=", wifi.getIP());
});
wifi.stopAP();
var ow = new OneWire(D15);
var sensor = require("DS18B20").connect(ow);
var history = new Float32Array(30);
Introduction⇠
This is a simple WiFi enabled thermometer. We'll get temperature using the DS18B20 and we'll store a few samples worth of history.
There will be a WebServer on the CC3000, and when it is queried, a webpage will be displayed that shows a line graph of the temperature over time.
You'll Need⇠
One Espruino Board
A DS18B20 Temperature sensor and 4.7k resistor
A CC3000 WiFi module
Wiring Up⇠
@ingoiot
ingoiot / emperature Graph on a display, with DS18B20 t
Created February 28, 2020 10:43
Temperature Graph on a PCD8544 display, with DS18B20 temperature sensor
SPI1.setup({ baud: 1000000, sck:B3, mosi:B5 });
var ow = new OneWire(B13);
var g, temp, history;
function onInit() {
clearInterval();
temp = require("DS18B20").connect(ow);
g = require("PCD8544").connect(SPI1,B6,B7,B8, function() {
@ingoiot
ingoiot / RCWL-0516 Radar on Wemos D1 Mini
Created February 20, 2020 20:15
RCWL-0516 Radar on Wemos D1 Mini
https://github.com/arendst/Tasmota/wiki/RCWL-0516
@ingoiot
ingoiot / JSON with JS.md
Created February 15, 2020 15:27 — forked from laurenancona/JSON with JS.md
Access local JSON data with Javascript

What

An updated guide/collection of guides on how to access JSON data with JavaScript

Original Question on Stack Exchange.


Example 1

For reading the external Local JSON file (data.json) using java script