189
www.keyestudio.com
Matrix myMatrix(A4,A5);
//Array, used to store the data of pattern, can be calculated by yourself or
obtained from the modulus tool
uint8_t matrix_heart[8]={0x66,0x99,0x81,0x81,0x42,0x24,0x18,0x00};
uint8_t matrix_smile[8]={0x42,0xa5,0xa5,0x00,0x00,0x24,0x18,0x00};
uint8_t matrix_front2[8]={0x18,0x24,0x42,0x99,0x24,0x42,0x81,0x00};
uint8_t matrix_back2[8]={0x00,0x81,0x42,0x24,0x99,0x42,0x24,0x18};
uint8_t matrix_left2[8]={0x48,0x24,0x12,0x09,0x09,0x12,0x24,0x48};
uint8_t matrix_right2[8]={0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12};
uint8_t matrix_stop2[8]={0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18};
uint8_t LEDArray[8];
const int left_ctrl = 4;//define the direction control pin of A motor
const int left_pwm = 5;//define the speed control of A motor
const int right_ctrl = 2;//define the direction control pin of B motor
const int right_pwm = 9;//define the speed control pin of B motor
#include <IRremote.h>//function library of IR remote control
int RECV_PIN = A0;//set the pin of IR receiver to A0
IRrecv irrecv(RECV_PIN);
long irr_val;
decode_results results;
void setup()
{
Содержание Smart Little Turtle Robot V3
Страница 5: ...5 www keyestudio com 1 Introduction...
Страница 16: ...16 www keyestudio com...
Страница 17: ...17 www keyestudio com...
Страница 18: ...18 www keyestudio com...
Страница 19: ...19 www keyestudio com...
Страница 22: ...22 www keyestudio com...
Страница 24: ...24 www keyestudio com...
Страница 25: ...25 www keyestudio com...
Страница 26: ...26 www keyestudio com...
Страница 28: ...28 www keyestudio com...
Страница 29: ...29 www keyestudio com...
Страница 30: ...30 www keyestudio com...
Страница 31: ...31 www keyestudio com Step 7 Hook up Guide...
Страница 32: ...32 www keyestudio com...
Страница 33: ...33 www keyestudio com...
Страница 44: ...44 www keyestudio com...
Страница 48: ...48 www keyestudio com 4 Arduino IDE Setting Click icon open Arduino IDE...
Страница 53: ...53 www keyestudio com Set board and COM port the corresponding board and COM port are...
Страница 54: ...54 www keyestudio com shown on the lower right of IDE Click to start compiling the program check errors...
Страница 55: ...55 www keyestudio com Click to upload the program upload successfully...
Страница 59: ...59 www keyestudio com...
Страница 60: ...60 www keyestudio com Then the libraries of turtle robot are installed successfully as shown below...
Страница 61: ...61 www keyestudio com 7 Projects The whole project begins with basic program Starting from simple to...
Страница 77: ...77 www keyestudio com 4 Connection Diagram 5 Test Code keyestudio smart turtle robot lesson 3 1...
Страница 96: ...96 www keyestudio com 5 Connection Diagram...
Страница 121: ...121 www keyestudio com 6 Then pop up the following page...
Страница 122: ...122 www keyestudio com 7 Click Read Notify WriteWithoutResponse to enter the following page...
Страница 124: ...124 www keyestudio com 10 Then click Write and open serial monitor to view if there is a 0 signal...
Страница 129: ...129 www keyestudio com...
Страница 143: ...143 www keyestudio com The definition inner pins are shown below...
Страница 159: ...159 www keyestudio com 3 Connection Diagram 4 Test Code...
Страница 167: ...167 www keyestudio com 2 Hook up Diagram...
Страница 187: ...187 www keyestudio com 8 8 LED matrix shows rightward icon Flow Chart 2 Hook up Diagram...
Страница 200: ...200 www keyestudio com 5 Click to enter the main page of turtle smart car...