Show Posts
Pages: [1] 2 3 ... 80
1  Using Arduino / Programming Questions / Re: Trying to include an int value as part of a character string on: January 06, 2012, 01:50:34 pm
OK, first change the declaration at the top to something like:

char msg[64]; that we reserve space for 64 chars, but we don't yet know what they are.

Then in'loop()':
   // if the current state is HIGH then the button
      // went from off to on:
      Serial.println("button pressed");
      Serial.print("number of button pushes:  ");

      snprintf (msg, 64, "test tweet number: %d", buttonPushCounter);

      if ( {
2  Using Arduino / Project Guidance / Re: Adding EEPROM or SRAM practical? on: August 26, 2011, 09:07:40 am
Remember that such an external SRAM or EEPROM will not be addressable directly by the Arduino. That is, you'd have to write explicit read and write code to access data; you wouldn't be able to just say:

my_var = 42;

but you'd have to code:

WriteToExternalRam(address, 42);

On top of that, the Arduino processor can only execute code from internal Flash memory. External memory cannot be used for program storage.
3  Using Arduino / Motors, Mechanics, and Power / Re: Converting 5v to 12v using an LM2577 - all i get is 4.8v? on: August 26, 2011, 07:11:54 am
Do you have an oscilloscope?  If so, do you know how to use it?
4  Using Arduino / Programming Questions / Re: Reverse order of Integer array. on: August 26, 2011, 05:00:25 am
So maybe use: int y = sizeof(buffer); ?

No, because 'sizeof' returns the number of bytes in the array, not the number of elements. Since an 'int' is two bytes on the Arduino, 'sizeof' will return twice the number of elements.  Try this:

int y = sizeof(buffer) / sizeof(buffer[0]);

Remember that the compiler will evaluate the two 'sizeof's and the division.
5  Using Arduino / Microcontrollers / Re: Micro printer cbm1000 circuit problems on: August 25, 2011, 08:57:25 am
Ive changed the serial port so they collate from a 9 pin to a 25 pin. ( 1=8 , 6=6, 4 = 20 , 7 = 4 , 8 =5)

Did you swap 3 and 2? They're the other way round on a 9-pin from a 25-pin. Also, 9-pin ground is 5, 25-pin ground is 7.
6  Using Arduino / General Electronics / Re: How can I use get a negative voltage for this schematic? on: August 25, 2011, 08:48:15 am
Wire up another battery, with the positive terminal connected to ground?
7  Using Arduino / Sensors / Re: Sensor wiring question on: August 25, 2011, 08:39:25 am
What I don't know is, do I need to power the sensor, or does it get the power from those 3-wires shown on the PDF?

Yes, it gets 5V power from the Arduino via the red wire in the photo (in the PDF).
8  Using Arduino / Motors, Mechanics, and Power / Re: Four wire servo? is servo library usefull? on: August 25, 2011, 08:36:13 am
That servo is missing the control board that accepts pulses, detects the servo position and drives the motor. So no, you can't use it with the servo library. You can drive the motor with an H-bridge and sense the pot with an analog input (you may need to add a third wire to the pot).
9  Using Arduino / Motors, Mechanics, and Power / Re: changing a polarity or a +/- of a dc motor? on: August 25, 2011, 08:33:29 am
Maybe an H-bridge?
10  Using Arduino / General Electronics / Re: sanity check - ampage use in projects on: August 25, 2011, 08:12:04 am
i have a bench power supply that is 12v @ 3Amp,

3 Amps is the maximum that the supply can provide. When you connect your circuit, it will draw just what it needs, as you said about 500mA. This is fine and will cause no damage to anything.
11  Using Arduino / Programming Questions / Re: More interrupt questions. on: August 24, 2011, 11:50:23 am
You have some of your variables that are shared between interrupt and main program declared as 'volatile', which is correct. But shouldn't 'setting' and 'imperialMetric' also be declared 'volatile'?
12  Using Arduino / General Electronics / Re: Backfeed diode and LM7805 on: August 24, 2011, 11:46:17 am

Yes, it is correct.

I'm not sure it is correct. As shown, the diode may make the supercap on the output discharge when the input voltage goes to zero.
13  Using Arduino / Microcontrollers / Re: What happens when you hookup a 16bit analog device to a 10bit adc on: August 24, 2011, 07:38:16 am
An analog device cannot be "16 bit". Only digital devices can be "16 bit" or "12 bit", etc. An analog device simply outputs a variable voltage or current.
14  Using Arduino / General Electronics / Re: Strip board vs Donut Board on: August 24, 2011, 07:35:52 am
Stripboard has strips of copper on it, but donut board does not. With donut board, you must connect the components with copper wire, whereas with stripboard the ready-made copper strips conenct the components. You can cut the copper strips with a "spot face cutter" if you don't want some parts connected (e.g. under a DIP IC). You can use copper wire on donut board to make connections in any shape you want, not just in strips.
15  Using Arduino / General Electronics / Re: Backfeed diode and LM7805 on: August 24, 2011, 07:33:23 am
The idea of a backfeed diode like this is to discharge the output capacitor of the 7805 when the input is switched off. This prevents damage to the 7805 due to its output being at 5V when the input is at 0V.  Now, if you have a supercap on the output, the diode may make it discharge when the power supply goes off. Is this what you want?  Or do you want the supercap to keep the 5V power supply on for some length of time?
Pages: [1] 2 3 ... 80