Show Posts
Pages: 1 ... 376 377 [378] 379 380 ... 540
5656  Using Arduino / LEDs and Multiplexing / Re: 74HC… are all the same? on: January 30, 2012, 11:46:37 am
Check out the 74HC4511:
5657  Using Arduino / Installation & Troubleshooting / Re: Sizes of loaded modules? on: January 30, 2012, 11:40:41 am
Shut down the IDE.
Set the preferences.txt option: preproc.save_build_files=true
Re-start the IDE.
Set the Preferences... option for verbose build messages.
"Verify" the sketch.
Use the messages to find the build folder and navigate there.  In my case:

    cd /var/folders/cs/p6yz0z1m8xj9lf0059b_lzw00000gn/T/build6087954880987522770.tmp/

Run the avr-size command on the object files.  In my case:

 '/Applications/Arduino' *.o
   text      data       bss       dec       hex   filename
   4800       346       240      5386      150a   BalloonControl.cpp.o
      0         0         0         0         0   CDC.cpp.o
      0         0         0         0         0   HID.cpp.o
   1544         0       167      1711       6af   HardwareSerial.cpp.o
    512         0         6       518       206   IPAddress.cpp.o
   1710         2         0      1712       6b0   Print.cpp.o
   1244         0         0      1244       4dc   Stream.cpp.o
   1365         1        21      1387       56b   Tone.cpp.o
      0         0         0         0         0   USBCore.cpp.o
    288         0         4       292       124   WInterrupts.c.o
    306         0         0       306       132   WMath.cpp.o
   4796         1         1      4798      12be   WString.cpp.o
     30         0         0        30        1e   main.cpp.o
     44         0         0        44        2c   new.cpp.o
    564         0         9       573       23d   wiring.c.o
    266         1         0       267       10b   wiring_analog.c.o
    500         0         0       500       1f4   wiring_digital.c.o
    314         0         0       314       13a   wiring_pulse.c.o
    260         0         0       260       104   wiring_shift.c.o

Note that the libraries are built in sub-directories so you will have to navigate to them individually.  Some of those sub-directories have further sub-directories.

5658  Using Arduino / Programming Questions / Re: Error programming ATTiny85 on: January 30, 2012, 11:13:05 am
Did you put in the capacitor to disable reset on the UNO?

Did you try selecting File->Upload Using Programmer rather then just pressing the Upload button?

If those fail, turn on verbose upload messages in Preferences... and study the messages for further clues.
5659  Using Arduino / Project Guidance / Re: Building a very basic car injection computer. on: January 30, 2012, 11:00:14 am
I think your program needs more inputs:

How much air is flowing into the engine?  More air means more gas needed to keep the same mixture.

What is the current throttle position?  Pushing the throttle should inject more gas to produce more power but not more gas than can be burned with the air flow.
5660  Using Arduino / General Electronics / Re: Series of three potentiometers on one analog input (es: led RGB) on: January 30, 2012, 10:53:21 am
I don't think that what you want to do is possible with pots.  It would be possible with switched resistors that have discrete values.

You could eliminate the momentary switch and use a single pot:
unsigned color = analogRead(potPin);  // Read 10-bit value
byte Red    = (color & 0b0000000111) << 5; // 3 bits (8 levels) of Red
byte Green = (color & 0b0001111000) << 1; // 4 bits (16 levels) of Green
byte Blue   = (color & 0b1110000000) >> 2; // 3 bits (8 levels) of Blue
analogWrite(redPin, RED);
analogWrite(greenPin, Green);
analogWtite(bluePin, Blue);
5661  Using Arduino / Sensors / Re: Arduino IR remote keyboard, need some help! on: January 30, 2012, 10:33:20 am
If you show the sketch you have now for turning on the light, perhaps we can help.

Don't forget to use Tools->Auto Format to make it pretty.

Don't forget to use code tags around it to make it readable (the # button above the reply box).
5662  Using Arduino / Audio / Re: Mini Jack audio connection to Arduino Ethernet with PoE module on: January 30, 2012, 10:28:46 am
Did you want to digitize the audio?  The 16 MHz Arduino can acquire only 9259 10-bit samples per second (about 4.6 KHz bandwidth).  You can get 76,900 samples per second (~38.5 KHz bandwidth) at lower resolution... how much lower they don't seem to say. smiley-sad
5663  Using Arduino / Installation & Troubleshooting / Re: What to do next? Uno not working - won't program on: January 30, 2012, 09:48:24 am
Do you have a genuine "Made in Italy" Arduino UNO or the less expensive "Designed in Italy" counterfeit?

Sounds like a bad connection somewhere.  Did you try different USB cables?

If you have swapped out the USB ports and cables it might be time to try refreshing the firmware of the USB-to-Serial processor on the UNO board:
5664  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Motor Shield R3 Help on: January 30, 2012, 09:39:29 am
Can anyone help me connect a bipolar stepper motor and get it running. I have found tutorials with older Arduino Motor Shields but no the R3.  Do I connect all 4 of the stepper motor wires to the A+,A-,B+,B- ?  And then control the steps with the #12 & #13 pins (Dir A, Dir B)

Yes.  Be sure to set pins 3 and 11 (PWM-A and PWM-B) to HIGH to turn on power.  You should probably also turn 8 and 9 to LOW to turn off the brakes.

If you want to hold position without heating up the stepper you can use analogWrite() on 3 and 11 to reduce the power.  If you want to release the motor so you can turn the shaft by hand, set 3 and 11 to LOW.
5665  Using Arduino / Storage / Re: sd card as stoarge dsvice on: January 30, 2012, 09:23:42 am
Generally, no.  You would typically put the SD card into an SD card reader to read and write it on the PC.  Then take the card out of the card reader and put it into the Arduino for the Arduino to read and write.

An alternative is to use the serial port to move data between the PC and the SD card on the Arduino.  You will need to develop an upload/download protocol and write the programs at both ends (Arduino and PC).
5666  Using Arduino / Installation & Troubleshooting / Re: Problem uploading - stk500_getsync(): not in sync: resp=0xe0 on: January 30, 2012, 09:07:22 am
From the output of the batch file (you can get the same in the IDE by selecting 'Show verbose output during: [ ] compilation  [X] upload' in Preferences...) it looks like the Arduino is not responding at all.  Have you tried a loopback test to see if your USB-to_Serial is working in both directions?  The instructions are here:,73748.0.html
5667  Using Arduino / Networking, Protocols, and Devices / Re: HMC6352 Suggestions on: January 30, 2012, 08:49:33 am
The compass should work with your navigation code if you put the compass heading in place of myGPS.gprmc_course().
5668  Development / Suggestions for the Arduino Project / Re: pulseIn Bug on: January 30, 2012, 08:43:54 am
So is this "resolved" in the sense that the changed behavior is now understood?  If it's understood, is it believed to be a good change that happens to break this person's apps. or a bad changed that has caused a real bug?

The change to pulseIn() is good because it protects against a possible hang condition:  a timeout is specified and a pulse starts before the timeout but never ends.  The change increased the granularity of the pulse measurement from 0.625 microseconds to 1.3 microseconds, which is not ideal but bearable.

If you need a finer grain measurement you can re-implement pulseIn() easily enough.  Remove the timeout check to get back to 0.625 microsecond granularity.  It might even be possible to speed the code up more if you don't have to support both HIGH and LOW pulses with the same loop.  For short pulses,  using an int counter rather than long  (or even byte for very short pulses) will save time incrementing the count.

Might be able to reduce the granularity even more by simplifying the loop code a bit:
5669  Using Arduino / Programming Questions / Re: avoid delay() please help me on: January 29, 2012, 10:09:31 pm
One obvious error:
  if (val_proximity == HIGH && flag>0)
      if (val_proximity== LOW)   // You've already fond val_proximity to be HIGH so this will never be true.

Another note: once 'flag++' happens there is nothing to set flag back to 0 so it will just keep going up.
5670  Using Arduino / General Electronics / Re: need variable voltage on: January 29, 2012, 10:02:13 pm
The "analog output" from the Arduino is pulse-width-modulated 5V.  You control the duty cycle from 0/255ths to 255/255ths.  If you put that through a low-pass filter (resistor and capacitor) you can get a good approximation of a 0V to 5V analog output.  You could run an op-amp on a higher voltage (say, 12V) configured as a voltage doubler to boost the voltage range to 0V-10V.  If you want more precise control in the 9V to 10V range there is probably some way to offset the op-amp output.  Ideally you'd have the op-amp gain of 1/5th (probably takes two op-amps) and offset of 9V so you'd get 256 steps between 9V and 10V.
Pages: 1 ... 376 377 [378] 379 380 ... 540