Things used in this project

Hardware components:
Photon new
Particle Photon
×2
RC Car 1/18 scale 4WD Off Road Short Truck
×1
11026 02
Jumper wires (generic)
×10
1434509556 android phone color
Android device
×1
OSEPP Motor Driver Module
×1
09590 01
LED (generic)
×16
Mfr 25frf52 100r sml
Resistor 100 ohm
×2
12002 04
Breadboard (generic)
×1
Double sided Tape
×1
14 Gauge Wire
×1
18 Gauge Wire
×1
22 Gauge Single Strand Wire
×1
Heat Shrink (Various Sizes)
×1
Software apps and online services:
Blynk logo avatars
Blynk
Particle IDE
Hand tools and fabrication machines:
Phillips Head Screwdriver PH1 1/4" 3mm
Wire Cutter/Stripper
09507 01
Soldering iron (generic)
Heat Gun
3/16" Drill Bit
Electric Drill

Schematics

Circuit Diagram
This is a circuit diagram made in Fritzing. It is an free circuit drawing tool that had the Particle Photon and the L298N Motor Controller already in it's library of components. Note that I only show one led for each turn signal when in reality there are 8 for each side of the car. Also the onboard 9.6V Ni-Cd battery is represented by a 9V battery in this case.
Final circuit diagram wfmanagfmj

Code

Subscribe CodeArduino
This is the Subscribe Code, on the Second Photon to trigger the turn signals. For More Clarification on the Code in this project, see 29:25 of video linked in story for more info.
int led = D7;
int out = D0;
int out2 = D6;

void setup() {
    pinMode(led, OUTPUT);
    pinMode(out, OUTPUT);
    pinMode(out2, OUTPUT);
    digitalWrite(led,LOW);
    digitalWrite(out,LOW);
    digitalWrite(out2,LOW);
    
    
    Particle.subscribe("LEFT", responseLeft, "**************************");
    Particle.subscribe("RIGHT", responseRight, "************************");
    

}

void responseLeft(const char *event, const char *data){
    digitalWrite(led, HIGH);
    delay(100);
    digitalWrite(led,LOW);
    delay(100);
    digitalWrite(out,HIGH);
    delay(100);
    digitalWrite(out,LOW);
    delay(100);
}

void responseRight(const char *event, const char *data){
    digitalWrite(led, HIGH);
    delay(100);
    digitalWrite(led,LOW);
    delay(100);
    digitalWrite(out2,HIGH);
    delay(100);
    digitalWrite(out2,LOW);
    delay(100);
}

void loop() {
    

}
Publish Arduino
This is the Publish Code, on the First Photon. For More Clarification on the Code in this project, see 29:25 of video linked in story for more info.
// This #include statement was automatically added by the Particle IDE.


int ledPinD5=D5;
int ledPinD4=D4;


unsigned long lastTime1 = 0;
unsigned long lastTime2 = 0;
const long interval =600;

#define BLYNK_PRINT Serial  
#include <blynk.h>


char auth[] = "*****************************";

void setup() 

{
	Serial.begin(9600);
	
	 delay(5000); // Allow board to settle

    Blynk.begin(auth);
	
}

void loop() {
    
    unsigned long now = millis();
    Blynk.run();
    
    
	
	if (((now - lastTime1) >= interval) && digitalRead(ledPinD5)==HIGH ){
	    
		lastTime1 = now;
		Particle.publish("LEFT","NASCAR",PUBLIC);
		
	}
	
	if (((now - lastTime2) >= interval) && digitalRead(ledPinD4)==HIGH ){
	    
		lastTime2 = now;
		Particle.publish("RIGHT","NOT-NASCAR",PUBLIC);
		
	}
	
	
	
}

Credits

Cobra screensaver aemsnyderw
Trenton L.
1 project • 0 followers
MEGR 3171-001
Contact
22448454 1458222247547029 6602260505408319295 n
James Page
0 projects • 0 followers
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login