Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🐟 🐠 🐡 🐢  🌸 🌺 🌹 🌷 🌻 🌼 🐝 🐸

Dr. Takeyuki Ueda UedaTakeyuki

💭
🐟 🐠 🐡 🐢  🌸 🌺 🌹 🌷 🌻 🌼 🐝 🐸
View GitHub Profile
@UedaTakeyuki
UedaTakeyuki / pwm.py
Created Feb 4, 2021
Read MH_Z19 PWM with RPi gpio 12.
View pwm.py
# coding: utf8
import RPi.GPIO as GPIO
import time
class GPIO_Edge_Timeout(Exception):
pass
CYCLE_START_HIGHT_TIME = 2
GPIO.setmode(GPIO.BCM)
@UedaTakeyuki
UedaTakeyuki / RPi_I2C_driver.py
Created Dec 12, 2019 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
View RPi_I2C_driver.py
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
View pip_setup_debian_ stretch.sh
https://stackoverflow.com/questions/37495375/python-pip-install-throws-typeerror-unsupported-operand-types-for-retry
apt-get remove python-pip python3-pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo python3 get-pip.py
View onvif_examples.md
@UedaTakeyuki
UedaTakeyuki / 99-foma_l-02a.rules
Created Aug 24, 2017
udev rule for usb 3g dongle L-02a
View 99-foma_l-02a.rules
# for FOMA L-02A
# USB Storage (Zero Installation)
KERNEL=="sr[0-9]*", ENV{ID_VENDOR_ID}=="1004", ENV{ID_MODEL_ID}=="610c", RUN+="/usr/bin/eject /dev/$kernel"
# USB Modem (ttyUSB)
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", ATTR{idProduct}=="6109", RUN+="/sbin/modprobe usbserial vendor=0x$attr{idVendor} product=0x$attr{idProduct}"
@UedaTakeyuki
UedaTakeyuki / 99-Qualcomm_Siemens-SG75.rules
Created Aug 24, 2017
udev rule for usb 3G dongle "05c6:6000 Qualcomm, Inc. Siemens SG75"
View 99-Qualcomm_Siemens-SG75.rules
# refer to http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2565
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="1000", RUN+="/usr/sbin/usb_modeswitch -W -v 05c6 -p 1000 -K"
View ffmpeg_udp_streaming.sh
ffmpeg -f v4l2 -input_format yuv420p -video_size 320x240 -i /dev/video0 -an -c:v h264_omx -r:v 5 -f mpegts udp://192.168.11.4:1234
View ffmpeg_udp_streaming_raspivid.sh
raspivid -n -vf -hf -t 0 -w 320 -h 240 -fps 5 -o - | ffmpeg -i - -vcodec copy -an -c:v h264_omx -f mpegts udp://192.168.11.7:1234
View ffmpeg_save_video.sh
# https://github.com/ccrisan/motioneyeos/issues/365
ffmpeg -f v4l2 -input_format yuv420p -framerate 25 -video_size 640x480 -i /dev/video0 -frames 500 -an -c:v h264_omx test.mp4
View ffmpeg_hls.sh
ffmpeg -f v4l2 -input_format yuv420p -i /dev/video0 -an -c:v h264_omx -f segment -segment_format mpegts -segment_time 5 -segment_list stream/playlist.m3u8 stream/a%03d.ts