jueves, 1 de junio de 2023

Vexcode

 


myVariable = 0

def when_started1():
global myVariable
drivetrain.turn_for(LEFT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 200, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
pen.move(DOWN)
brain.set_print_color(BLACK)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.turn_for(RIGHT, 45, DEGREES)
drivetrain.drive_for(FORWARD, 560, MM)
drivetrain.turn_for(LEFT, 225, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 135, DEGREES)
drivetrain.drive_for(FORWARD, 560, MM)

vr_thread(when_started1)

jueves, 25 de mayo de 2023

Programación de vexcode II

 






myVariable = 0

def when_started1():
global myVariable
drivetrain.turn_for(LEFT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_to_heading(360, DEGREES)
drivetrain.drive_for(REVERSE, 200, MM)
pen.move(DOWN)
pen.fill(0, 0, 0, 100)
drivetrain.drive_for(FORWARD, 600, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 600, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 600, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 600, MM)
drivetrain.drive_for(REVERSE, 200, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 200, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 200, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 200, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 400, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 600, MM)
drivetrain.turn_for(RIGHT, 45, DEGREES)
drivetrain.drive_for(FORWARD, 435, MM)
drivetrain.turn_for(RIGHT, 90, DEGREES)
drivetrain.drive_for(FORWARD, 500, MM)

vr_thread(when_started1)

MakeCode: componemos una canción