예제 #1
0
파일: main.c 프로젝트: zhiyb/Il-Matto
void init(void)
{
	DDRB &= 0xF3;			// Disable USB Port
	PORTB &= 0xF3;
	DDRB |= 0x80;			// LED
	PORTB |= 0x80;
	Sound_init();
	ROE_init();
	TFT_init();
	Timer_init();
	Tetris_mem_init();
	eeprom_counter_increment();
	srand(eeprom_counter());
	eeprom_done();
	Print_frame();
	Tetris_init();
}
예제 #2
0
void factory(){



	/****start Director part init****/
	
RunnerRobot_init(&mRunnerRobot);
Running_init(&mRunning);

	/****end Director part init****/

	


//Sector_init(&mSector);

/****start detectionPart part objects****/
Notice_init(&mNotice);
LocationInfo_init(&mLocationInfo);

Battery_init(&mBattery);
Coordinates_init(&mCoordinates);
DetcMarker_init(&mDetcMarker);
DetcObst_init(&mDetcObst);
Gradient_init(&mGradient);
LineEdge_init(&mLineEdge);
RunDist_init(&mRunDist);
RunStartSigRecv_init(&mRunStartSigRecv);
Timer_init(&mTimer);
TurnAngle_init(&mTurnAngle);

/****end dectionPart part objects****/



/****start Driven part init****/
CurvatureCtrl_init(&mCurvatureCtrl);
ForwardValRevise_init(&mForwardValRevise);
LightValCtrl_init(&mLightValCtrl);
RobotDrivenDirect_init(&mRobotDrivenDirect);
TailAngleCtrl_init(&mTailAngleCtrl);
WheelMotor_init(&rightWheelMotor,NXT_PORT_B);
WheelMotor_init(&leftWheelMotor,NXT_PORT_C);
WheelMotorCtrl_init(&mWheelMotorCtrl);
/****end Driven part init****/




/****start Strategy part init****/


//test object

/****end Strategy part init****/



/****start create NXT HarDware init****/
LightSensor_init(&mLightSensor);
TouchSensor_init(&mTouchSensor);
GyroSensor_init(&mGyroSensor);
Sound_init(&mSound);
MotorEncoder_init(&rightMotorEncoder,NXT_PORT_B);
MotorEncoder_init(&leftMotorEncoder,NXT_PORT_C);
SonorSensor_init(&mSonorSensor,NXT_PORT_S2);
Timer_init(&mTimer);

/****end create NXT HarDware init****/
}