Skip to content

Instantly share code, notes, and snippets.

View pvazteixeira's full-sized avatar

Pedro Vaz Teixeira pvazteixeira

View GitHub Profile
import procontroll.*;
import java.io.*;
ControllIO controll; // the base class that handles all devices
ControllDevice hotas; // the joystick object
ControllStick stick; // hotas stick
ControllStick throttle; // hotas throttle
ControllButton button;
float bg = 255;
@pvazteixeira
pvazteixeira / 20.rtlsdr.rules
Created January 19, 2017 19:04
20.rtlsdr.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="adm", MODE="0666", SYMLINK+="rtl_sdr"%
@pvazteixeira
pvazteixeira / README.md
Last active March 27, 2022 22:35
Using a raspi as a Stratum-1 NTP server

Using a Raspberry Pi as a Stratum 1 NTP server

Motivation/Background/Context

Having had some degree of success with the various tutorials on how to setup a raspi as a NTP microserver, the following are my personal notes on what worked for my setup (mostly based on the ntpsec guide, but with a few changes).

Hardware

  • Raspberry Pi (I'm using a Model B rev 1.0)
workspace/sandbox/conda-cv-test via 🅒 sandbox 
➜ nm -DC ~/anaconda2/envs/sandbox/lib/libopencv_highgui.so | ag imread 
0000000000054320 T cv::imread(std::string const&, int)
workspace/sandbox/conda-cv-test via 🅒 sandbox 
➜ nm -DC /usr/lib/x86_64-linux-gnu/libopencv_highgui.so | ag imread     
000000000001c900 T cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)

@pvazteixeira
pvazteixeira / bmp280.py
Created June 18, 2018 22:07
bmp280.py
#coding: utf-8
import Adafruit_GPIO.I2C as I2C
import time
i2c = I2C
device=i2c.get_i2c_device(0x77) # address of BMP
# this value is necessary to calculate the correct height above sealevel
# its also included in airport wheather information ATIS named as QNH
# unit is hPa
QNH=1020
#!/bin/bash
export LCM_DEFAULT_URL=udpm://239.255.76.67:7667?ttl=1;
sudo ifconfig eth0 inet 10.0.1.123;
sudo route add default gw 10.0.1.1;
#sudo ntpdate 10.0.1.112;
@pvazteixeira
pvazteixeira / ShoppingList.md
Last active June 22, 2018 21:33 — forked from mc2922/shopping list
shopping list
@pvazteixeira
pvazteixeira / get-qgc.sh
Last active June 28, 2018 20:35
get qgc
#!/bin/sh
if [ ! -f qgroundcontrol/qgroundcontrol-start.sh ]; then
echo "QGroundControl not found! Downloading."
mkdir qgroundcontrol
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/latest/QGroundControl.tar.bz2 -O qgroundcontrol/qgroundcontrol.tar.bz2
tar -xvf qgroundcontrol/qgroundcontrol.tar.bz2
fi
@pvazteixeira
pvazteixeira / server.py
Last active August 10, 2018 03:48
synchronySDK_py server
import time
import zmq
import json
from Navi import *
from NaviUtils import *
# TODO: configurable port
# TODO: configurable id
# TODO: configurable sessionid
import time
import zmq
import json
from Navi import *
from NaviUtils import *
# TODO: configurable port
# TODO: configurable id
# TODO: configurable sessionid