(Note: This is another tutorial produced by my son about his new project)
This project is made possible by the amazing RBX Robotics Kit. It combines a button, a servo, and some rubber bands to launch projectiles over far distances.
Connect:
- Servo Brick to Port 2A
- Pushbutton Brick to Port 3B
Try out this code:
var sv = new Servo(PORT_2A);
var b = new Pushbutton(PORT_3B);
var e = true;
while (true) {
if (b.clicked()) {
if (e) {
e = false
sv.setPos(90);
}
else {
e = true
sv.setPos(180);
}
}
delay(20);
}
Watch this video showing the catapult's abilities: