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
import SimpleHTTPServer | |
import SocketServer | |
PORT = 8000 | |
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler | |
httpd = SocketServer.TCPServer(("", PORT), Handler) | |
print "serving at port", PORT |
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
// Put in Main File | |
#include "menu.h" | |
#include "auton.h" | |
void pre_auton() | |
{ | |
clearLCDLine(0); | |
clearLCDLine(1); | |
bLCDBacklight = true; | |
calibrateGyro(); |
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
// Update inteval (in mS) for the flywheel control loop | |
#define FW_LOOP_SPEED 25 | |
// Maximum power we want to send to the flywheel motors | |
#define FW_MAX_POWER 127 | |
// encoder counts per revolution depending on motor | |
#define MOTOR_TPR_269 240.448 | |
#define MOTOR_TPR_393R 261.333 | |
#define MOTOR_TPR_393S 392 |
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
/* The P is a really small value, so lets say the high speed is 80 and the low speed is 20, if you are 1000 rpm | |
* away it might go at 110 but as you get close it will decrease to 80, and if you are 1000 rpm above it would | |
* at 0 and as you get slower and approach the target speed you will get closer to 20 just going 127 and 0 will | |
* cause you to overshoot and drop over and over again, using P ontop of it will help reduce the amount of drop | |
* and overshoot while still having the fast recovery time of bang bang. | |
* | |
* Formula: highspeed + difference in rpm * P constant, lowspeed + differnece in rpm * P constant | |
*/ | |
float kP = 0.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
name = "Harrison" | |
age = 16 | |
hobbies = ["Robotics", "Programming", "Gaming", "Skiing"] | |
print(name + " Is " + str(age) + " Years Old") | |
for hobby in hobbies: | |
print(name + " likes: " + hobby) |
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
# Print a message to welcome the buyer | |
print("Welcome to Harrison's Movie Ticket Software!") | |
#Inputs To Check for how many people | |
k = input("Please enter the number of children: ") | |
a = input("Please enter the number of adults: ") | |
s = input("Please enter the number of seniors: ") | |
#Price Variables | |
kP = 10 |
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
print("Welcome to Harrison's Movie Ticket Software!\nWARNING: You May Only Have 4 Guests.") | |
p1a = input("Please enter the age of your first guest: ") | |
p2a = input("Please enter the age of your first guest: ") | |
p3a = input("Please enter the age of your first guest: ") | |
p4a = input("Please enter the age of your first guest: ") | |
guests = [p1a, p2a, p3a, p4a] |
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
def f(x): | |
return x**2 | |
print(str(f(4))) |
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
NSLog(@"Harrison") | |
NSString *firstName = @"Harrison"; | |
NSLog(firstName); | |
NSLog(@"Hello there, %@.", firstName); | |
NSLog(@"%@ %@", firstName, firstName); | |
NSString *lastName = @"Freni"; | |
NSLog(@"%@ %@", firstName, lastName); | |
NSNumber *age = @16; | |
NSLog(@"%@ is %@ years old", firstName, age); | |
NSArray *apps = @[@"AngryFowl", @"Lettertouch", @"Tweetrobot"]; |
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
. |
OlderNewer