- sudo vi /usr/bin/enable-i2c-pins.sh
#!/bin/bash
config-pin p9.17 i2c
config-pin p9.18 i2c
- sudo chmod 755 /usr/bin/enable-i2c-pins.sh
#!/usr/bin/env python | |
# Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703 | |
import numpy as np | |
import pylab | |
def thresholding_algo(y, lag, threshold, influence): | |
signals = np.zeros(len(y)) | |
filteredY = np.array(y) | |
avgFilter = [0]*len(y) | |
stdFilter = [0]*len(y) |
#include <stdio.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <linux/i2c-dev.h> | |
// Terrible portability hack between arm-linux-gnueabihf-gcc on Mac OS X and native gcc on raspbian. | |
#ifndef I2C_M_RD | |
#include <linux/i2c.h> | |
#endif |