Show Posts
Pages: 1 ... 161 162 [163] 164 165 ... 169
2431  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 02:37:26 pm
Quote
What do you mean? Can I decouple the AVR from the FTDI chip and then use the FTDI to interface the dosonchip module to the USB port?
I meant decouple the AVR from the FTDI and use the AVR's UART to talk to the dosonchip module, although now that you mention it you could pull the AVR from its socket and use the FTDI to talk to the dosonchip.

-j
2432  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 01:18:50 pm
Quote
I still have pc's with a RS232 interface. But no max232 or something like that to get the dosonchip voltages to rs232 levels.  
I tried to get it going with a software serial port on the arduino but it didn't work.  
You could try the arduino's hardware UART (e.g. pin 0 and pin 1) - switch to external power (to disable the FTDI chip) and you can hook the dosonchip TTL level 232 to the arduino's TTL level 232.

-j
2433  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 12:20:14 pm
Have you tried using rs232 instead of SPI for the dosonchip?  This thing is on my wishlist, and I'm curious to see how well it works.  I think there's another vendor with a similar device, but I can't remember details (sorry).

One way to use SD/CF/etc is to simply use the SPI interface and use it as a chunk of flash memory.  Of course, you won't have a filesystem left so you can't just plug it in to a cardreader and grab a data file (although a linux user should be able to use dd to pull the entire contents off easily).

A trick I've heard about (but haven't tried) is to create a dummy file with junk in it, fighure out where that file starts on flash, then make sure you skip that many bytes (and don't write past the length of the file) when writing to the flash device.  I don't particularly like the sound of this, but it does have the potential of being the cheapest in terms of interface hardware and software development.

Then again, you can always implement FAT in arduino and share your hard work with the rest of us.  smiley

-j
2434  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Analog tilt sensors on: March 01, 2007, 06:46:36 pm
the one I linked to is a 5V 3-axis.

-j
2435  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Analog tilt sensors on: March 01, 2007, 05:27:50 pm
Yes, but not directly powered from the arduino; th arduino is 5V, and this one needs 3V (2.0 ro 3.6V, according to the spec sheet).

In addition, you'll need to either configure a 3V analog reference, or sacrifice 40% of your resolution because the Atmel's ADC is in reference to 5V.

Instead of the one you reference, I'd try this one http://www.sparkfun.com/commerce/product_info.php?products_id=847 (or one in that family) since it can operate on 5V.

-j
2436  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Analog tilt sensors on: March 01, 2007, 07:13:06 am
Sorry, I don't remember enough about the math to help you out, but you can get the hardware at Sparkfun - they have several models, both bare ICs and breakout boards.

http://www.sparkfun.com

-j
2437  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Analog tilt sensors on: February 28, 2007, 07:09:34 am
An acceleromteter measures acceleration, including the constant 32 ft/s2 acceleration due to the earth's gravity.  You'll have to do a bit of math, but a three axis accelerometer will tell you lots about orientation of the device.

-j
2438  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino as a cheap DAQ-I/O alternative on: February 16, 2007, 06:29:49 pm
Well, if you had code that was a bit more specific on which inputs you wanted to sample it would likely be simpler.  General purpose is ususally harder than specific.  On the other hand, this program (that's already written for you  smiley-wink )may do everything you ever need...

On the opposite end of the spectrum, I threw together a program that read a three axis accelerometer module; it was about 15 lines long and took about 5 minutes to write, breadboard, and see results.  Not sophisticated, but I could verify that both the accelerometer and the gravity in the lab worked.

-j
2439  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: power on the NG board on: February 22, 2007, 07:40:12 pm
The regulator is a 78m05 - 12V is no problem.

-j
2440  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Losing sleep over rewiring the LED Cube Matrix on: February 12, 2007, 05:15:57 pm
I suppose you have them plugged into the analog pins on purpose?  the diagram makes me think you meant digital pins 2/3/4.

-j
2441  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: hall sensor on: February 01, 2007, 09:16:25 pm
There are simple magnetic switches used in intruder alarm systems that have a magnet-activated switch (called a reed switch).  This may be simpler than figuring out a hall effect sensor.

-j
2442  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Writing a function on: January 25, 2007, 09:50:17 am
Quote
What areas of the C Language are not supported?
Arduino isn't really a language, it is a combination of an interactive development environment (IDE) and a set of C and C++ libraries, all designed to simplify AVR programming.  It is built on avrlib, which in turn uses the gcc compiler for the Atmel AVR architecture.  As far as I know 100% of C and most of C++ is supported.

If you are used to programming C or C++ on a machine that has an operating system, the biggest difference you will see is the huge number of libraries you take for granted are not available on the Arduino, because there simply isn't room for them, and there isn't an operating system to lean on.  Many people confuse the C language with common library functions; e.g., printf() is not part of the C language. smiley

Sorry I can't recommend a C tutorial, but it's been so long since I learned it that any sources I could remember wouldn't be relavant.

-j
2443  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Writing a function on: January 25, 2007, 07:04:15 am
Code:
#define YELLOW_LED 8
#define RED_LED 9
#define BLUE_LED 10

void flash_led(byte led)
{
    digitalWrite(led, HIGH);
    delay(500);
    digitalWrite(led, LOW);
    delay(500);
}

void setup()
{
    pinMode(YELLOW_LED, OUTPUT);
    pinMode(RED_LED, OUTPUT);
    pinMode(BLUE_LED, OUTPUT);
}

void loop()
{

    flash_led(YELLOW_LED);
    flash_led(RED_LED);
    flash_led(BLUE_LED);
}


This will flash each LED once, in sequence, forever.

-j
2444  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Writing a function on: January 18, 2007, 07:35:19 am
You've already written two functions if you successfully compile an arduino sketch; they're called setup() and loop().  These functions return no values (in C they return a void type).  In other languages they might be called procedures, but C doesn't differentiate - they're all functions.

Here's a toy example:

Code:
int plusone(int x)
{
    return x + 1;
}

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    static int n = 0; // static, so that its value is kept between function calls

    n = plusone(n);
    Serial.println(n, DEC);
    delay(5000);
}

In this example the fucntion plusone() takes a single integer as an argument and returns an integer.

Hope this gets you started.  Look for a good book or online tutorial on learning C, and remember in arduino the function main() is already written for you, and it calls your setup() function once and calls your loop() function once every time through the event loop.

-j
2445  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino board & stability on: January 18, 2007, 02:22:53 pm
On the millis() wraparound issue:  is there a safe way to reset the counter?  If I use it I should theoretically know when it's safe to reset and when it isn't.

Perhaps an appropriate function be provided to reset it?

Does the arduino actually hang due to this, or only if you happen to be in the middle of a particular library call when it happens?

-j
Pages: 1 ... 161 162 [163] 164 165 ... 169