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 / watt_meter.in0
Created December 17, 2024 18:54
Program Watt Meter LCD 20x4
#include "ACS712.h"
#include <ZMPT101B.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Inisialisasi LCD (Alamat I2C dan ukuran layar)
LiquidCrystal_I2C lcd(0x27, 20, 4); // Pastikan alamat I2C benar, biasanya 0x27
#include <LCD_I2C.h>
#include <TimeOut.h>
#define BUZZER 2
#define CONTACT_RELAY 3
#define COIN_PIN 9
#define PULSE1 120 // 2 menit / 600 detik
#define PULSE5 120 // 10 menit / 600 detik
#define PULSE10 120 // 10 menit / 600 detik
@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;