KENNY TAX SERVICES: PAY WITH YOUR REFUND, GET YOUR REFUND DIRECT DEPOSIT, FREE ESTIMATES, NO APPOINTMENTS NEEDED. OTHERS SERVICES: CELL PHONES / VENTAS DE CELULARES, PAY BILLS / PAGO DE BILLS, SEND MONEY / ENVIO DE DINERO, SHIPPING / ENVIO DE CAJAS. CALL OR VISIT US: 510 ARMORY ST. SPRINGFIELD, MA 01104 TELL. (413) 214-6136 FAX (413) 214-6133 EMAIL: KENNYTRAVEL12@YAHOO.COM

ARDUINO, MAKE A REMOTE CONTROLLING CAR

Valorado 3.00 sobre 5 basado en 1 puntuación de cliente
(4 valoraciones de clientes)

$0.00

//www.elegoo.com
//2016.09.23

#include <IRremote.h>
int receiverpin = 12;
int in1=6;
int in2=7;
int in3=8;
int in4=9;
int ENA=5;
int ENB=11;
int ABS=150;
unsigned long RED;
#define A 16736925

#define B 16754775

#define X 16712445

#define C 16720605

#define D 16761405

IRrecv irrecv(receiverpin);
decode_results results;

void _mForward()
{
digitalWrite(ENA,HIGH);
digitalWrite(ENB,HIGH);
digitalWrite(in1,HIGH);//digital output
digitalWrite(in2,LOW);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
Serial.println(“go forward!”);
}
void _mBack()
{
digitalWrite(ENA,HIGH);
digitalWrite(ENB,HIGH);
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
Serial.println(“go back!”);
}
void _mleft()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
Serial.println(“go left!”);
}
void _mright()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
Serial.println(“go right!”);
}
void _mStop()
{
digitalWrite(ENA,LOW);
digitalWrite(ENB,LOW);
Serial.println(“STOP!”);
}
void setup() {
// put your setup code here, to run once:
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(in3,OUTPUT);
pinMode(in4,OUTPUT);
pinMode(ENA,OUTPUT);
pinMode(ENB,OUTPUT);
pinMode(receiverpin,INPUT);
Serial.begin(9600);
_mStop();
irrecv.enableIRIn();
}

void loop() {
if (irrecv.decode(&results))
{

RED=results.value;
Serial.println(RED);
irrecv.resume();
delay(150);
if(RED==A)
{
_mForward();
}

else if(RED==B)
{
_mBack();
}

else if(RED==C)
{
_mleft();
}

else if(RED==D)
{
_mright();
}

else if(RED==X)
{
_mStop();
}
}
}

4 valoraciones en ARDUINO, MAKE A REMOTE CONTROLLING CAR

  1. I love the things you people are up to. This kind of smart effort and exposure! Keep up the amazing effort guys, I have you on my own house plans and designs web page.

    http://mobilartdesign.blogspot.com/2018/02/contoh-denah-rumah-minimalis-terbaru.html

  2. I constantly read your posts closely. I am furthermore interested in gadgets, you could talk about this at times. Have a great day!

    https://bluetoothtransmitters.wordpress.com/2018/02/20/what-is-an-fm-transmitter/

  3. She never live on her words, after getting full payment she will change her word and commitment, she wants only money and nothing else. God in subse jaise Doctors se hame bachaye

    https://www.elawoman.com/gurgaon/clinic/bourn-hall-clinic-gurgaon-sector-40

  4. Valorado en 3 de 5

    Buying Tadalafil Without A Prescription Cialis Pour Femme En Pharmacie Cytotec 200 Microgrammes Comprime Secable http://costofcial.com – cialis Decadron Mail Order Cialis Acheter En Ligne Viagra Cialis Online Lioresal Achat 25mg Propecia Medicine cialis Acticin Discount Without Perscription Overseas Kamagra Any Good Amoxicillin Resistance http://costofcial.com – cialis Priligy Ervaringen Levitra Savings Card Viagra Cialis Levitra Prezzo

Añadir una valoración