This file contains 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
#define LOG_PERIOD 20000 //Logging period in milliseconds | |
#define MINUTE_PERIOD 60000 | |
volatile unsigned long counts = 0; // Tube events | |
unsigned long cpm = 0; // CPM | |
unsigned long previousMillis; // Time measurement | |
const int inputPin = 2; | |
void ISR_impulse() { // Captures count of events from Geiger counter board | |
counts++; |
This file contains 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
/** | |
* | |
* Pin D2 -> Arduino Interruption | |
* Pin D7 -> Buzzer | |
* Pin D8 -> Led | |
* Pin D9 -> External Interruption to connect other Arduino/Raspberry | |
* | |
*/ | |
#define LOG_PERIOD 20000 //Logging period in milliseconds |
This file contains 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/python | |
import RPi.GPIO as GPIO | |
import time | |
LOG_PERIOD = 20000 | |
MINUTE_PERIOD = 60000 | |
counts = 0 | |
cpm = 0 |
This file contains 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
/** | |
* ATtiny85 as an I2C Slave | |
* ATtiny I2C slave receiving and sending data to a RaspberryPi master. | |
* | |
* ATTiny Pin 1 = (RESET) N/U ATTiny Pin 2 = (D3) BUZZER) | |
* ATTiny Pin 3 = (D4) to LED1 ATTiny Pin 4 = GND | |
* ATTiny Pin 5 = I2C SDA ATTiny Pin 6 = (D1) to LED2 | |
* ATTiny Pin 7 = I2C SCL ATTiny Pin 8 = VCC (2.7-5.5V) | |
* | |
* Use pullups on the SDA & SCL lines! (4k7) |
This file contains 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/python | |
import smbus | |
import time | |
# This is the address we setup in the Arduino Program | |
address = 0x2d | |
def writeNumber(value): |
This file contains 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
/////// RopeNode.h | |
#import "cocos2d.h" | |
#import "ObjectiveChipmunk.h" | |
struct RopeNodeParticle; | |
@interface RopeNode : CCNode { | |
ChipmunkBody *_body1, *_body2; | |
cpVect _offset1, _offset2; |
This file contains 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
/* | |
let imageColor : UIImage! = UIImage.imageWithColor(UIColor.redColor()) | |
"UINavigationBar" => imageColor | |
*/ | |
import Foundation | |
import UIKit |
This file contains 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
// | |
// SMSync.swift | |
// TableExample | |
// | |
// Created by sid on 11/08/14. | |
// Copyright (c) 2014 Sergio Martinez-Losa. All rights reserved. | |
// | |
import Foundation |
This file contains 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
# You may uncomment the following lines if you want `ls' to be colorized: | |
export LS_OPTIONS='--color=auto' | |
eval "`dircolors`" | |
alias ls='ls $LS_OPTIONS' | |
alias ll='ls $LS_OPTIONS -l' | |
alias l='ls $LS_OPTIONS -lA' | |
# | |
# Some more alias to avoid making mistakes: | |
# alias rm='rm -i' | |
# alias cp='cp -i' |