Skip to content

Instantly share code, notes, and snippets.

View varofla's full-sized avatar

varofla

View GitHub Profile
@varofla
varofla / benchmark-base.md
Created January 12, 2025 12:10 — forked from superboum/benchmark-base.md
Benchmark your disk with FIO

Install FIO on Ubuntu/Debian:

sudo apt update
sudo apt install -y fio lshw

Install FIO on Fedora:

@varofla
varofla / matter_dht11.ino
Created June 11, 2024 16:34
Arduino Nano Matter을 위한 DHT11 온습도 센서 예제
/**
* @file matter_dht11.ino
* @author varofla (max.cha@varofla.com)
* @brief Arduino Nano Matter을 위한 DHT11 온습도 센서 예제
* @version 0.1
* @date 2024-06-12
*
* @copyright Copyright (c) 2024 VarOfLa (https://varofla.com)
*
*/
@varofla
varofla / drv2605_play_all.ino
Created May 1, 2024 13:18
DRV2605 진동모터 드라이버 아두이노 예제 코드 (한국어 주석)
#include <Wire.h>
#include <Adafruit_DRV2605.h>
Adafruit_DRV2605 drv;
void setup() {
Serial.begin(9600);
Serial.println("Adafruit DRV2605 Basic test");
@varofla
varofla / sht40_simple.ino
Created May 1, 2024 10:20
SHT40 고정밀 온습도 센서 아두이노 예제 코드 (한국어 주석)
#include "DFRobot_SHT40.h"
DFRobot_SHT40 SHT40(SHT40_AD1B_IIC_ADDR);
void setup() {
Serial.begin(9600); // 시리얼 통신 init
SHT40.begin(); // 센서 init
if (SHT40.getDeviceID() == 0) {
@varofla
varofla / esp_zb_light.c
Created March 18, 2023 17:28
ESP-Zigbee-SDK의 HA_on_off_light 예제를 Home Assistant에 사용할 수 있도록 수정
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: LicenseRef-Included
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@varofla
varofla / main.c
Created April 2, 2022 18:03
STM32_HAL_L298N_BLDC_OpenLoop
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2>
@varofla
varofla / Arduino_L298N_BLDC_OpenLoop.cpp
Last active April 2, 2022 18:03
Arduino_L298N_BLDC_OpenLoop
// Arduino_L298N_BLDC_OpenLoop.cpp
// L298N 모터드라이버를 이용해 BLDC모터를 제어하는 예제입니다.
// 결선은 다음과 같습니다.
// IN1 - 9
// IN2 - 10
// IN3 - 11
// IN4 - 8 (GND에 연결되어도 무방)
// 가변저항 - A1
// Code from https://github.com/juanpablocanguro/BRUSHLESS-MOTORS/blob/master/open_loop_youtube.ino
// Edit By VarOfLa
@varofla
varofla / NodeMCU_HA_Tutorial.cpp
Created January 16, 2022 12:58
Home Assistant NodeMCU Tutorial
/*
*
* Home Assistant NodeMCU Tutorial
*
* LED는 D1(GPIO5)에, DHT22는 D2(GPIO4)에 연결되어 있습니다.
* 자세한 내용은 블로그 포스팅을 참고해주세요.
*
* By VarOfLa 차완기
* https://blog.naver.com/dhksrl0508
*
@varofla
varofla / test.py
Created December 24, 2020 08:00
크롤링 연습2
import selenium.webdriver as webdriver
from selenium.webdriver.chrome.options import Options
# from fake_useragent import UserAgent
import time
# ua = UserAgent(verify_ssl=False)
# userAgent = ua.random
# print(userAgent)
options = Options()
@varofla
varofla / main.py
Created December 23, 2020 10:12
크롤링 연습1
# -*- coding: UTF-8 -*-
"""
(웹툰 고유번호 검색 -> 웹툰 마지막회 번호 파싱 -> url 생성 및 접속 ->
이미지 파싱, 이미지 url 기록 -> 이미지 다운로드) 과정을 거침.
파이썬 파일이 위치하는 디렉토리에 toon 폴더가 생성되고 (작품명-작가명)
형식으로 하위 디렉토리에 저장됨.
"""
import urllib.request
import urllib.parse
import re