This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template_string | |
import subprocess | |
import socket | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
ip_a_output = subprocess.check_output(['ip', 'a'], text=True) | |
lspci_output = subprocess.check_output(['lspci'], text=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm /tmp/sensor | |
while true; do | |
echo -ne "\r" | |
echo $1 | |
cat $1 >> /tmp/sensor | |
tail -n 60 /tmp/sensor | gnuplot -p -e "set terminal dumb size 120, 30; set autoscale; plot '-' with lines notitle" | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: wt32 | |
includes: | |
- "Adafruit_LiquidCrystal.h" # copy from https://github.com/adafruit/Adafruit_LiquidCrystal/blob/master/Adafruit_LiquidCrystal.h into project folder with yaml | |
libraries: | |
- "Wire" | |
- "SPI" | |
- "Adafruit BusIO" | |
- "Adafruit MCP23017 Arduino Library" | |
- "Adafruit LiquidCrystal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# This is a test code for UBLEDs, controlled by a raspberry pi 2. | |
# Photos and video at https://goo.gl/89iMrc | |
# PB3xx301V050A (http://goo.gl/0cyNxy) | |
# | |
# 1.Enable the raspberry SPI bus (https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/) | |
# | |
# 2.Connected to ubled chain to SPI pins on Raspberry (http://www.jameco.com/Jameco/workshop/circuitnotes/raspberry_pi_circuit_note_fig2a.jpg) | |
# 5V (1) - 5V (2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# just copy the following into .bashrc | |
function parse_git_branch { | |
/usr/bin/git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local NORMAL="\[\033[0;0m\]" | |
local BLUE="\[\033[0;34m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"shell_cmd": "make sitl -j8", | |
"file_regex": "^(\/...*?(?:.pde|.h|.cpp)):([0-9]*):?([0-9]*)", | |
"working_dir": "${project_path:${folder}}/ArduCopter", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module load gimbal | |
module load graph | |
module load gopro | |
@alias add g graph | |
@alias add ggimbaltilt graph MOUNT_STATUS.pointing_a/100.0 MOUNT_STATUS.pointing_b/100.0 | |
@alias add ggimbalyaw graph MOUNT_STATUS.pointing_c/100.0 180*AHRS2.yaw/3.141592 | |
@alias add ggimbaljoint graph GIMBAL_REPORT.joint_roll GIMBAL_REPORT.joint_el GIMBAL_REPORT.joint_az |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vlc v4l2:///dev/video1:norm=NTSC:width=720:height=480:input=1 --sout '#duplicate{dst=display,dst="transcode{vcodec=mp4v,acodec=mpga,vb=10000}:standard{access-file,mux=ps,dst=test1.mpg}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
v = cv2.VideoCapture('http://10.5.5.9:8080/live/amba.m3u8') | |
# v = cv2.VideoCapture('http://10.5.5.9:8080/live/aaba.m3u8') | |
i = 0 | |
while True: | |
v.grab() | |
if i > 10: | |
i = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Primeiro Teste do Seguidor de Linha | |
João Pedro Scherer Cipriani | |
Equipe GaudérioBotz | |
COLÉGIO TÉCNICO INDUSTRIAL DE SANTA MARIA */ | |
const int V_MAX = 255; | |
const int V_LENTA = 255; | |
// atribuição de pinos aos motores | |
int pinMotorEsq = 9; |
NewerOlder