Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: SainSmart Mega2560 + Windows 7 USB driver installation help on: November 24, 2012, 11:16:27 pm
http://arduino.cc/forum/index.php/topic,107098.0.html

I just found this, it seems like a legitimate solution.
2  Using Arduino / Installation & Troubleshooting / SainSmart Mega2560 + Windows 7 USB driver installation help on: November 24, 2012, 11:02:59 pm
I purchased the SainSmart Mega2560 from amazon because it was pretty cheap. The reviews said the device works fine, but you need to update a file to get the device to talk to the computer. When the device showed up today, I checked the website and the review was gone. Long story short I cant figure out how to get the board to be recognized as a COM in the Windows 7 device manager. When I plugged the device into the computer, the driver attempted to install but there was an error, and it finished with the  "device is unrecognized". If anyone has a solution to this I would appreciate it.
3  Using Arduino / Motors, Mechanics, and Power / Re: Need Advice: Powering variable number of servos with a dedicated voltage rail on: November 16, 2012, 04:32:29 pm
A buddy of mine confirmed what you stated. He also said that if you get some slightly more hefty servos (load capacity) you can get away with powering them with lower currents. I ended up getting a slightly bigger supply that could handle 5A, I'll post the results of my experimentation with it here in this thread.
4  Using Arduino / Motors, Mechanics, and Power / Need Advice: Powering variable number of servos with a dedicated voltage rail on: November 15, 2012, 11:20:07 pm
I am building a  stationary robotic arm, probably with a stepper motor base and servo joints. I haven't finalized a design, but I will probably be using Microrax extruded aluminum and "like" 4 servos. My main concern at this point is providing adequate power to my system. I am currently looking at a bench linear power supply that can be viewed at the link below.

http://www.hobbyking.com/hobbyking/store/__6222__Towerpro_MG946R_12kg_55g_12kg_20sec.html

My main question is: Can I establish a dedicated voltage rail with the supply that each servo (and stepper) connects to. In addition, is there a method of calculating/modeling the voltage/current settings for the power supply to ensure the necessary amount of power is being transferred to each motor. I would really like to learn a modeling method for future reference. On a side tangent, I haven't decided on controller hardware (Microcontroller, and stepper motor driver/h-bridge system) if anyone has a good suggestion please share.
5  Using Arduino / Programming Questions / Re: Need help with conditional DI/O and using Serial monitor to set conditions on: October 18, 2012, 11:15:23 pm
The code I posted works. I could parse Read if I want, but I didn't bother because I was consistent with my conditional statements.
6  Using Arduino / Programming Questions / Re: Need help with conditional DI/O and using Serial monitor to set conditions on: October 18, 2012, 10:12:17 pm
I modified the code snippet Magician provided from:

Code:
if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == '1') {           
      Read = 1;
    }
}

To the following:
Code:
if (Serial.available() > 0)
   {
    incomingByte = Serial.read();
    if (incomingByte == '1') {           
      Read = 1;
    }
    else
    {
      Read = Serial.read();
    }

**Note incomingByte is global cast as byte.

The completed code is as follows. I hope its a good guide for beginners.

Code:

int const ledpin4 = 4;
int const ledpin5 = 5;
int const ledpin6 = 6;
int Read = 0;
byte incomingByte = 0;

void setup()
{
  pinMode(ledpin4,OUTPUT);
  pinMode(ledpin5,OUTPUT);
  pinMode(ledpin6,OUTPUT);
  Serial.begin(9600);
 
} //END void setup()

void loop()
{     
   if (Serial.available() > 0)
   {
    incomingByte = Serial.read();
    if (incomingByte == '1') {           
      Read = 1;
    }
    else
    {
      Read = Serial.read();
    }
}
 
   if(Read == 1)
    {
      for(int ledpin = 4; ledpin <7; ledpin++)
      {
        digitalWrite(ledpin,HIGH);
        delay(100); // 100ms
        digitalWrite(ledpin,LOW);
       } //END for()
     } //END if()
     
     if(Serial.read() >1)
    {
    if(Read == 2)
    {
     Serial.print("LED's Off");
      for(int ledpin = 4; ledpin <7; ledpin++)
       {
          digitalWrite(ledpin,LOW);
       } //End else for()
    } //END else if()
    } //End of if(Serial.read() >1)
     
     
     
} //END void loop()
7  Using Arduino / Programming Questions / Re: Need help with conditional DI/O and using Serial monitor to set conditions on: October 18, 2012, 09:28:07 pm
Thank you very much Magician. I played around with Serial.available() a little bit with a switch case, but I haven't looked into it with any detail. I'll work on it and post the updated code if I make progress.
8  Using Arduino / Programming Questions / Need help with conditional DI/O and using Serial monitor to set conditions on: October 18, 2012, 07:07:40 pm
          I'm new to the forums, so I apologize ahead of time for any errors I commit. My ultimate goal is to write a sketch that lights three LEDs in a cascading manner. Its quite simple, and I have gotten it to work by itself. The problem comes when I try to incorporate a pseudo "Off switch" into the program. I attempt to assign a value to the variable READ through the serial monitor(SM) . This value is then evaluated to be true or false in an if..else if.. structure. If the first if statement is true, it executes the cascade. If the else if statement returns true, it executes "pseudo off". If neither are true it asks to input a value of 1 or 2.
          The program below compiles and is uploaded without error, but when I attempt to interact with the program via SM nothing happens. In addition I have been unable to get Serial.print("Random String") to print to the SM. I am using an Arduino Uno with IDE 1.01. I'm guessing I have a fundamental misunderstanding of something below but I can't seem to catch my mistake. Thanks for the help.

Below is the code discussed above:

Code:

int const ledpin4 = 4;
int const ledpin5 = 5;
int const ledpin6 = 6;
int Read = 0;

void setup()
{
  pinMode(ledpin4,OUTPUT);
  pinMode(ledpin5,OUTPUT);
  pinMode(ledpin6,OUTPUT);
 
} //END void setup()

void loop()
{     
   Serial.print("Enter 1 for LED Cascade or 2 for off.");
   Read = Serial.read();
 
   if(Read==1)
    {
     Serial.print("LED Cascade");
      for(int ledpin = 4; ledpin <7; ledpin++)
      {
        digitalWrite(ledpin,HIGH);
        delay(100); // 100ms
        digitalWrite(ledpin,LOW);
      } //END for()
    } //END if()
 
  else if(Read==2)
    {
     Serial.print("LED's Off");
      for(int ledpin = 4; ledpin <7; ledpin++)
       {
          digitalWrite(ledpin,LOW);
       } //End else for()
    } //END else if()
 
  else
    Serial.print("Invalid Entry: Enter 1 or 2");

} //END void loop()
Pages: [1]