Coding: Difference between revisions
Line 10: | Line 10: | ||
==Current Available Sensors== | ==Current Available Sensors== | ||
Sensors are programmable parts that allow a robot to interpret the physical world into processable data. You could think of them as the robot equivalent to our eyes or ears. The robot can be instructed via code to take actions based on the sensor data it receives, which is what allows a robot to complete tasks on its own (like delivering a sandwich across a crowded restaurant or launching a soda can across a room). | |||
Because there are so many different tasks and environments to tackle in RoboCo, we wanted to start with a wide variety of sensors! The ones that are currently available to players are listed below: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- |
Revision as of 22:05, 7 July 2022
Getting Started
Programming is difficult, especially when you don't know where to start. For those without access to programming classes or extracurriculars via their learning institution, we recommend CodeAcademy's Learning Python. This course is a great way to learn the fundamentals of Python AND is fully virtual, so you can take the class wherever or whenever you want!
In addition to learning the language, you'll also need a program to code in. We recommend Visual Studio Code and its accompanying Python extension. This is actually the program we use write code for RoboCo and it comes with a variety of different customization options and extensions to fit all your coding needs (including Java and C+)! You can also try Notepad++ and Sublime if Visual Studio Code doesn't interest you.
Additionally, RoboCo requires players to use its custom API Documentation. This is the way in which players "talk" to their robots and includes instructions for how to program the different sensors and other controllable parts within the game. You can access the API here or by clicking the API button in the Microcontroller interface within RoboCo.
Current Available Sensors
Sensors are programmable parts that allow a robot to interpret the physical world into processable data. You could think of them as the robot equivalent to our eyes or ears. The robot can be instructed via code to take actions based on the sensor data it receives, which is what allows a robot to complete tasks on its own (like delivering a sandwich across a crowded restaurant or launching a soda can across a room).
Because there are so many different tasks and environments to tackle in RoboCo, we wanted to start with a wide variety of sensors! The ones that are currently available to players are listed below:
Name | Icon | Description |
---|---|---|
Touch Sensor | A part that sense touch input | |
Force Sensor | A part that senses the forces applied to it along 6 axes | |
Inertial Sensor / IMU | A sensor for measuring acceleration, rotation, and angular velocity | |
Distance Sensor | A part that senses the distance to the first object it encounters | |
Color Sensor | A camera that senses the color in front of it |
How to Load a New or Completed Script
How to Map Ports
Step | Description | Example |
---|---|---|
Step 1 | Add the microcontroller to your robot to access the script interface | |
Step 2 | Choose to either create a new script or load an already-created script | |
Step 3 | Assign your parts to ports manually or use the “automatically assign” button | |
Step 4 | Press the play button (or spacebar) | |
Step 5 | If an error occurs, use the in-game debug console to fix your code |
Troubleshooting
If you're having trouble getting your robot to work, please join our Official RoboCo Discord and submit your questions to the #coding-and-automation-help-desk channel. Once submitted, one of our developers or equally knowledgeable Discord members should be available to help you with your code. Keep in mind though, if you're looking for help from a developer or one of our staff specifically, that we operate on a 9 AM to 5 PM CST work schedule and similarly aren't at our desks Saturday or Sunday. However, we will do our best to answer you within 24 hours of your request!