1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00
Arduino/hardware/arduino/avr/libraries/Robot_Control/ArduinoRobot.cpp
Cristian Maglie 3394f61276 Merged 1.0.5
2013-05-29 18:30:36 +02:00

40 lines
743 B
C++

#include "ArduinoRobot.h"
#include "Multiplexer.h"
#include "Wire.h"
#include "EasyTransfer2.h"
//RobotControl::RobotControl(){}
RobotControl::RobotControl():Arduino_LCD(LCD_CS,DC_LCD,RST_LCD){
}
void RobotControl::begin(){
Wire.begin();
//Compass
//nothing here
//TK sensors
uint8_t MuxPins[]={MUXA,MUXB,MUXC,MUXD};
Multiplexer::begin(MuxPins,MUX_IN,4);
//piezo
pinMode(BUZZ,OUTPUT);
//communication
Serial1.begin(9600);
messageOut.begin(&Serial1);
messageIn.begin(&Serial1);
//TFT initialization
//Arduino_LCD::initR(INITR_GREENTAB);
}
void RobotControl::setMode(uint8_t mode){
messageOut.writeByte(COMMAND_SWITCH_MODE);
messageOut.writeByte(mode);
messageOut.sendData();
}
RobotControl Robot=RobotControl();