Skip to content

Teams code from the Newquay outing of the Mission to Mars: ByteSize work experience activity

License

Notifications You must be signed in to change notification settings

SoftwareCornwall/m2m-teams-bytesite-2018-newquay

Repository files navigation

Mission to Mars: ByteSize - Newquay 2018

Code created by the three teams at the Newquay outing for the Mission to Mars ByteSize program. Students were given the community created starter files and supported to complete the provided manoeuvrability challenges.

Students code is within the main.ino files, with some making tweaks and additions to the provided classes.

Results

The challenges come with a core coin reward, with the prizes being totted up via the teams dashboard.

alt text

Usage Instructions

Clone the project locally and check out the main.ino file for starters.

The following examples will help you to begin working with the rovers. Try adding some to the loop within the main.ino file. As you begin to develop your rover instruction set, you'll likely want to encapsulate these groups of instructions into functions.

Motor Usage

Motors Forwards

left_motor.forward(speed);
right_motor.forward(speed);

Motors Reverse

left_motor.reverse(speed);
right_motor.reverse(speed);

Turn off the motors

left_motor.stop();
right_motor.stop();

Distance Sensor Usage

Returns an integer value for the distance between the sensor and nearest object in cm. Note: There should be a minimum delay of 50ms between each ping of the sensor.

sensor.distance_forwards();
sensor.distance_down();

Light Sensor Usage

sensor.left_light_sensor();
sensor.center_light_sensor();
sensor.right_light_sensor();

Interrupt Usage

Returns an integer value for the number of pulses created by the hall effect sensor.

left_motor.get_pulse_count();
right_motor.get_pulse_count();

About

Teams code from the Newquay outing of the Mission to Mars: ByteSize work experience activity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages