globalrevweek13

parent dee665cb
Pipeline #111141 passed with stage
in 54 seconds
Italo
Italo-pc
01.07.2019 17:45.04
Italo
Italo-pc
01.07.2019 17:32.08
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
int xVal; //X values from joystick
int yVal; //Y values from joystick
void setup() {
Serial.begin(9600); //Starts serial at 9600 baud
pinMode(A0, INPUT); //Sets the analog ports used to an input
pinMode(A1, INPUT);
int motor1=7;
int motor2=8;
int puls=1;
int i;
void setup()
{
//Inicializamos los pins de salida
pinMode(motor1,OUTPUT);
pinMode(motor2, OUTPUT);
}
void loop()
{
for (0; i<1023; +1) {
// statement(s);
delay(100);
}
for (1023; i<0; -1) {
// statement(s);
delay(100);
}
void loop() {
xVal = analogRead(A0); //sets the X value
yVal = analogRead(A1); //sets the Y value
Serial.print(xVal);
Serial.print(yVal);} //prints Y values
analogWrite(motor1,i);
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment