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
volatile uint8_t position = 0; | |
uint8_t test = 0; | |
const byte outpin = 3; //Wire from 2 to 3 | |
const byte interruptPin = 2; | |
void setup() { | |
pinMode(outpin, OUTPUT); | |
pinMode(interruptPin, INPUT_PULLUP); | |
attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const e = React.createElement; | |
const rangestyle = { | |
width: '100%' | |
}; | |
class Compass extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { value: 180 } |
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
//A consecutive groupby in Linq and C# | |
//proof of concept for merging some date range like objects | |
//Based on https://www.daniweb.com/programming/software-development/code/488977/linq-consecutive-groupby | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsecutiveGroupBy { | |
public static class Extensions { |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Specialized; | |
using System.Threading.Tasks; | |
using Quartz; | |
using Quartz.Impl; | |
namespace QuartzSampleApp { | |
public class Program { |
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
module eye() { | |
shellsize = 16; | |
difference() { | |
union() { | |
scale([1,0.9,0.75]) | |
difference() { | |
sphere(r=shellsize); | |
sphere(r=shellsize-1.5); | |
translate([0,0,shellsize/2]) | |
cube([70,70,shellsize],center=true); |
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
#include "FastLED.h" | |
#define NUM_LEDS 14 | |
#define DATA_PIN 4 | |
CRGB leds[NUM_LEDS]; | |
void setup() { | |
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); | |
FastLED.clear(); |
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
An engineering team from Google | |
sought the help of a chap called McDoogle | |
they searched through lochness | |
their results were a mess | |
as all they could find was a poodle |
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
from RPIO import PWM | |
from time import sleep | |
servo = PWM.Servo() | |
# https://pythonhosted.org/RPIO/pwm_py.html | |
# BCM GPIO numbering | |
# From Arduino Servo library, standards are: | |
# min is 544, max is 2400 | |
# But for RPIO need to be in multiples of 10us |