Skip to content

Instantly share code, notes, and snippets.

View ricklentz's full-sized avatar

RWL ricklentz

View GitHub Profile
# https://www.hokuyo-aut.jp/02sensor/07scanner/download/pdf/UTM-30LX-EW_spec_en.pdf
# Sensor basics
# network ip 192.168.0.10 port 10940
# 1080 points @ 40 Hz (2400 RMP)
# accuracy .1 - 10m (+- 30mm)
# accuracy 10 - 30m (+- 50mm)
# accuracy 30 -60m (unk)
# angular resolution .25 degrees
ls | wc -l
# Temporal Difference Learning
# Reinforcement Learning
# Deep Q-Learning
# Experience Replay
# State, Action, Reward Triples
# TDLambda (Temporal Difference Learning, Monte Carlo) and or Dynamic Programming
# mac xcode-select --install
# mac pip install numpy incremental
# mac brew install golang libjpeg-turbo swig
# mac sudo -H pip3 install cmake
import smbus
import time
bus = smbus.SMBus(2)
# ADXL345 device address
ADXL345_DEVICE = 0x53
# ADXL345 constants
EARTH_GRAVITY_MS2 = 9.80665
import sys, smbus, time, signal
import math
bus = smbus.SMBus(2)
class ITG3200():
global bus
def __init__(self):
self.GYRO_ADDRESS=0x68
# ITG3200 Register Defines
@ricklentz
ricklentz / advanced_condo_environment_setup.txt
Created May 11, 2017 18:11
Helpful data analysis setup instructions
### Advanced Notebook Setup
conda update conda
conda install numexpr
conda install bottleneck
conda install pandas-datareader
conda install xlsxwriter
conda install openpyxl
@ricklentz
ricklentz / mini_dlna_setup.txt
Created May 12, 2017 03:43
Set up minidlna
sudo apt autoremove
sudo vim /etc/minidlna.conf
media_dir=PV,/media/cbios/PhotosVideos/2017London
inotify=yes
notify_interval=300
sudo ufw allow 8200
sudo minidlnad -R -f /etc/minidlna.conf
http://localhost:8200/
@ricklentz
ricklentz / imu_9dof.py
Created May 16, 2017 01:32
read the BNO055 minicomputer's orientation values
import logging
import sys
import time
from Adafruit_BNO055 import BNO055
# Create and configure the BNO sensor connection. Make sure only ONE of the
# below 'bno = ...' lines is uncommented:
# Raspberry Pi configuration with serial UART and RST connected to GPIO 18:
from socket import *
serverSocket = socket(AF_INET, SOCK_DGRAM)
serverSocket.bind(('', 24000))
message, address = serverSocket.recvfrom(1)
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 24000
my_bytes = bytearray(1)
print ("UDP target IP:", UDP_IP)
print ("UDP target port:", UDP_PORT)
print ("message:", my_bytes)
import sys
sys.path.append("/usr/local/lib/python3.5/site-packages")
import pygame
# Define some colors
BLACK = ( 0, 0, 0)
WHITE = ( 255, 255, 255)
# This is a simple class that will help us print to the screen
# It has nothing to do with the joysticks, just outputting the