|
6001
|
Using Arduino / Programming Questions / Re: Rewrite
|
on: April 10, 2011, 07:58:55 pm
|
This is what the 'Reset' subroutine would look like re-written for Arduino. Perhaps you can do the rest of the translation for yourself. #define IO_PIN 2 // IO PIN 3 ' Serial Data IO #define CD_PIN 3 //CD PIN 2 ' Card Detect #define CLK_PIN 4 //CLK PIN 1 ' Serial Data Clock #define RST_PIN 5 //RST PIN 0 ' Reset
void Reset() // Reset: { digitalWrite(CLK_PIN, LOW); // LOW CLK digitalWrite(RST_PIN, HIGH); // HIGH RST digitalWrite(CLK_PIN, HIGH); // HIGH CLK digitalWrite(CLK_PIN, LOW); // LOW CLK digitalWrite(RST_PIN, LOW); // LOW RST for (int index = 0; index < 4; index++) // FOR index = 0 TO 3 { Receive_Byte(); // GOSUB Recieve_Byte } // NEXT } // RETURN
|
|
|
|
|
6003
|
Using Arduino / Audio / Re: Playing speech without arduino
|
on: April 10, 2011, 07:35:34 pm
|
|
Certainly cheaper would be one FM transmitter to send the voice messages and cheap FM receivers to receive them. Plug-in FM radios, usually including a clock and alarm features, are available from thrift stores for a few dollars. That eliminates the Xbee modules.
|
|
|
|
|
6004
|
Using Arduino / Sensors / Re: pinn connections on a 3-axis gyro
|
on: April 10, 2011, 12:55:16 pm
|
|
Looks like the ITG-3200 use an I2C interface. You use the Wire library to talk to it.
From the Wire library reference: "On most Arduino boards, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5. On the Arduino Mega, SDA is digital pin 20 and SCL is 21."
|
|
|
|
|
6005
|
Using Arduino / Programming Questions / Re: String Array troubles
|
on: April 10, 2011, 12:48:55 pm
|
You can't store a string of characters in each element of a character array. You can get what you want by storing an array of character pointers instead: char *month[] ={"xxx","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
|
|
|
|
|
6006
|
Using Arduino / Microcontrollers / Re: Serial USB Board for Standalone
|
on: April 10, 2011, 12:40:36 pm
|
|
> 1. Can I use the DTR pin as shown in the circuit on arduino page to auto reset (via a capacitor).
Yes.
> 2. What is the purpose of the jumper given on the top?
As shown in the schematic, the SV1 jumper will connect +5V to the power line of the output pins, or not.
|
|
|
|
|
6007
|
Using Arduino / Project Guidance / Re: connecting many sensors- feasibility
|
on: April 10, 2011, 10:13:30 am
|
|
It takes about 100 microseconds to read an analog input so 256 of them would take at least 25.6 milliseconds or about 40 reads per second. That sounds feasible. You'll need time for setting up the address for the analog multiplexers but that should not be too bad.
If the sensors draw any significant amount of power you will need a separate 5V supply for them. Add up all the power requirements to find out how big a power supply you need.
If you want to do something fairly simple, like figure out where the greatest airflow hits the wall, the calculations will be fairly simple. If you want to forward all 256 values to a PC for analysis you might be spending more time sending the data. If you send five characters per value you will have to send at 512 kilobits per second to keep up with that rate you can read.
|
|
|
|
|
6008
|
Using Arduino / Microcontrollers / Re: External SRAM for Mega2560
|
on: April 10, 2011, 09:52:50 am
|
|
Looks like the memory constants for the ATmega2560 are here:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr/iom2560.h
Control-Click on the Arduino app and select: Show Package Contents
|
|
|
|
|
6009
|
Using Arduino / Sensors / Re: FSR Velostat pressure sensor circuit with LM324 opamp
|
on: April 10, 2011, 09:29:08 am
|
|
Something looks odd... Looks like the left OpAmp is wired as a voltage follower (negative input, pin 2, connected to output, pin 1) and the input, pin 3, is grounded. I would have expected the signal to be connected to the input of the amplifier and the output of the amplifier going to the next stage. I guess I don't understand how the circuit works.
|
|
|
|
|
6010
|
Using Arduino / Programming Questions / Re: version issues
|
on: April 09, 2011, 12:53:18 pm
|
|
I would check the release notes for V22 to see if any of the libraries you are using have been revamped.
From my limited experience almost every Arduino crash has come from not having enough RAM space for all the variables. Do you have any variables that could be declared 'const'? Perhaps if you made your code available to view we could suggest some memory saving (or spot a latent error).
|
|
|
|
|
6011
|
Using Arduino / General Electronics / Re: question about battery
|
on: April 09, 2011, 11:04:53 am
|
is there any simple way to read a battery's voltage from arduino?
For a voltage between 5V and 0V, referenced to Arduino ground: analogRead() For a voltage ABOVE 5V, referenced to Arduino ground: Voltage divider (two resistors) and analogRead() For negative voltages things get complicated.
|
|
|
|
|
6013
|
Using Arduino / General Electronics / Re: 4 wire pc fan question
|
on: April 09, 2011, 06:13:28 am
|
|
The spec doesn't say how long each pulse is but I believe they mean two full pulses per revolution LOW HIGH LOW HIGH. Make sure you use a pull-up resistor because it's an open-collector output (only drags the line down to 0v, won't supply +v).
|
|
|
|
|
6015
|
Using Arduino / LEDs and Multiplexing / Re: 70 leds one at a time
|
on: April 08, 2011, 08:10:32 pm
|
|
5 x "4 TO 16 LINE DECODER/DEMULTIPLEXERr" like the 74154 (80 pins) 1 x "3 TO 8 LINE DECODER" like the 74138 (to enable one of the 5 16-bit decoders)
7 data pins to address the two levels of selector.
If you hook a PWM line to one of the gate inputs on the 74154's you can fade each LED in and out.
|
|
|
|
|