mbed robotracer for education.

Robotracer (line follower robot ) using stepper motor.

/media/uploads/hayama/cimg8463.jpg

/media/uploads/hayama/mbedrobotracer-manual-english.pdf

/media/uploads/hayama/mbedrobotracer-manual-japanese.pdf

/media/uploads/hayama/eagle-design-robotracer.zip

movie -> https://www.youtube.com/watch?v=INwun8gSds4

(for competition->) https://www.youtube.com/watch?v=l_gP2pUt4w0

Committer:
hayama
Date:
Wed Oct 02 01:09:55 2013 +0000
Revision:
1:200aad416161
Parent:
0:da22b0b4395a
mbed robotracer for education.
;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hayama 0:da22b0b4395a 1 /* mbed Microcontroller Library
hayama 0:da22b0b4395a 2 * Copyright (c) 2006-2013 ARM Limited
hayama 0:da22b0b4395a 3 *
hayama 0:da22b0b4395a 4 * Licensed under the Apache License, Version 2.0 (the "License");
hayama 0:da22b0b4395a 5 * you may not use this file except in compliance with the License.
hayama 0:da22b0b4395a 6 * You may obtain a copy of the License at
hayama 0:da22b0b4395a 7 *
hayama 0:da22b0b4395a 8 * http://www.apache.org/licenses/LICENSE-2.0
hayama 0:da22b0b4395a 9 *
hayama 0:da22b0b4395a 10 * Unless required by applicable law or agreed to in writing, software
hayama 0:da22b0b4395a 11 * distributed under the License is distributed on an "AS IS" BASIS,
hayama 0:da22b0b4395a 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
hayama 0:da22b0b4395a 13 * See the License for the specific language governing permissions and
hayama 0:da22b0b4395a 14 * limitations under the License.
hayama 0:da22b0b4395a 15 */
hayama 0:da22b0b4395a 16 #ifndef MBED_DEBUG_H
hayama 0:da22b0b4395a 17 #define MBED_DEBUG_H
hayama 0:da22b0b4395a 18 #include "device.h"
hayama 0:da22b0b4395a 19
hayama 0:da22b0b4395a 20 #ifdef __cplusplus
hayama 0:da22b0b4395a 21 extern "C" {
hayama 0:da22b0b4395a 22 #endif
hayama 0:da22b0b4395a 23
hayama 0:da22b0b4395a 24 #ifdef DEVICE_STDIO_MESSAGES
hayama 0:da22b0b4395a 25 #include <stdio.h>
hayama 0:da22b0b4395a 26 #include <stdarg.h>
hayama 0:da22b0b4395a 27
hayama 0:da22b0b4395a 28 /** Output a debug message
hayama 0:da22b0b4395a 29 *
hayama 0:da22b0b4395a 30 * @param format printf-style format string, followed by variables
hayama 0:da22b0b4395a 31 */
hayama 0:da22b0b4395a 32 static inline void debug(const char *format, ...) {
hayama 0:da22b0b4395a 33 va_list args;
hayama 0:da22b0b4395a 34 va_start(args, format);
hayama 0:da22b0b4395a 35 vfprintf(stderr, format, args);
hayama 0:da22b0b4395a 36 va_end(args);
hayama 0:da22b0b4395a 37 }
hayama 0:da22b0b4395a 38
hayama 0:da22b0b4395a 39 /** Conditionally output a debug message
hayama 0:da22b0b4395a 40 *
hayama 0:da22b0b4395a 41 * NOTE: If the condition is constant false (!= 1) and the compiler optimization
hayama 0:da22b0b4395a 42 * level is greater than 0, then the whole function will be compiled away.
hayama 0:da22b0b4395a 43 *
hayama 0:da22b0b4395a 44 * @param condition output only if condition is true (== 1)
hayama 0:da22b0b4395a 45 * @param format printf-style format string, followed by variables
hayama 0:da22b0b4395a 46 */
hayama 0:da22b0b4395a 47 static inline void debug_if(int condition, const char *format, ...) {
hayama 0:da22b0b4395a 48 if (condition == 1) {
hayama 0:da22b0b4395a 49 va_list args;
hayama 0:da22b0b4395a 50 va_start(args, format);
hayama 0:da22b0b4395a 51 vfprintf(stderr, format, args);
hayama 0:da22b0b4395a 52 va_end(args);
hayama 0:da22b0b4395a 53 }
hayama 0:da22b0b4395a 54 }
hayama 0:da22b0b4395a 55
hayama 0:da22b0b4395a 56 #else
hayama 0:da22b0b4395a 57 static inline void debug(const char *format, ...) {}
hayama 0:da22b0b4395a 58 static inline void debug_if(int condition, const char *format, ...) {}
hayama 0:da22b0b4395a 59
hayama 0:da22b0b4395a 60 #endif
hayama 0:da22b0b4395a 61
hayama 0:da22b0b4395a 62 #ifdef __cplusplus
hayama 0:da22b0b4395a 63 }
hayama 0:da22b0b4395a 64 #endif
hayama 0:da22b0b4395a 65
hayama 0:da22b0b4395a 66 #endif