Tufts Hybrid Racing Control Node

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ControlNode.h Source File

ControlNode.h

00001 /*
00002  * File: ControlNode/ControlNode.h
00003  * Author: William Jessup Salisbury
00004  * Company: Tufts Hybrid Racing Team
00005  * Copyright: CC BY-NC-SA 3.0
00006  * Date: 1/12/2012
00007  */
00008 
00009 #ifndef CONTROL_NODE_H
00010 #define CONTROL_NODE_H
00011 
00012 #include "mbed.h"
00013 
00014 const PinName CAN_RX = p30;
00015 const PinName CAN_TX = p29;
00016 
00017 const int tickerTimeout_us = 1000000;
00018 
00019 class ControlNode {
00020 public:
00021     ControlNode();
00022     ~ControlNode();
00023     void Init();
00024 private:
00025     void canReset();
00026     void canSync();
00027     void canSend();
00028     void canReceive();
00029 
00030     CAN _can;
00031     Serial _console;
00032     Ticker _syncTimer;
00033     char _syncID;
00034 };
00035 
00036 #endif