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 "FastAccelStepper.h" | |
// As in StepperDemo for Motor 1 on AVR | |
#define dirPinStepper 2 | |
#define enablePinStepper 6 | |
#define stepPinStepper 9 // OC1A in case of AVR | |
FastAccelStepperEngine engine = FastAccelStepperEngine(); | |
FastAccelStepper *stepper = NULL; | |
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
public class VolumeCalc { | |
public static void main(String []args){ | |
// Declare Variables | |
double radius = 10; | |
double volume = 0; | |
//While the radius is less than 200 |
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
public class ThreeSphereCalc{ | |
public static void main(String []args){ | |
final double PI = 3.14159265358979; | |
double radius = 10; | |
double volume = 4.0/3.0*PI*radius*radius*radius; | |
System.out.println("The sphere with a radius of "+radius+" has a volume of " + volume); | |
radius = 20; | |
volume = 4.0/3.0*PI*radius*radius*radius; | |
System.out.println("The sphere with a radius of "+radius+" has a volume of " + volume); |