Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
animations.h
00001 /* University of York Robotics Laboratory PsiSwarm Library: Animations Header File 00002 * 00003 * Copyright 2016 University of York 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 00007 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS 00008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00009 * See the License for the specific language governing permissions and limitations under the License. 00010 * 00011 * Library of simple predetermined movements 00012 * 00013 * File: animations.h 00014 * [Was dances.h in version 0.7] 00015 * 00016 * (C) Dept. Electronics & Computer Science, University of York 00017 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis 00018 * 00019 * PsiSwarm Library Version: 0.8 00020 * 00021 * October 2016 00022 * 00023 * 00024 */ 00025 00026 #ifndef ANIMATIONS_H 00027 #define ANIMATIONS_H 00028 00029 /** 00030 * The Animations class contains simple predefined LED animations and dances 00031 */ 00032 class Animations{ 00033 public: 00034 /** 00035 * Make the robot vibrate (turn rapidly left & right) for approximately 1 second with LED flashes; restores LED states after action 00036 */ 00037 void vibrate(void); 00038 00039 /** 00040 * Patterns LEDs from back to front of robot 3 times then blinks at the front; animation takes about 1 second; restores LED states after action 00041 */ 00042 void led_run1(void); 00043 00044 /** 00045 * Sets the colour for single-colour LED animations (default = 1) 00046 * @param colour The colour LED to use in the animation (1 = red, 2 = green, 3 = orange) 00047 */ 00048 void set_colour(char colour); 00049 00050 private: 00051 char hold_colour; 00052 char animation_counter; 00053 Timeout animation_timeout; 00054 }; 00055 00056 #endif
Generated on Tue Jul 12 2022 21:11:24 by
1.7.2
