Welcome, %1$s. Please login or register. - Did you miss your activation email?

Login with username, password and session length
 

Author Topic: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights  (Read 11293 times)

Offline sfmodeller

  • Lieutenant
  • **
  • Posts: 34
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #45 on: September 07, 2015, 09:22:41 am »
Thanks, RossW.

Think I have it now. Had tried your suggestions, Arduino forum mostly talks about Yosemite. (Actually installed a 3rd driver set this morning as well, from a post on the Arduino forum.)

Had the board briefly working last night. Don't know how, and my computer shut iteslf down about 3 or 4 times (Your Mac is restarting because of a problem... screen came up each time.) Thought it was overheating, so I gave up and turned it off.

Long story short, got it to recognize by unplugging most of the USB stuff and checking for it in Systen Profiler.

Now it shows in Ports as dev.cu/wchusbserialfd140 - but it's very tempermental. Had to refresh via Profiler as it seems to drop from the Port menu when I switch from Arduino to another program (like Safari, to type this message) and back.

Do you remember what all you had to install to get yours working smoothly? Did you have to do anything with Terminal. (One post on the A. Forum had a command line to enter after the driver install, again for Yosemite.)

Need to be able to get this to recognize on a USB hub - can't very well connect it to a breadboard when it's sticking a couple inches out the back of my iMac.

Going to try uploading a different sketch to it, and using another of the 5 units I bought - maybe the 1st one is a little wonky.

Offline sfmodeller

  • Lieutenant
  • **
  • Posts: 34
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #46 on: September 07, 2015, 09:28:22 am »
They should come up as a COM port not USB.

Thanks, Tankton.

On my iMac, everything under Port has the prefix "dev/cu." followed by the connection type somewhere in the name - mine shows 2 Bluetooth links, an iPhone and an iPod, but no COM.

Offline RossW

  • Captain
  • ****
  • Posts: 256
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #47 on: September 07, 2015, 11:31:45 am »
Thanks, RossW.

Think I have it now. Had tried your suggestions, Arduino forum mostly talks about Yosemite. (Actually installed a 3rd driver set this morning as well, from a post on the Arduino forum.)

Had the board briefly working last night. Don't know how, and my computer shut iteslf down about 3 or 4 times (Your Mac is restarting because of a problem... screen came up each time.) Thought it was overheating, so I gave up and turned it off.

Long story short, got it to recognize by unplugging most of the USB stuff and checking for it in Systen Profiler.

Now it shows in Ports as dev.cu/wchusbserialfd140 - but it's very tempermental. Had to refresh via Profiler as it seems to drop from the Port menu when I switch from Arduino to another program (like Safari, to type this message) and back.

Do you remember what all you had to install to get yours working smoothly? Did you have to do anything with Terminal. (One post on the A. Forum had a command line to enter after the driver install, again for Yosemite.)

Need to be able to get this to recognize on a USB hub - can't very well connect it to a breadboard when it's sticking a couple inches out the back of my iMac.

Going to try uploading a different sketch to it, and using another of the 5 units I bought - maybe the 1st one is a little wonky.
I didn't have to install separate drivers; I think Mavericks has them already. Sorry I can't be more help 😕

Offline model_noob

  • Lieutenant
  • **
  • Posts: 36
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #48 on: February 24, 2016, 07:36:04 pm »
I noticed there was mention of transistor use on arduinos to control LEDS or anything with a load.  I made a pic showing how to use npn transistors for another post i have.
here is the link to it from this forum.

http://scifimodelaction.com/sfmaforum/index.php?action=dlattach;topic=3638.0;attach=31900;image

Offline model_noob

  • Lieutenant
  • **
  • Posts: 36
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #49 on: February 24, 2016, 08:08:10 pm »
sorry...   ;D  I couldn't leave well enough alone.

my code for strobe and nav lights:

int navstate=0;         // Track nav on or off for timing of flash
int strobestate=0;      // Track strobe on or off for timing of flash
long navMillis=0;       // Timer for nav LED
long strobeMillis=0;    // Timer forstrobe LED
long currentMillis=0;    // Current time
int strobeled1Pin = 2;    // Strobe LEDs
int strobeled2Pin = 3;    // Strobe LEDs
int navled1Pin = 4;       // Navigation LEDs
int navled2Pin = 5;       // Navigation LEDs

void setup()
{
  digitalWrite(navled1Pin, LOW);
  digitalWrite(navled2Pin, LOW);
  digitalWrite(strobeled1Pin, LOW);
  digitalWrite(strobeled2Pin, LOW);
}

void loop()
{
  currentMillis = millis();

  // nav LED timing
  // if navs are off and it has been .5 sec turn on nav lights.
  if ((navstate==0)&&(currentMillis-navMillis >= 500)) 
  {
    navMillis = currentMillis;
    digitalWrite(navled1Pin, HIGH);
    digitalWrite(navled2Pin, HIGH);
    navstate=1;
  }
  // if navs are on and it has been 1.5 sec turn off nav lights.
  if ((navstate==1)&&(currentMillis-navMillis >=1500))
  {
    digitalWrite(navled1Pin, LOW);
    digitalWrite(navled2Pin, LOW);
    navstate=0;
  }
 
  // strobe LED timing
  // if strobes are off and it has been .5 sec turn on strobe lights.
  if ((strobestate==0)&&(currentMillis-strobeMillis >= 500))
  {
    strobeMillis = currentMillis;
    digitalWrite(strobeled1Pin, HIGH);
    digitalWrite(strobeled2Pin, HIGH);
    strobestate=1;
  }
  // if strobes are on and it has been .5 sec turn off strobe lights.
  if ((strobestate==1)&&(currentMillis-strobeMillis >=500))
  {
    digitalWrite(strobeled1Pin, LOW);
    digitalWrite(strobeled2Pin, LOW);
    strobestate=0;
  }
}

Offline pakratt840

  • Admiral
  • *****
  • Posts: 2598
  • NCC-1603 USS Ballista
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #50 on: April 14, 2016, 07:23:07 pm »
First, I want to thank everyone for taking the plunge on these boards and trying to teach a a old dog-that would be me-a new trick. So please forgive a stupid question. I just got around to getting some jumper wires to set up my little bread board to try out some of these programs. I get everything positioned, but my connections don't seem to be good, as the LEDs only blink sporadically. Is it necessary to solder the breakaway header strip to the board even for testing purposes? If I just place the headers on the breadboard and plug the Arduino onto them, it doesn't seem to make good contact. The Arduino seems to sit a bit too loosely on the top pins of the headers. Thanks.
Dan

Yoda & Luke discuss building the Refit
Luke: I'm not afraid!
Yoda: Oh...You will be...You...Will...Be!

Offline RossW

  • Captain
  • ****
  • Posts: 256
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #51 on: April 14, 2016, 08:27:04 pm »
First, I want to thank everyone for taking the plunge on these boards and trying to teach a a old dog-that would be me-a new trick. So please forgive a stupid question. I just got around to getting some jumper wires to set up my little bread board to try out some of these programs. I get everything positioned, but my connections don't seem to be good, as the LEDs only blink sporadically. Is it necessary to solder the breakaway header strip to the board even for testing purposes? If I just place the headers on the breadboard and plug the Arduino onto them, it doesn't seem to make good contact. The Arduino seems to sit a bit too loosely on the top pins of the headers. Thanks.
No, you shouldn't have to solder. I use breakaway jumper wires with no problem. Could be your breadboard as I've had problems in the past, but maybe a photo would help?

Also, have you tried just the simple Blink sketch from the Arduino examples? That blinks the onboard LED but it will tell you if your setup is right. I would then make a copy of that sketch and change the output pin to 10, say, and then hook that up to your LED on your breadboard.

What Arduino board are you using?

Offline pakratt840

  • Admiral
  • *****
  • Posts: 2598
  • NCC-1603 USS Ballista
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #52 on: April 14, 2016, 09:13:03 pm »
Thanks Ross. I'm using a Nano clone that I got from the same source that Gadgetron got his from initially on eBay. I copied the first sketch that he put up for the TOS Enterprise with 2 blinking navs and 2 strobes. It does work okay when I insert the jumper pins directly into the ports on the Nano and hold them in place with my fingers with the other ends plugged into the breadboard. Here's a photo of the Nano plugged onto the breadboard.
Dan

Yoda & Luke discuss building the Refit
Luke: I'm not afraid!
Yoda: Oh...You will be...You...Will...Be!

Offline RossW

  • Captain
  • ****
  • Posts: 256
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #53 on: April 14, 2016, 09:43:31 pm »
Thanks Ross. I'm using a Nano clone that I got from the same source that Gadgetron got his from initially on eBay. I copied the first sketch that he put up for the TOS Enterprise with 2 blinking navs and 2 strobes. It does work okay when I insert the jumper pins directly into the ports on the Nano and hold them in place with my fingers with the other ends plugged into the breadboard. Here's a photo of the Nano plugged onto the breadboard.

Are you inserting the jumpers into the breadboard holes next to the relevant output pin? Maybe a photo of that would help. I've never had problems with wobbly connections using jumper wires; as long as they're inserted all the way into the breadboard holes it should work every time.

Offline MarkW

  • Plastic Surgeon
  • Admiral
  • *****
  • Posts: 1336
    • MW ModelWerks
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #54 on: April 15, 2016, 06:02:28 am »
pakratt--YES, it is necessary to solder the breakaway strips to the Arduino board.  That is exactly why you have the poor connection.

You will find once soldered, the Nano will be much better, but also really hard to remove from the bread board without bending the now soldered pins.  You might want to get a ZIF socket, or just leave that Nano in the breadboard as it will eventually break if you put it in and take it out of the breadboard repeatedly.
MarkW
"I can cross stab Hitler to death off the list of cool crap I thought I'd never do"
--Brock Sampson
NEW WEB ADDRESS

Offline simi

  • Admiral
  • *****
  • Posts: 586
  • JUST enough knowledge to do some serious damage
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #55 on: April 15, 2016, 06:08:33 am »
Hey Dan,

I almost always buy my nano clones off of ebay WITH the header pins already soldered on.  Usually costs an extra $.50-$1.00 more per chip (but my time is worth more than a buck!).  In the future - might consider that route.

Cheers!

Simi
As a software architect, I'm pretty darn good.  As someone with knowledge of building things in the real world, well, I'm a software architect.

Offline RossW

  • Captain
  • ****
  • Posts: 256
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #56 on: April 15, 2016, 06:51:29 am »
I misunderstood the original question (I thought they were wondering if they should solder the jumper wires). Both Mark & Simi got it right.

Offline pakratt840

  • Admiral
  • *****
  • Posts: 2598
  • NCC-1603 USS Ballista
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #57 on: April 15, 2016, 07:07:10 pm »
Thanks Ross, Simi, & Mark. That helps a lot.

@Simi, that's an option to consider, for sure. Have you installed one with the breakaway headers still attached inside a kit yet? That's my ultimate goal when I just want a simple nav/strobe function. I'll leave the complex stuff for Ralph at TenaControls ;)

@MarkW, that seems logical. I may just solder those and leave it in the breadboard for testing different sketches and modifications before installing one in a kit.

@RossW, for some reason the jumper wires are loose fitting even though they are pushed in as far as the shank above the pin will allow. In hindsight, I bought the jumper wires because it stated they were for Arduino, but maybe I should have looked for ones specified for breadboards. Maybe they're too thin to seat properly in the breadboard.

Again, thanks guys for the help and suggestions. Much appreciated!
Dan

Yoda & Luke discuss building the Refit
Luke: I'm not afraid!
Yoda: Oh...You will be...You...Will...Be!

Offline RossW

  • Captain
  • ****
  • Posts: 256
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #58 on: April 15, 2016, 08:07:31 pm »
@RossW, for some reason the jumper wires are loose fitting even though they are pushed in as far as the shank above the pin will allow. In hindsight, I bought the jumper wires because it stated they were for Arduino, but maybe I should have looked for ones specified for breadboards. Maybe they're too thin to seat properly in the breadboard.
I use the same jumper wires and they should be fine. Even though they move around a bit in the breadboard they'll make a good connection. I really feel the problem was with the unsoldered header pins on the board.

BTW, I usually do my prototyping with an Arduino Uno which has all the header sockets already there, plus you can plug in the USB cable directly for programming. Then, I'll use a cheaper and smaller board for inside the model. They're fairly cheap these days and the Uno is great to do all your testing with.

Offline pakratt840

  • Admiral
  • *****
  • Posts: 2598
  • NCC-1603 USS Ballista
Re: [How To - Arduino Nano] Starfleet Starship Running & Strobe Lights
« Reply #59 on: April 15, 2016, 10:24:22 pm »
@RossW, for some reason the jumper wires are loose fitting even though they are pushed in as far as the shank above the pin will allow. In hindsight, I bought the jumper wires because it stated they were for Arduino, but maybe I should have looked for ones specified for breadboards. Maybe they're too thin to seat properly in the breadboard.
I use the same jumper wires and they should be fine. Even though they move around a bit in the breadboard they'll make a good connection. I really feel the problem was with the unsoldered header pins on the board.

BTW, I usually do my prototyping with an Arduino Uno which has all the header sockets already there, plus you can plug in the USB cable directly for programming. Then, I'll use a cheaper and smaller board for inside the model. They're fairly cheap these days and the Uno is great to do all your testing with.

Thanks RossW, good advice. I'll look to pick up an Uno board here soon.
Dan

Yoda & Luke discuss building the Refit
Luke: I'm not afraid!
Yoda: Oh...You will be...You...Will...Be!

 




Enterprise © Bloc