/
Tutorials - Intro Page

Tutorials - Intro Page

Welcome to the CrcDuino system tutorial section

The objective of the tutorials is to present how to use CrcLib to program a CrcDuino interfaced with various sensors and actuators using typical use cases encountered in most CRC Robotics Competition robots.

Before digging into the tutorials, we recommend that you first familiarize yourselves with the following concepts:

Throughout, refer to the specific explanation page for each CrcLib functions to learn more about their use and details.

Tutorials

  1. Switch limited motor: Learn how to wire a limit switch and use its state to allow a continuous type 5V servo-motor to run.

  2. Delay() alternative: Learn how to cleanly mimic the Arduino-native Delay() function for the CrcDuino and send a timed position command to a standard type 5V servo-motor.

  3. I2C ultrasonic sensor: Learn how to interface with sensors communicating over the I2C protocol and monitor the distance measured by an ultrasonic sensor.

  4. Motor encoder: Learn how to wire a 12V motor controller, 12V motor and its quadrature encoder and use its feedback to stop the motor motion at a desired position.

  5. Sequential program structure: Learn how to easily structure a program to execute sequential actions. Recommending coding strategy for autonomous robots performing sequential actions. This program is shown implemented using IF statements, as well as a Switch Case statement. To be read along Tutorial 11.

  6. Tutorial concatenation: An example on how to sequentially execute tutorial 1 to 5 in a single program. This program is shown implemented using hardcoding, as well as function-based programming.

  7. Analog sensor: Learn how to interface with sensor returning their feedback using a variable DC voltage and monitor the distance measured by an ultrasonic sensor.

  8. Input debouncing and rising/falling edge detection: Learn how to overcome the problems caused by mechanical contact flickering on state change, as well as recognizing when an input goes from LOW to HIGH vs. HIGH to LOW.

  9. Function-based coding: Learn how to create your own functions for a CrcDuino (or any Arduino board) program.

  10. Library-based coding: Learn how to create your own library (a set of function that is written in a single place, but usable from multiple different .ino files) for a CrcDuino (or any Arduino board) program.

  11. Designing your robot with sequential action coding in mind: An explanation to the whys and hows of coding a robot designed to perform a pre-determined sequence of actions.

Related articles

Related content

Tutorial 04 - Motor encoder
Tutorial 04 - Motor encoder
Read with this
English Section - Introduction Page
English Section - Introduction Page
More like this
Getting Started Guide - Foreword
Getting Started Guide - Foreword
More like this
Understanding the CrcDuino system architecture
Understanding the CrcDuino system architecture
More like this
Tutorial 05 - Sequential program structure
Tutorial 05 - Sequential program structure
More like this
Système CrcDuino System
Système CrcDuino System
More like this