Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- smallstone
- Date:
- 2019-11-10
- Revision:
- 1:293b11fbc576
- Parent:
- 0:1b294da0842e
- Child:
- 2:ea39c24e77b2
File content as of revision 1:293b11fbc576:
#include "mbed.h"
#include "TB6612.h"
TB6612 motor1(p24,p29,p30); //pwma,AIN1,AIN2,can brake//
TB6612 motor2(p23,p28,p27); //pwmb,BIN1,BIN2,can brake//
int main() {
motor1=100; //移動最初1000㎜直進
motor2=100;
wait(6);
motor1=100;
motor2=100;
//nichrome2();
//drill_spinner();
//seed_spinner();
//splash();
motor1=100; //200mm直進する
motor2=100;
wait(12);
motor1=0;
motor2=0; //耕し終了
//nichrome3();
motor1=50; //100mm直進する
motor2=50;
wait(6);
motor1=50; //90°左旋回
motor2=0;
wait(2);
motor1=50; //200mm直進する
motor2=50;
wait(12);
motor1=50; //90°左旋回
motor2=0;
wait(2);
motor1=50; //300mm直進する
motor2=50;
wait(18);
motor1=50; //90°左旋回
motor2=0;
//camera on
}