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
// Inverted pendulum (self balancing robot) | |
int i = 0; // Iteration counter | |
byte countS = 0; // ?? | |
double zeroOmegaI = 0; // ?? | |
double recOmegaI[10]; // ?? | |
double omegaI = 0; // Rotational velocity | |
double thetaI = 0; // Rotational angle | |
double sumPower = 0; // ?? | |
double sumSumP = 0; // ?? | |
const double kAngle = 2.5; // (54/200) |
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
package csc171.workshop; | |
import java.io.*; | |
public class Main { | |
public static void main(String[] args) throws IOException, FileNotFoundException { | |
// P1 | |
writeHelloWorld(); | |
readHelloWorld(); |
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
/** | |
* This class is just a helper package to get the screen dimensions | |
*/ | |
public class ScreenSizeUtils { | |
// helper classes | |
private Context mContext; | |
private WindowManager mWm; | |
private Display mDisplay; | |
private Configuration mConfig; |
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
clc | |
sum = 0; | |
player = 1; | |
while (sum < 10) | |
choice = -1; | |
fprintf('Player %i\n', player); |
NewerOlder