Skip to content

Instantly share code, notes, and snippets.

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
uint8_t reverse_8(uint8_t d);
uint16_t crc16(uint8_t *addr, size_t addr_length, uint8_t *data, size_t data_length);
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
uint8_t reverse_8(uint8_t d);
uint16_t crc16(uint8_t *addr, size_t addr_length, uint8_t *data, size_t data_length);
@14roiron
14roiron / smartplug.yml
Created December 9, 2023 21:10
Esphome for Smartplug Tuya bk7231t with bk7231t
esphome:
name: plug1
friendly_name: plug1
substitutions:
voltage_divider: "894.5060273291349"
current_resistor: "0.001054149274397953"
current_multiply: "0.4499878363475396"
bk72xx:
board: generic-bk7231t-qfn32-tuya
@14roiron
14roiron / README.md
Last active October 23, 2022 11:44
monitor pikvm screen and save pictures

Monitor screen change on PIKVM to spot error

It would be nice to have it start recording as soon as the static screen changs as it starts to dump information to the console/screen. (idea from: pikvm/pikvm#229)

Install monitor.py in /root

the script need to be updated with correct IP/password and number of files to keep

install cronie for periodic verification

@14roiron
14roiron / code.c
Last active January 13, 2018 16:55
code vect
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <immintrin.h>
#include <sys/time.h> // for timing
#include <pthread.h>
#define VEC_SIZE 2147483647
double t1,t2;
float vecteurBase[VEC_SIZE] __attribute__((aligned(32)));