Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Re: Arduino 1.0 upload issue on: December 09, 2011, 02:29:27 am
Sounds silly, but check to make sure you have the right COM port checked for your board. I just had the same problem (the reason why I had switched to 1.0 was that I was trying to fix it) on my Vista laptop (haven't had a chance to try it on the OpenSUSE box yet, but I'm coming in expecting serious problems again), and that was what did it for me.  I was furious until I went back and checked my device manager to discover that my UNO was assigned to COM4, not COM3 like I'd thought (all that time, I was terrified that I'd fried my board, since I'd just been using it to supply power to a circuit I had on the breadboard).  Changed that and the problem went away completely.

Might help, might not help.  Either way, it's someplace to start.
2  Using Arduino / Project Guidance / Re: Christmas Light Controller via Ethernet on: December 09, 2011, 02:03:43 am
Essentially, from the sound of it, you want to do an 8-socket version of this project.  Not too hard, especially since the guy on that link also provided some sample code to tweak to your project (or provide something which you can base your own code off of), except you're trying to do it with wifi.  I'm in the process of doing that very project right now, except I'm going about controlling the relay in a different manner (where he uses a Darlington transistor to ensure proper switching and power regulation, I'm basically going on a similar premise, except I have a MOSFET on the negative leg of the power source that's actually switching the power on and off, and an LM317 on the positive leg that's regulating the voltage down to around 4v for the relay).  I could very easily see this kind of project being upped to however many outlets are necessary - just up the number of relays, and assign them control pins and adjust the code accordingly.

I think the only real downside to just going with Mr. Bouck's project above is that the box is fugly and requires some creative camouflaging to keep it out of sight.
3  Using Arduino / Project Guidance / Re: Arduino controlled laser cutter on: February 17, 2011, 02:12:51 pm
Okay, I've been doing some research on lasers, and it would seem that since most of them are TTL, the best way to control the beam would be to build some sort of current control circuit.  Alternatively, I could just drop the intensity controls, and manage the depth of the cut by changing how quickly and how many times the laser moves over a certain spot.

I've also been thinking about how a regular printer works, and think that method might work well for my cutter (an inkjet printer prints one line of pixels from the source file at a time).  Since my prototype will essentially be a repurposed inkjet printer with a few modifications to work with different thicknesses of materials, it should either prove to be fairly easy, or really bloody hard.
4  Using Arduino / Project Guidance / Arduino controlled laser cutter on: February 16, 2011, 12:07:09 pm
Okay, I have a new project in mind for the weekend (or the month, depending on how long it takes me): I'd like to build a laser cutter.  I think I have my design for moving the material pretty much hammered out, but I still have a few things I need to hammer out before I get started.

1) So many lasers...I haven't done anything with a laser since laser pointers got old, and I can't seem to find a decent reference.  I'll be cutting mostly wood, foamcore, plastic, cardboard, and card stock.  There are a lot of options out there.

2) Controllers.  I can build a 2-axis (X and Y) system right now using my Adafruit shield, but I'm just not sure as to whether it will be precise enough.

3) I'm thinking about trying to use PWM to control the laser beam intensity, for different depth cuts.  Good idea?  Bad idea?  Got a better one?

4) Interface - I can build it, and I can probably program the controller (or at least give it some trial an error), but I have no idea how to program the computer interface side.  I had projects that were supposed to be run by a computer, but I scrapped that part of the project for a simpler solution that turned out to be less of a headache.  Should I go with a Processing sketch, or is there an easier way?

I'm open to suggestions as to how to make this thing work.  While I haven't had experience with stepper motors, I think this will turn out to be an interesting little project for me.
5  Using Arduino / Programming Questions / Re: Strange behavior with if() statements on Uno using Adafruit motor shield on: February 15, 2011, 01:52:30 am
Okay, I have found one way to fix my problem (going to try turning on the internal pull-up resistors later on in hopes that will solve the original problem) - I just connected the input from pin 5 to pin A0, and added the following line:
Code:
back=analogRead(A0);

Suddenly, it works now.  It needs some debouncing, if my diagnosing skills are correct, but it works.

Thanks to everyone that tried to help.
6  Using Arduino / Programming Questions / Re: Arduino PING Code - Turning? on: February 11, 2011, 12:57:49 pm
Code:
#include <AFMotor.h>

AF_DCMotor motor1(1, MOTOR12_8KHZ);   // Position of this wheel front left ??
AF_DCMotor motor2(2, MOTOR12_8KHZ);   // Why
AF_DCMotor motor3(3, MOTOR12_1KHZ);   // WHY 1Khz?
AF_DCMotor motor4(4, MOTOR12_1KHZ);



The reason why he's got motors 3&4 declared as 1KHz is because according to the Adafruit website, motors 1 and 2 can be set to 1,2,8, or 64KHz, while motors 3 and 4 can only be set at 1KHz.  I never could get the speed definitions to work, so I just left them out (for some reason it just wouldn't compile).  Much less of a headache that way.
7  Using Arduino / Programming Questions / Re: Declaration of variables and constants on: February 11, 2011, 12:45:46 pm
Ah, m'bad.  I read the OP as "why use int variables at all".

In that case, no, I don't have any clue.  I don't do that anyway; it just seemed redundant from the get-go.
8  Using Arduino / Programming Questions / Re: Declaration of variables and constants on: February 11, 2011, 12:17:29 pm
It's not just an Arduino thing.  It's a C thing.

#define substitutes in a nonvariable way.  Unless you manually change it in the source, that definition will always stay the same (a "dictionary" definition, if you will).
9  Using Arduino / Programming Questions / Re: Strange behavior with if() statements on Uno using Adafruit motor shield on: February 07, 2011, 10:36:34 pm
Actually, that is the input that I actually can make work, so I'm not entirely sure it's a conflict.  I'm checking now against the list on the Adafruit forums, but I believe that pin is not used.

Okay, so pin 2 isn't used, but pins 5 and 6, which are both supposed to be used for input, are supposed to be used for motors 3 and 4, which aren't used.  I'm wondering if that could cause some kind of funky interference?
10  Using Arduino / Programming Questions / Re: Strange behavior with if() statements on Uno using Adafruit motor shield on: February 07, 2011, 08:06:11 pm
Okay, it's something with the board, but not with the ATMega chip.  Fired up the new board, and it presented the same symptoms, so I poked around with the code.

My code calls for digital pins 2,5,6,9,and 10 to be initialized as inputs.  I tried changing the pin that turned the motor on, and discovered that pins 2 and 10 are the only ones that actually behave.  I have no idea how to proceed further.
11  Using Arduino / Programming Questions / Re: Strange behavior with if() statements on Uno using Adafruit motor shield on: February 06, 2011, 07:33:06 pm
Gave that a try; no dice.  Tried changing pins and switches, as well.  It works fine if I'm checking the values for going forward, but for some reason it is being unnecessarily obtuse when I try to go backward.

I looked at the circuit, and I noticed that if I touched a voltmeter to pin 5, the motor started behaving.  Damnedest thing.  I still haven't begun to figure out how to use that to my advantage.

Edit:  Screw it - I think one of my last experiments may have blown some of the pins.  I already had another Uno coming for a different project, so I'm going to try it with some virgin hardware.
12  Using Arduino / Programming Questions / Re: Strange behavior with if() statements on Uno using Adafruit motor shield on: February 06, 2011, 12:48:46 am
Here is the latest attempt at the code.

/*
 * most successful attempt yet, out of 5 tries
 */
#include <AFMotor.h>

AF_DCMotor motor1(1);
//AF_DCMotor motor2(2);

void setup()
{
  pinMode(2,INPUT);
  pinMode(5,INPUT);
  pinMode(6,INPUT);
  pinMode(9,INPUT);
  pinMode(10,INPUT);
  Serial.begin(9600);
  motor1.setSpeed(100);
  Serial.println("Motor 1 initialized");
  //motor2.setSpeed(200);
  //Serial.println("Motor 2 initialized");
 
}
void loop()
{
  int forward=digitalRead(2),back=digitalRead(5),left=digitalRead(6),right=digitalRead(9),power=digitalRead(10);
  if(power!=LOW)
  {
    motor1.run(RELEASE);
    //motor2.run(RELEASE);
  }
 
   else if(power==LOW)
  {
    /*if(forward==LOW)
    {
      //Serial.println("Moving forward...");
      motor1.run(FORWARD);
   // motor2.run(FORWARD);
    }
    /*else
    {
      motor1.run(RELEASE);
      //motor2.run(RELEASE);
      Serial.println("Stopping...");
    }*/
    /*else*/ if(back==LOW)
    {
      motor1.run(BACKWARD);
    }
    else
    {
      motor1.run(BRAKE);
    }
  }
  else
  {
  motor1.run(RELEASE);
  }
}
13  Using Arduino / Programming Questions / Strange behavior with if() statements on Uno using Adafruit motor shield on: February 06, 2011, 12:47:13 am
Okay, I have been tearing my hair out trying to get this project to work for a little over a week.  I am working on an Uno, using the 0022 IDE and drivers in Vista and 7.  I thought it best to put it here because of what it's doing.

I have been trying (and failing) to get my board to play nice with an Adafruit motor shield.  This is supposed to be the driving force (no pun intended) behind a robot that I am trying to build.  I can get one if/else statement to behave beautifully, but if I add anything more than that, and it ignores the conditions of every one but the first, resulting in a ton of garbage coming out (I have been trying to debug it one loop at a time, .  The directional input was originally supposed to be given by means of five momentary switches for simplicity's sake.  I have tried separate if/else statements, if/else if, switch/case arguments, switching pins, and quite frankly I'm at a loss as to what could be going wrong.  The motor that I'm using to test the code is a vibration motor salvaged from an off-branded Nintendo Gamecube controller.

I'll upload the code in a little bit, once I get on to my other computer.
14  Using Arduino / Installation & Troubleshooting / Re: Once working Arduino on: February 05, 2011, 11:16:44 pm
You may need to run the IDE as Administrator.  I got the same error with a newer UNO on both Vista and 7 Pro, and that alone cleared it up.

Seeing as that is the simplest solution, try that first.  If that doesn't work, then go to the next troubleshooting step (in this case, new drivers, which may need to be installed anyway).
15  Using Arduino / Installation & Troubleshooting / Re: programmer not responding on: February 05, 2011, 04:05:01 pm
What OS are you working in?  I just recently had some problems myself with both Vista and 7 where the board would suddenly go unrecognized, refuse to upload properly, etc.  Turned out all I needed to do was run the IDE as Administrator, and it works perfectly and hasn't given me trouble since.
Pages: [1] 2