1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00
Arduino/libraries/Robot_Control/arch/avr/ArduinoRobot.cpp
2013-09-10 16:46:33 +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();