Hi Melissa,
Do you have a link to your software code? That’s the most critical thing to be able to check.
Hi Melissa,
Do you have a link to your software code? That’s the most critical thing to be able to check.
I sure do - it is this file: Blinking_light_V2.ino at this thingiverse page: OpenRC F1 Blinking Rainlight V2.0 - Controllable from remote by Citrushund - Thingiverse
Hi Melissa,
You’ll want to hook the LED up to pin 13 rather than 3.3V, otherwise, that all looks good. Make sure to let us know how you go with it.
// Blinking light V2.0 for the OpenRC F1 by Daniel Noree
// This is not a sophisticated way to do the blinking but it's the easy way.
// Not for educational purpose, it's for fun.
#include "Arduino.h"
#define TXPIN 2
#define LED 13
int tx; // Transmitter Input
static unsigned int state;
void setup() {
// put your setup code here, to run once:
pinMode(TXPIN, INPUT); // Set the tx input pin
pinMode(LED, OUTPUT);
state = 0;
// Serial.begin(9600); // Start serial
}
void loop() {
switch (state)
{
case 0:
//Serial.println("Case = 0");
// LED off.
digitalWrite(LED, LOW);
break;
case 1:
//Serial.println("Case = 1");
// Slow blinking light.
digitalWrite(LED, HIGH);
delay(200);
digitalWrite(LED, LOW);
delay(200);
break;
}
tx = pulseIn(TXPIN, HIGH, 25000); // Read pulse from Tx
delay(50);
if (tx > 1700)
{state = 1;}
else
{state = 0;}
}
In my photo, I showed power to led (red, positive) in 13. Is that what you mean?
Exactly,
Otherwise, it will just be on constantly.
Well…I don’t know how I did it, but I did it!!
I connected the mini board to the programmer and then to my computer and tried to upload code. Got a heap of error messages, so thought I’d better plug it into the RC car battery for some power…and the light started flashing!! Dunno what I did/didn’t do right?!
Anyway, the car is now finished. Thanks for all your help. I’ve attached a photo of the finished car. Video of light here: Dropbox - IMG_0891.MOV - Simplify your life
That’s amazing Melissa! The car looks brilliant! If you need anything else please let us know.