Show Posts
Pages: 1 ... 381 382 [383] 384 385 ... 598
5731  Using Arduino / General Electronics / Re: Arduino MEGA2560 USB parts identification on: May 05, 2012, 11:29:48 am
Without looking at the circuit, I'll stick my neck out and say that looks like 22 ohms in "resistor network '2D'".

On the schematic it looks like there are five resistor networks:
RN1: Quad 10k (one is unused)
RN2: Quad 22 Ohms (two are unused)
RN3: Quad 1k (one is unused)
RN4: Quad 1k
RN5: Quad 10k (one is unused)
5732  Using Arduino / Programming Questions / Re: Mapping and Global Variables on: May 04, 2012, 05:50:18 pm
To get the new value of the analog input you have to do another analogRead().  You set sensorA0 (et al) at initialization time and never set it again.


Note: 'int' is plenty long for an analogRead() (10 bits value).  Using 'long' is a waste of space and time.

Time values should be 'unsigned long', not just 'long'.
5733  Using Arduino / Programming Questions / Re: Example code not working (wire.write and wire.read) on: May 04, 2012, 09:11:52 am
Perhaps you have an old copy of the Wire library somewhere.  "As of Arduino 1.0, the library inherits from the Stream functions, making it consistent with other read/write libraries. Because of this, send() and receive() have been replaced with read() and write()."

Check the "libraries" folder in your sketch folder to make sure you don't have an old Wire library.
5734  Using Arduino / Programming Questions / Re: Example code not working (wire.write and wire.read) on: May 04, 2012, 09:00:52 am
Perhaps that code was written for an earlier version of Arduino.  There were a number of changes in 1.0, probably including changes in the Wire library.
5735  Using Arduino / Sensors / Re: current transducer. on: May 04, 2012, 08:17:19 am
can i just use the output from it (2.5 to 4.5v) without any other circuitry straight into an analog input?

Yes.

In the spec sheet it quotes Rl  (load resistance) should be greater than 2k should there be a 2k resistor to ground?

No.  The input impedance of the Arduino is >2K so you should be able to connect the output directly to it.  Just hook "5V" to +5V, "0V" to Ground, and "OUT" to an analog input pin.
5736  Using Arduino / General Electronics / Re: Arduino MEGA2560 USB parts identification on: May 04, 2012, 08:06:04 am
The PDF version of the schematic shows:

Z1 and Z2 are CG0603MLC-05E.  Google shows those to be Bourns ChipGuard MLC-series ESD protectors (varistor).

F1 is MF-MSMF050-5.  Google says that's a Bourns PTC Resettable Fuse.

L1 is a BLM21 which is a 2012 size surface mount inductor.  The schematic doesn't specify a value.  Perhaps the design files do.
5737  Using Arduino / General Electronics / Re: Current Consumption in Ardunio Mega on: May 04, 2012, 07:32:55 am
Yes but I would expect that it takes 60mA no matter how you power it.

I think I understand.  At 5V it would be drawing 60 mA (0.3 Watts). at 10V it would be drawing 60 mA (0.6 Watts) and at 12V it would be drawing 60 mA (0.72 Watts).  Same current, more wattage.  With the additional wattage being dissipated as heat in the regulator?
5738  Using Arduino / Microcontrollers / Re: Bootloader for Pro-Mini - Atmega328 3.3V 16MHz on: May 04, 2012, 07:22:24 am
Then why would they say it can't run at that speed at that voltage?

They know from testing that some of their parts will fail under those conditions.  They want to be able to tell people who run under those conditions that they clearly state in the datasheet that you should NOT try to run under those conditions.  "You cannot expect to hold us responsible for systems failure when you run the processor outside the specified parameters."
5739  Using Arduino / Project Guidance / Re: Chronometer for modelism project ! on: May 03, 2012, 11:46:48 am
Perhaps this example will help.  Segments are connected to pins 5 through 12.  Digits are connected to pins 14, 2, 3, and 4.

Code:
// Digit select lines, right to left
#define DIGIT4 14  // LSD
#define DIGIT3 2
#define DIGIT2 3
#define DIGIT1 4  // MSD

// Bit maps for the seven segment display
const unsigned char Segments[] =
{
  0b11000000, // 0
  0b11001111, // 1
  0b10100100, // 2
  0b10000110, // 3
  0b10001011, // 4
  0b10010010, // 5
  0b10010000, // 6
  0b11000111, // 7
  0b10000000, // 8
  0b10000011, // 9
};


// List of digit select lines, least significant digit first
const unsigned char Digits[4] = {
  DIGIT4, DIGIT3, DIGIT2, DIGIT1};


void setup()
{
  for (int i=2; i<15; i++)
  {
    pinMode(i,OUTPUT);
    digitalWrite(i,LOW);
  }
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
}

void loop()
{
  // Get time since last reset
  int clock;

////////  Set 'clock' to the 4-digit integer to be displayed

  // Display each digit, right to left
  for (int i=0; i<4; i++)
  {
   
    // Peel a digit off the low end of the number
    int digit = clock % 10;
    clock /= 10;
   
    // Blank the MSD if it is zero
    if (i==3 && digit == 0)
    {
      for (int s=5; s<12; s++)
        digitalWrite(s,HIGH);
    }
    else
    {
      // Display the digit on the seven segments
      unsigned char segments = Segments[digit];
      for (int s=5; s<12; s++)
      {
        digitalWrite(s,segments & 1);
        segments >>= 1;
      }
    }

    // Turn on the digit briefly
    digitalWrite(Digits[i], HIGH);  // Select one digit
    delay(3);
    digitalWrite(Digits[i], LOW);
  }
}
5740  Using Arduino / Networking, Protocols, and Devices / Re: Query please guide on: May 03, 2012, 11:38:45 am
Your problem there is that 0x0B doesn't fit in three bits.  smiley-sad

Do you have a pointer to the documentation?  Perhaps someone else reading the document would be able to interpret it for you.
5741  Using Arduino / Project Guidance / Re: Java on Arduino on: May 03, 2012, 11:34:28 am
You may be in luck.  There is a Java Virtual Machine for the AVR family of processors of which the ATmega328p is a member:

http://www.harbaum.org/till/nanovm/index.shtml

Looks like your Java byte code goes into EEPROM.

The source code can be downloaded from http://sourceforge.net/projects/nanovm/
5742  Community / Gigs and Collaborations / Re: Looking for some help, need simple code for project on: May 03, 2012, 11:25:07 am
You should probably get a realtime clock (RTC) chip to track time.  The Arduino is not very good at it.

Code:
void loop()
    {
    int hour, minute;

    hour = RTC.GetHour();  //  Get the hour (0-11) from the RTC chip
    minute = RTC.GetMinute();   //  Get the hour (0-11) from the RTC chip

    int ledIndex =  ((60 * hour) + minute) / 5;
    }
5743  Using Arduino / General Electronics / Re: Current Consumption in Ardunio Mega on: May 03, 2012, 11:15:09 am
The Arduino Mega draws about 60 mA when you power it from 12V through the built-in regulator.  Much of that power is lost in the regulator.
5744  Using Arduino / Microcontrollers / Re: Bootloader for Pro-Mini - Atmega328 3.3V 16MHz on: May 03, 2012, 11:05:09 am
Check the Atmega328 datasheet.
Atmel states that the ATmega328 cannot run at 16 MHz with only 3.3v
It can't work

"Not guaranteed to run" and "cannot run" are two different things.  Lots of people run their 16 MHz ATmega at 3.3v and they almost always work. smiley
5745  Using Arduino / Installation & Troubleshooting / Re: Webclient W5100 shield works only on port 80? on: May 02, 2012, 06:05:30 pm
Makes no sense to me.

Have you tried changing "GET /search?q=arduino HTTP/1.0"?
Pages: 1 ... 381 382 [383] 384 385 ... 598