Skip to content

Instantly share code, notes, and snippets.

View simondlevy's full-sized avatar

Simon D. Levy simondlevy

View GitHub Profile
@simondlevy
simondlevy / rtree-knn-demo.py
Last active January 1, 2021 04:26
Demon rtree library for k Nearest Neighbors
#!/usr/bin/env python3
'''
Tests k-Nearest-Neighbors using Rtree library
Requires: numpy, matplotlib, rtree
Copyright (C) Simon D. Levy 2020
MIT License
'''
@simondlevy
simondlevy / mb1242_wiringpi.c
Created April 15, 2016 22:04
Read from MaxBotix MB1242 ultransonic rangefinder using WiringPi
// Compile with gcc -o readsonar mb1242_wiringpi.c -lwiringPi -lpthread
#include <wiringPiI2C.h>
#include <wiringPi.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>