Show Posts
Pages: 1 2 3 [4]
46  Using Arduino / Programming Questions / Re: When does -1 != -1 ? on: December 22, 2011, 12:45:30 pm
Code:
#define TEST_VALUE -1
int foo = TEST_VALUE;

void setup(void)
{
    pinMode(13, OUTPUT);
    digitalWrite(13, LOW);
    if (foo != TEST_VALUE) digitalWrite(13, HIGH);
}

void loop(void)
{
}

has the light end up on, I was making sure it wasn't a left over on state some how from something before.

Code:
#define TEST_VALUE -1
int foo = TEST_VALUE;

void setup(void)
{
    pinMode(13, OUTPUT);

}

void loop(void)
{
   digitalWrite(13, LOW);
   if (foo != TEST_VALUE) digitalWrite(13, HIGH);
 
   while( true) {};
 
}

light is on again (seeing if it has to do with being in loop vs. start up)

Code:
#define TEST_VALUE -1
int foo = TEST_VALUE;

void setup(void)
{
    pinMode(13, OUTPUT);
    Serial.begin(9600);
}

void loop(void)
{
   digitalWrite(13, LOW);
   if (foo != TEST_VALUE) digitalWrite(13, HIGH);
 
   while( true) {
     Serial.print(TEST_VALUE);
     Serial.print('\t');
     Serial.print(foo);
     Serial.print('\n');
     delay(100);
   };
 
}

light is off, serial monitor shows "-1    -1"

commenting out the code inside the while loop still has light off
commenting out the serial.begin line also causes light to be on.

47  Using Arduino / Programming Questions / Re: When does -1 != -1 ? on: December 22, 2011, 12:17:25 pm
ok, I just ran that code n my Uno (IDE 1.0) and the LED turned on and stayed on.

let me see what I can find.
48  Using Arduino / Programming Questions / Re: When does -1 != -1 ? on: December 22, 2011, 10:59:43 am
x != x is always going to return false because x == x is true
49  Using Arduino / Sensors / Re: problem with Optocoupler on: December 21, 2011, 03:39:46 pm
And how do you know it's between 1 and 6 (i do believe you), i can't find it on the datasheet.
I think i should be able to get it to work now.

IC pins are numbered anti-clockwise around the IC starting near the notch or dot.
50  Using Arduino / Audio / Re: Airplay with Arduino on: December 20, 2011, 07:36:44 pm
looks like Airplay using AES encryption, but requires you to license the key from Apple.
http://en.wikipedia.org/wiki/AirPlay

not sure if the Arduino has the crunching capabilities to real time encrypt/decrepit the stream.
51  Using Arduino / Sensors / Re: issue with tilt sensor testing on: December 19, 2011, 09:05:08 am
I went here because your embedded image didn't work:

looking at the suggested wiring diagram high (1) is not tilt, and low (0) is tilt.

it has a pull up resistor and the tilt switch pulls to ground when the tilt is sensed.

try changing the following line:

if (digitalRead(tilt)==HIGH) {

to

if (digitalRead(tilt)==LOW) {
52  Using Arduino / Sensors / Re: Load Cell OpAmp on: December 19, 2011, 08:17:49 am
Few questions:

What voltage difference are you getting across the load cell at different weights?
What voltage are you reading on your IC output pin at the different weights?

Are you using the DIP packaging or the SOL packaging (different pin outs)?
based on the PIN outs it looks like you are using the 8 pin DIP package, please verify

If you can supply the above questions, we might be able to give you some more specific solutions.

50 ~ 0.24 volts (using a 5 volt reference on the ADC)
150 ~ 0.75 volts
your IC can't pull all the way to ground or Vcc, you want to try swapping the outputs on your load cell to the IC to make the voltage go more positive instead of negative with added weight and check your gain amounts. 
Also it looks like the example blog changed the Vref for the ADC to internal setting Vref to 1.1 volts instead of the default 5V.
53  Topics / Robotics / Re: Are these components compatible? (chassis/motorshield related) on: December 18, 2011, 10:14:49 pm
http://www.robotshop.com/dfrobot-4wd-arduino-mobile-platform-4.html
click on the Specifications tab

it has 2 different motor types listed: "green" and "yellow"

the green has the following stats listed for 6 volt supply:
No-load current(6V): 71 mA
Stall current(6V): 470 mA

This means with no load (IE holding your robot in the air with the wheels not touching anything), the motor draws 71 mA.
Stall current means that if you were then to grab the wheel and prevents it from moving it would draw 470 mA.

Your motor driver needs to be able to handle the strongest current draw of your motor without overloading.  My understanding is that to do this it needs to be able to handle the stall current of the motor that is connected to it. So for this motor you would need to handle 470 mA per motor.  The chassis has 4 motors.

If you were to use the following controller: http://www.adafruit.com/products/81
It has 4 channels that each can handle a maximum of 600 mA per channel (1200 mA peak -per spec sheet -> non-repetitive, t ≤ 100 µs).
Since 1 "green" motor needs 470 mA, you could connect 1 motor per channel with out going over the maximum current per channel.
There is 4 channels and 4 motors, so this would work.

if you were to use the following controller: http://www.amazon.com/DFRobot-Motor-Shield-for-Arduino/dp/B006D85PAS/ref=sr_1_4?s=electronics&ie=UTF8&qid=1323643740&sr=1-4
It has 2 channels that each can handle a maximum of 2000 mA per channel DC (see spec sheet for peak info).
Since 2 "green motors need 940 mA, you could connect 2 motors per channel with out going over the maximum current per channel.
There is 2 channels and 4 motors, so this would work.

Now for the "yellow" motor:
No load current (6V): 160 mA
Locked-rotor current (6V): 2800 mA
The first controller can't handle 2800 mA per channel. therefore will not work for "yellow" motors.
The second controller can't handle 5600 mA (2800 mA x 2) per channel. Therefore will not work for "yellow" motors.

So the conclusion I have is this: are you getting the "green" motors or the "yellow" motors?
"Green" = you can make either work
"Yellow" = neither can handle the peak current usage, so your controller might burn out if your robot got stuck.

Does that help?
54  Topics / Robotics / Re: Are these components compatible? (chassis/motorshield related) on: December 18, 2011, 06:35:18 pm
Would someone verify I am looking at this correctly?  It looks like either could handle the green motors, but not the yellow motors unless you prevent the motors from stalling.

http://www.robotshop.com/dfrobot-4wd-arduino-mobile-platform-4.html
Indicates a stall current of 470mA @ 6 volts for the green motor and 2.8A @ 6 volts for the yellow motor.
The chassis appears to use 4 motors, so if your driver is 2 port, you would need to double the stall currents as you would have 2 motors on each port.

http://www.adafruit.com/products/81
provides 4 channels of 0.6A continuous capacity (each sufficient for the stall current of the green motors)

http://www.amazon.com/DFRobot-Motor-Shield-for-Arduino/dp/B006D85PAS/ref=sr_1_4?s=electronics&ie=UTF8&qid=1323643740&sr=1-4
provides 2 channels of 2.0A continuous capacity (each sufficient for the stall current of 2x green motors)
55  Using Arduino / Project Guidance / Re: arduino adc on: December 12, 2011, 09:33:49 pm
If I was going to guess, I would say check the connection from the slider on the pot to the inputs on the chip.  That output looks like open input float measurements.


Could you show us your circuit diagram? That would allow a better diagnosis.
56  Using Arduino / Project Guidance / Re: Need help with simple motion sensor on: December 12, 2011, 09:08:22 pm
This looks like your problem:


It looks like you have all your pins on your sensor on the same strip on the protoboard, so they are all connected to each other instead of you power, ground, & I/O lines.
Pages: 1 2 3 [4]