source: rtos_arduino/trunk/arduino_lib/libraries/Robot_Control/src/ArduinoRobot.cpp@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 743 bytes
Line 
1#include "ArduinoRobot.h"
2#include "Multiplexer.h"
3#include "Wire.h"
4#include "EasyTransfer2.h"
5
6//RobotControl::RobotControl(){}
7
8RobotControl::RobotControl():Arduino_LCD(LCD_CS,DC_LCD,RST_LCD){
9
10}
11
12void RobotControl::begin(){
13 Wire.begin();
14 //Compass
15 //nothing here
16
17 //TK sensors
18 uint8_t MuxPins[]={MUXA,MUXB,MUXC,MUXD};
19 Multiplexer::begin(MuxPins,MUX_IN,4);
20
21 //piezo
22 pinMode(BUZZ,OUTPUT);
23
24 //communication
25 Serial1.begin(9600);
26 messageOut.begin(&Serial1);
27 messageIn.begin(&Serial1);
28
29 //TFT initialization
30 //Arduino_LCD::initR(INITR_GREENTAB);
31}
32
33void RobotControl::setMode(uint8_t mode){
34 messageOut.writeByte(COMMAND_SWITCH_MODE);
35 messageOut.writeByte(mode);
36 messageOut.sendData();
37}
38
39
40RobotControl Robot=RobotControl();
Note: See TracBrowser for help on using the repository browser.