Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Mega 2560 not working on: August 01, 2011, 06:01:28 am
SO i bought an arduino 250 for a project, this is about the 4th time ive used it, now during some trial and error programming fro a sensor, the chord which never flet quite right as it was plugged in has completely stopped responding,
The mega still has the onlight shining, and the led marked l, still flases twice when i plug it in but my computer nor the program respond to the arduino.

is it a fault that i should send it back fro or is it un fixable.

During the programming but after it started to mess up, but when it was still able to get some signal, i accidently told it to install a new/ different bootloader, and the arduino forze ( not sure which one) but since then i only got the arduino to respond once.

Any help is much appreciated especially if it will stop me breaking a door, and save me another $70
2  Using Arduino / General Electronics / Electronic switch on: July 21, 2011, 07:24:36 pm
Ok so im running a polulu qik 2s9v1, and i want my motors to get more power, so i had an idea to change the motor part of it. the power coming out of the motor driver will trip a switch and turn on a circuit which consists of a motor and and a battery, removing any chance of the motor over powering the driver.

What sort of switch would be best for this?
3  Using Arduino / General Electronics / Re: Will having a kill switch damage the arduino on: July 10, 2011, 12:25:58 am
Thanks guys, that makes my programming alot easier, and means that im not gonna have to have a bunch of code just for a btton check.
4  Using Arduino / General Electronics / Will having a kill switch damage the arduino on: July 09, 2011, 11:42:03 pm
As the title states, will having a killswitch on my arduino, damage it if used too many times.

WHat i mean is this,
im building a soccer robot for a competition and it is very lengthy in the program to have it check the position of the switch inside the program, so i had an idea to incorportate a kill switch in the small circuit that supplys power to the battery, it would be an spst switch, which would just remove all power going to the arduino, effectively turning it off when i dont want it to turn on.

In a standard soccer match a kill switch will be hit roughly 20 times in 10 minutes, will this damage my arduino, or am i ok to do it like that.
5  Using Arduino / Programming Questions / Re: Serial.print() problem Please Help on: May 29, 2011, 07:44:57 pm
Sorry i believe ive figured it out, i was referring to the functions defined by something like forward() and then it jumps to void forward()

whats happened is my teacher has given me some code examples and then ive had to figure it out for myself.

I cant believe im doing this but your help is invaluable, and im just curious before i write more of my program, whether you can run multiple functions inside of each other, so in this case if i was running the forward function, and inside it i have an if statement, where if the light is > than 10 or < than 10, and one side tells it to go to turn() and the other tells it to go to forward() which is the start of the function, would this work or would i have to write the program in a way that makes it work without the functions.

Sorry, your help is amazing, and ive been struggleing to find accurate help for my programs.

6  Using Arduino / Programming Questions / Re: Serial.print() problem Please Help on: May 29, 2011, 07:23:24 pm
Ok, last question, on review, if i go to an event, and the event finishes will it start the event again, or go back to the start of void loop?

Thanks for all your help, its gonna make my systems teacher alot happier
7  Using Arduino / Programming Questions / Re: Serial.print() problem Please Help on: May 29, 2011, 07:11:49 pm
Ah thanks, now i understand, i was working on the theory that it would jump the program back to the start of Void loop(), similar how an event works, but wasnt 100% sure, i didnt realise that it would send it into a perpetual loop. so i guess my real question is is there a way to send it back to the start of void loop() with out going into an endless loop?
8  Using Arduino / Programming Questions / Serial.print() problem Please Help on: May 29, 2011, 06:53:01 pm
ok, so im building a soccer robot, and currently while im programmig it im using to make sure everything is functioning normal.

My problem is that after about a minute it pronts out something like this
Output: Voltage: 0.10 Volts   -noball
Output: Voltage: 0.08 Volts   -noball
Output: Voltage: 0.07 Volts   -noball
Output: Voltage: 0.05 Volts   -noball
Output: Voltage: 0.08 Volts   -noball
Output: Voltage: 0.1

and then stops reporting any more values. My code is this
// this constant won't change:
const int  buttonPin = 2;    // the pin that the pushbutton is attached to
const int ledPin = 13;       // the pin that the LED is attached to
int irPin0 = 0;     // the cell and 10K pulldown are connected to a0
int irReading0; // the analog reading from the analog resistor divider
int irPin1 = 0;     // the cell and 10K pulldown are connected to a0
int irReading1; // the analog reading from the analog resistor divider
int irPin2 = 0;     // the cell and 10K pulldown are connected to a0
int irReading2; // the analog reading from the analog resistor divider
float Res0=1.0;// Resistance in the circuit of sensor 0 (KOhms)
// depending of the Resistance used, you could measure better at dark or at bright conditions.
// you could use a double circuit (using other LDR connected to analog pin 1) to have fun testing the sensors.
// Change the value of Res0 depending of what you use in the circuit
// Variables will change:
int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button

#include <CompactQik2s9v1.h>
#include <NewSoftSerial.h>

#define rxPin1 3
#define txPin1 4
#define rstPin1 5

#define rxPin2 6
#define txPin2 7
#define rstPin2 8

NewSoftSerial mySerial1 =  NewSoftSerial(rxPin1, txPin1);
CompactQik2s9v1 motor1 = CompactQik2s9v1(&mySerial1,rstPin1);

NewSoftSerial mySerial2 =  NewSoftSerial(rxPin2, txPin2);
CompactQik2s9v1 motor2 = CompactQik2s9v1(&mySerial2,rstPin2);

void setup() {
  // initialize the button pin as a input:
  pinMode(buttonPin, INPUT);
  // initialize the LED as an output:
  pinMode(irPin0, INPUT);
  pinMode(irPin1, INPUT);
  pinMode(irPin2, INPUT);
  // initialize serial communication:

void loop() {

      irReading0 = analogRead(irPin0);   // Read the analogue pin
       float Vout0=irReading0*0.0048828125;   // calculate the voltage
      irReading1 = analogRead(irPin1);   
      irReading2 = analogRead(irPin2);
  Serial.print("Output: ");
  Serial.print("Voltage: ");              // Print the calculated voltage returned to pin 0
  Serial.print(" Volts\t");

  if (irReading0 > 100) {  // check left Ir sensor.
 Serial.print(" - BALLLEFT"); // ir 1

    if (irReading1 > 100){
     Serial.print(" - BALLFRONT");  //ir 2

    else{ if (irReading2 > 100){
         Serial.print(" - BAllRIGHT");// ir 3

  delay(100);//end of button loop

from my other testings i have found that each part of the program works fine, it is only this one bit that im having trouble with, and i cant keep working on my robot without this.

thanks for any help offered
9  Using Arduino / Displays / BEst 16 by 2 display for beginner on: April 16, 2011, 08:58:49 pm
simply , i am looking for a simple display i can tell to give feedback from a sensor. preferrably not too hard to program , thats it. im using a mega 2650

10  Using Arduino / Sensors / Color sensor & compass sensor needed on: April 16, 2011, 08:32:40 pm
Hey guys, im currently building a soccer robot, that plays on a multi coloured feild, and i was hoping you gu would be able to recommend a strong, accurate and easily programable color sensor.

as for the compas sensor, im looking for something that will forward readings to the arduino, and as it rotates, the numbers will climb or descend. again i would prefer that it was simple to program as this would help me to make the programming simple enough.

Thanks for any help guys.

11  Using Arduino / Sensors / Re: Programming pulsed Ir sensor on: March 22, 2011, 09:45:10 pm
ok so the ball has multiple transmitters tha pulse at a 300 hz frequency. my teacher beleivs that i have to tell the arduino ir sensor to read at an equivelent frequency for it to have any range on the sensor.
12  Using Arduino / Sensors / Re: Programming pulsed Ir sensor on: March 19, 2011, 05:43:15 pm
im tyring that now, is there a way to get it to read pulsed ir?
13  Using Arduino / Sensors / Programming pulsed Ir sensor on: March 18, 2011, 11:21:29 pm
Ok guys, so im making a robot to play soccer, the ball uses pulsed infrared lights so that robots can find it. unfortunatly im the first person in the league to use arduino to play the game.

ive gone out and bought 3 which are 2 prong phototransistors.

after about an hour of going through google and trying different searches i havent come up with much that tells me how to program them or wire them up.

i was hoping that somebody on the forums would have the knowledge to explaine the programming and wiring up to me or be able to link me to a guide to do it.

Thanks for any help
Pages: [1]