Skip to content

Instantly share code, notes, and snippets.

View fajarlabs's full-sized avatar
💭
loved technology & learn anything

Fajar Rizki Dwi Prasetya fajarlabs

💭
loved technology & learn anything
View GitHub Profile
@fajarlabs
fajarlabs / listrik_koin_v_1_4.cpp
Last active February 20, 2024 02:30
Patch Overload Warning & Cutoff
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <PZEM004Tv30.h>
#include "EEvar.h"
#include <TimeOut.h>
#define EEADDR 166
#define PERKWH 1820
#define RELAY_PIN 6
#define RELAY_PIN_SUPPORT 7
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <PZEM004Tv30.h>
#include "EEvar.h"
#include <TimeOut.h>
#define EEADDR 166
#define PERKWH 1820
#define RELAY_PIN 6
#define RELAY_PIN_SUPPORT 7
@fajarlabs
fajarlabs / listrik_koin_v_1_2.cpp
Last active January 12, 2024 03:01
Listrik Koin V.1.2
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <PZEM004Tv30.h>
#include "EEvar.h"
#include <TimeOut.h>
#define EEADDR 166
#define PERKWH 1444.70
#define RELAY_PIN 7
#define RELAY_PIN_SUPPORT 5
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <PZEM004Tv30.h>
#include "EEvar.h"
#define EEADDR 166
#define COIN 1000
#define PERKWH 1444.70
#define RELAY_PIN 7
#define RELAY_PIN_SUPPORT 5
#EXTM3U
#EXTINF:0 tvg-id="" tvg-name="" tvg-logo="https://mncvision.id/userfiles/image/channel/channel_82.png" group-title="LOCAL",MNC
https://vcdn2.rctiplus.id/live/eds/mnctv_fta/live_fta/mnctv_fta-avc1_2000000=1-mp4a_64000_eng=2.m3u8
#EXTINF:0 tvg-id="" tvg-name="" tvg-logo="https://mncvision.id/userfiles/image/channel/channel_80.png" group-title="LOCAL",RCTI
https://vcdn2.rctiplus.id/live/eds/rcti_fta/live_fta/rcti_fta-avc1_2000000=1-mp4a_64000_eng=2.m3u8
#EXTINF:0 tvg-id="" tvg-name="" tvg-logo="https://mncvision.id/userfiles/image/channel/channel_81.png" group-title="LOCAL",GLOBALTV
https://vcdn2.rctiplus.id/live/eds/gtv_fta/live_fta/gtv_fta-avc1_2000000=1-mp4a_64000_eng=2.m3u8
@fajarlabs
fajarlabs / geo.js
Created October 19, 2021 02:18 — forked from mkhatib/geo.js
A Javascript utility function to generate number of random Geolocations around a center location and in a defined radius.
/**
* Generates number of random geolocation points given a center and a radius.
* @param {Object} center A JS object with lat and lng attributes.
* @param {number} radius Radius in meters.
* @param {number} count Number of points to generate.
* @return {array} Array of Objects with lat and lng attributes.
*/
function generateRandomPoints(center, radius, count) {
var points = [];
for (var i=0; i<count; i++) {
@fajarlabs
fajarlabs / readme.txt
Created April 16, 2021 08:03
Raspberry RTL-AIS
# ========================================================================================|
# INSTALL_USB_DONGLE_RTL
# ========================================================================================|
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git git-core cmake libusb-1.0-0-dev build-essential lsof
install the RTL-2832U USB dongle driver
git clone https://git.osmocom.org/rtl-sdr
@fajarlabs
fajarlabs / blynk_configurable.ino
Created March 13, 2021 17:43
Blynk configurable
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#include <EEPROM.h>
#include <BlynkSimpleEsp8266.h>
WiFiManager wifiManager;
/* Secret Door Knock Detecting Door Lock
Originally from Steve Hoefer http://grathio.com Version 0.1.10.20.10
Updates by Lee Sonko
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0
http://creativecommons.org/licenses/by-nc-sa/3.0/us/
(In short: Do what you want, just be sure to include this line and the four above it, and don't sell it or use it in anything you sell without contacting me.)
Analog Pin 0: Piezo speaker (connected to ground with 1M pulldown resistor)
Digital Pin 2: Switch to enter a new code. Short this to enter programming mode.
@fajarlabs
fajarlabs / client.js
Created September 28, 2020 08:54 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});