![]() #pragma config(Sensor, S2, colorSensor1, sensorEV3_Color) } #pragma config(Sensor, S1, touchSensor, sensorEV3_Touch) Start RobotC then click on the New File button from the button bar. If you want to configure the Ultrasonic sensor on port 4, call it: ultrasonicSensor When configuring color sensor on port 3, just give it the name "colorSensor2". When configuring color sensor on port 2, just give it the name "colorSensor1". When configuring touch sensor on port 1, just give it the name "touchSensor". When configuring motor C, just give it the name "C". When configuring motor B, just give it the name "B". Configure two light sensors on ports 2 and 3 and a touch sensor on port 1. Go to the Motors and Sensors setup and configure two motors: B and C. Follow them in order-so that you'll know what to do when you have to write your own programs some day. Try not to just jump to the end of the lesson and copy the whole program. You will write a program according to the instructions below. This exercise requires you to be in front of a computer with RobotC and a Mindstorms robot. ![]() The goal of this exercise is to be able to create the necessary functions to control a robot using the joystick. Playbook: Joystick Programming - The Exercise Purpose: Learning how to program based on input from devices. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |