Code Monkey home page Code Monkey logo

climbrobot's Introduction

ClimbRobot

Climbing Robot DPS code We use the chip ESP8266 to connect the DSP with WIFI ESP8266
Starting for ESP8266
When you have a new ESP8266, you should configure it at first with AT commands. AT commands set
Firstly, you need a serial port debugging tool to configure, like this one.
Connecting the ESP with computer via an USB-232 port, and then you can operate the chip by AT commands. Such as set IP Address, check the connection.

code for ESP8266

   //SCIC for debug ESP chip by computer
   // Connect to the Router
   msg = "AT+CWJAP=\"Robotics Lab 518a\",\"ccny10031\"\r\n\0"; // if you change a router, then change the name and password
   scic_msg(msg); // connect scic with computer, you can see the feedback from ESP on computer
   scib_msg(msg);
   DELAY_US(5000000); //等待微妙 wait for some microseconds

   //Set by TCP multiple connections
   msg = "AT+CIPMUX=1\r\n\0";
   scic_msg(msg);
   scib_msg(msg);
   DELAY_US(100000); //等待微妙 wait for some microseconds

   //Set ESP as server, port=8888
   msg = "AT+CIPSERVER=1,8888\r\n\0";
   scic_msg(msg);
   scib_msg(msg);
   DELAY_US(100000); //等待微妙 wait for some microseconds

   // Get IP Address, if you connect with computer and open scic, you will see the IP address on computer
   msg = "AT+CIFSR\r\n\0";
   scic_msg(msg);
   scib_msg(msg);

For ESP8266

Pin Layout

ESP8266 DSP
TX RX
GND GND
CH_PD 3.3V
VCC 3.3V
RX TX

ESP8266 configuration

Firstly, we can the USB module to test ESP8266 and configure it.

image

The default baud rate of ESP is 115200.

Commutation Protocol

FORWARD       = 0xFF, 0x00, 0x01, 0x00, 0xFE
BACKWARD      = 0xFF, 0x00, 0x02, 0x00, 0xFE
STOP          = 0xFF, 0x00, 0x00, 0x00, 0xFE
LEFT          = 0xFF, 0x00, 0x04, 0x00, 0xFE
RIGHT         = 0xFF, 0x00, 0x08, 0x00, 0xFE
SUCTION_ON    = 0xFF, 0x01, 0x01, 0x00, 0xFE
SUCTION_OFF   = 0xFF, 0x01, 0x00, 0x00, 0xFE
SERVO         = 0xFF, 0x04, 0x00, 0x01, 0xFE
motion_speed  = 0xFF, 0x05, 0x01, 0x32, 0xFE
suction_speed = 0xFF, 0x05, 0x02, 0x32, 0xFE

Quick Start

1.Install CCS and controlSUITE 2.Downdload code form ClimbRobot 3.Import the project to CCS 4.Configure the project. Right click on the name of project and choose "Properties", configure “Include Options”. Find out "F2837xS_common\include" and "F2837xS_headers\include" in your installation directory of controlSUITE. Include Options

Set file search path "F2837xS_common\cmd" and "F2837xS_headers\cmd" to installation directory of controlSUITE. file search path

5.Build and download, test the code

JTAG emulator

The JTAG emulator is XDS100v2 XDS100v2

State Machine

state 0: moving state

sub-state operation
0 halt
1 move forward
2 move backward
4 turn left
8 turn right

state 1: suction motor operation

sub-state operation
sub state:
0 stop
1 start

state 4 : servo operation

sub-state operation
0 middle
1 low
2 high

state 5 : setting speed

sub-state operation
1 set wheel speed
2 set suction motor speed

climbrobot's People

Contributors

liuzhaoming5954 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.