Keyestudio Smart Little Turtle Robot V3 Manual page 189

Table of Contents

Advertisement

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()
{
189

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents