This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int num_pwm_pins = 4; | |
const int pwm_pins[ num_pwm_pins ] = { 9, 10, 11, 13 }; | |
uint8_t tick_count = 0; | |
void setup() { | |
for( uint8_t i=0; i<num_pwm_pins; i++ ){ | |
pinMode( pwm_pins[ i ], OUTPUT ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ "$1" == 'enable' || "$1" == 'disable' ]]; then | |
if [ "$1" == 'disable' ]; then | |
systemctl set-default multi-user.target --force | |
fi | |
systemctl $1 lightdm.service --force | |
systemctl $1 graphical.target --force | |
systemctl $1 plymouth.service --force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
Bare Conductive Touch MP3 player | |
------------------------------ | |
Touch_MP3.ino - touch triggered MP3 playback | |
You need twelve MP3 files named TRACK000.mp3 to TRACK011.mp3 in the root of the | |
microSD card. | |
When you touch electrode E0, TRACK000.mp3 will play. When you touch electrode | |
E1, TRACK001.mp3 will play, and so on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
Bare Conductive Touch MP3 player | |
------------------------------ | |
Touch_MP3.ino - touch triggered MP3 playback | |
You need twelve MP3 files named TRACK000.mp3 to TRACK011.mp3 in the root of the | |
microSD card. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final boolean monochrome = true; // in this mode, primes are black, non-primes are white | |
// otherwise darker colours have fewer factors, lighter colours have more | |
final int windowWidth= 640; | |
final int windowHeight= 320; | |
final int plotWidth = 3; | |
final int plotHeight = 5; | |
void settings() { | |
size(windowWidth, windowHeight); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias show_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hide_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hide_shadows='defaults write com.apple.screencapture disable-shadow -bool TRUE; killall SystemUIServer' | |
alias show_shadows='defaults write com.apple.screencapture disable-shadow -bool FALSE; killall SystemUIServer' | |
alias cls='clear' | |
alias tracert='traceroute' | |
alias lsusb='system_profiler SPUSBDataType' | |
alias √='echo $?' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// locates the user's Arduino 1.5.X or earlier sketchbook folder | |
// 1.5.X folders are returned via STDOUT with a return code of 0 | |
// if only a pre 1.5.X folder can be found, it is also returned via STDOUT, but with a return code of 2 | |
// if no folder can be found, a return code of 1 is returned and STDOUT lets you know that no folder can be found | |
// tested and known working on: | |
// OSX 10.9.5 | |
// Windows 7 Ultimate SP1 (build 7601) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
Bare Conductive Compiler Error Handler | |
-------------------------------------- | |
Compiler_Errors.h - avoids incorrect builds due to wrong environment | |
Bare Conductive code written by Stefan Dzisiewski-Smith and Peter Krige. | |
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// maps intensity of the onboard D13 LED on the Touch Board | |
// to the proximity of a hand to a 85mmx85mm electrode | |
// connected to electrode 0 on the board | |
#include <MPR121.h> | |
#include <Wire.h> | |
#define LOW_DIFF 0 | |
#define HIGH_DIFF 50 | |
#define filterWeight 0.3f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
Bare Conductive LED controller | |
------------------------------ | |
Touch_LEDs.ino - touch triggered LED control - maps each electrode to a digital | |
output and toggles it on and off. | |
Based on code by Jim Lindblom and plenty of inspiration from the Freescale |
NewerOlder