Skip to content

Instantly share code, notes, and snippets.

View ricklon's full-sized avatar

Rick Anderson ricklon

View GitHub Profile
@ricklon
ricklon / liveproicess.py
Created March 10, 2020 12:31
lots of todo live process with python opencv
# imports
import random
import cv2
import numpy as np
from matplotlib import pyplot as plt
#import urllib
import urllib.request
# https://www.pyimagesearch.com/2015/03/02/convert-url-to-image-with-python-and-opencv/
#https://hub.docker.com/r/zoobab/arduino-cli/dockerfile
FROM frolvlad/alpine-glibc
RUN apk add ca-certificates python curl
WORKDIR /root
RUN curl -O -J -L https://github.com/arduino/arduino-cli/releases/download/0.4.0/arduino-cli_0.4.0_Linux_64bit.tar.gz
RUN tar xvzf arduino-cli_0.4.0_Linux_64bit.tar.gz
ENV USER root
@ricklon
ricklon / tsTReadZoom.ino
Created April 26, 2019 17:06
tsZoomRead
#define BUILTIN_LED 13
const int trPin1 = 22;
const int trPin2 = 23;
int zoomIn;
int zoomOut;
void setup() {
pinMode(BUILTIN_LED, OUTPUT);
/*
* AS5047D AMS magnetic position sensor demonstration sketch
* Hardware is : Fubarino Mini, default SPI port, AS5047D in 3.3V power mode
*
*/
#include <SPI.h>
/* Each possible address in the chip */
#define NOP_ADDR 0x0000
openocd -f interface/stlink-v2-1.cfg -f target/stm32f1x.cfg
@ricklon
ricklon / platformio.ini
Created March 13, 2019 15:11
Platform IO configuration for blue pill f103c8 for st link v2
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
build_flags = -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
@ricklon
ricklon / as5047p_spi
Created October 14, 2018 22:00
as5047p read angle
/*
AS5047D AMS magnetic position sensor demonstration sketch
Hardware is : Fubarino Mini, default SPI port, AS5047D in 3.3V power mode
*/
#include <SPI.h>
/* Each possible address in the chip */
1001 ls
1002 mv weights_2018-04-05_04-25-09_epoch_*.h5 2018-04-05_04-25-09/
1003 ls -l | wc -l
1004 ls
1005 mkdir 2018-04-19_21-39-33
1006 mv weights_2018-04-19_21-39-33_epoch_*.h5 2018-04-19_21-39-33/
1007 ls
1008 ls -l | wc -l
1009 mkdir 2018-04-29_16-27-47
1010 mv weights_2018-04-29_16-27-47_epoch_*.h5 2018-04-29_16-27-47/
@ricklon
ricklon / binary installation of tensorflow_gpu
Created June 7, 2018 01:12
binary installation of tensorflow_gpu on windows for python 3.6
$ pip install --upgrade https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-0.12.0-py3-none-any.whl
@ricklon
ricklon / whatiswrong.sh
Created April 15, 2018 21:05
interactive mount directory bash docker not working
docker run -it ubuntu bash -v $(PWD):/mnt