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; | |
| VarSpeedServo RightHip; |
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; |
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
| #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
| #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
| /* | |
| * 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
| /* | |
| * 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
| //#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
| /* | |
| Shift Register Example | |
| for 74HC595 shift register | |
| */ | |
| //Pin connected to latch pin (ST_CP) of 74HC595 | |
| const int latchPin = 13; | |
| //Pin connected to clock pin (SH_CP) of 74HC595 | |
| const int clockPin = 12; | |
| ////Pin connected to Data in (DS) of 74HC595 |
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
| // see http://people.ece.cornell.edu/land/courses/ece4760/labs/s2012/Sched1GCC644.c | |
| // see http://people.ece.cornell.edu/land/courses/ece4760/Timers/index.html | |
| //********************************************************** | |
| //timer 0 compare ISR | |
| ISR (TIMER0_COMPA_vect) | |
| { | |
| // Called every millis | |
| // 75 cycles in |