⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 s_test.c

📁 scara机器人的一种简单的实现方法
💻 C
字号:
#include <graphics.h>
#include <process.h>
#include <conio.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "m_menu.h"
#include "mpu.h"
#include "scara.h"
#include "mpu_func.h"

void   RS_MPU_PORT_INIT(void);                     //RS-232C for MPU
int    RS_SEND(int byte_data);                     //MPU send data
struct read_data RS_RECEIVE(void);                 //MPU receive data
void   RS_SCARA_PORT_INIT(void);                   //RS-232C for SCARA
int    RS_SCARA_SEND(int byte_data);               //send data to SCARA
void   Ini_menu(void);
void   Draw_robot(void);
int    Mouse_treat(void);
int    Quit(void);
void   RCCDsp(int x,int y,float xt,float yt,
	      int z,int A1,int A2,int Color,char *s);
void   drawbutton(int left_x,int top_y,int right_x,int bottom_y,
		  int flag,int col);

void   Error_treatment(int state);
struct print_ch ch_from_data(float data);
struct three_data Sample(void);
struct angle_distance Angle_distance_calculation(void);
int    Cp_adjustment(void);
int    Menu_from_key(void);
int    Func_step_movement(int step);

int    standard;

void main ()
{
  int i;

  struct cal_point p_t;

  RS_SCARA_PORT_INIT();
  RS_MPU_PORT_INIT();
  clrscr();
  graph_ini();

  RS_SCARA_SEND(0);               //send data to SCARA
//  getch();

//  for (i=0; i<10; i++) {
  p_t.coordinate[0] = 44.15;
  p_t.coordinate[1] = 474.63;
  p_t.coordinate[2] = 0.1;
  p_t.coordinate[3] = 0.;


  Scara_move(p_t);

//  getch();
//  }

  return;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -