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
//#define F_CPU 16000000L | |
#include <avr/io.h> | |
#include <util/delay.h> | |
#define PIN_DATA PB0 // DS | |
#define PIN_CLOCK PB1 // SH_CP | |
#define PIN_LATCH PB2 // ST_CP | |
// From Android.h |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<script type='application/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script> | |
<script type='application/javascript'> | |
$(document).ready(function() { |
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
#!/usr/bin/python | |
import time, signal, sys | |
from Adafruit_ADS1x15 import ADS1x15 | |
def signal_handler(signal, frame): | |
print 'You pressed Ctrl+C!' | |
sys.exit(0) | |
signal.signal(signal.SIGINT, signal_handler) | |
#print 'Press Ctrl+C to exit' |
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
// spi.c | |
// | |
// Example program for bcm2835 library | |
// Shows how to interface with SPI to transfer a byte to and from an SPI device | |
// | |
// After installing bcm2835, you can build this | |
// with something like: | |
// gcc -o spi spi.c -l bcm2835 | |
// sudo ./spi | |
// |
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
/* | |
* main.c | |
* ATmega328p port manipulation | |
*/ | |
/******************************************************************************** | |
Includes | |
********************************************************************************/ | |
#include <avr/io.h> |
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
/* | |
* main.c | |
* | |
* Created on: 19 Jan 2014 | |
* Author: peter | |
*/ | |
//#define F_CPU 16000000L | |
#include <avr/io.h> | |
#include <util/delay.h> |
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
#define F_CPU 16000000L | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int | |
main (void) | |
{ | |
DDRB |= _BV(DDB0); |
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
#include <NewPing.h> | |
#include <VirtualWire.h> | |
#define RF_TX_PIN 9 // Pin 12 is the default sender pin so change it here. | |
#define SONAR_NUM 2 // Number of sensors. | |
#define MAX_DISTANCE 500 // Maximum distance (in cm) to ping. | |
#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor 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
import pygame | |
from pygame.locals import * | |
class App: | |
def __init__(self): | |
pygame.init() | |
pygame.display.set_caption("Joystick Analyzer") | |
# Set up the joystick |
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
// https://github.com/netlabtoolkit/VarSpeedServo | |
#include <VarSpeedServo.h> | |
#define LEFT_ANKLE_CENTRE 90 | |
//Servo servo; | |
VarSpeedServo LeftHip; | |
VarSpeedServo LeftAnkle; |
NewerOlder