Show Posts
Pages: 1 [2] 3 4 ... 9
16  Using Arduino / Project Guidance / Re: Using Arduino and Two GPS's on: February 17, 2011, 02:23:19 pm
How close is it going to follow? Would there be a delay?

On a good day GPS is accurate up to 12 feet.  On average with a day that isn't too cloudy with direct line of sight to the sky 15-20 feet is typical.

I wonder if some type of radio signal on the leader and a signal strength detector on on follower.  It would be like those automatic solar panels that use two photo sensors.  It keeps rotating until the sensors read the same amount to keep the panel looking directly at the sun.
17  Using Arduino / Storage / Re: Need read/write times for SD lib to be faster on: February 17, 2011, 02:19:33 pm
Does the SD card class make a difference or is it the hardware most Arduino users use?  Could we get full speed from a class 10 card?
18  Using Arduino / Networking, Protocols, and Devices / Re: dual serial communication problem (GSM + GPS) on: February 11, 2011, 04:31:30 pm
Thanks for the info.  I see two routes to take.  Cellular is one, the other is APRS and ham radio.
http://trackuino.blogspot.com/

It isn't hard to get a ham radio license.  And it is a standard data format.  There are several sites you can use to track that data onto google maps.
http://aprs.fi/?call=a%2FN0KFB&mt=roadmap&z=14&timerange=21600
19  Using Arduino / Networking, Protocols, and Devices / Re: dual serial communication problem (GSM + GPS) on: February 11, 2011, 10:53:21 am
What service/plan is your unit going to use, if you don't mind me asking?
i ask because I recently asked a GSM related question in project guidance
http://arduino.cc/forum/index.php/topic,51823.0.html
20  Using Arduino / Project Guidance / Re: Car led system or CARduino on: February 10, 2011, 04:32:45 pm
I have been doing something similar over the last year for my motorcycle.
http://arduino.cc/forum/index.php/topic,8381.0.html

I started it last spring.  But then the weather got warm and I would rather spend my time on the motorcycle smiley  I was also delayed because customs held my bliptronic leds for a couple of months.

I have gone through 4 different designs because I keep adding features.  I'll give you a quick summary of what I have done and why.
My original plan was to make some accent LEDs that I can control and make custom effects.  I wanted to control them remotely and I wanted the ability to add effects later on easily.  I found a 4 button remote.  I will have a microsd card holding animation information.  Some animations have to be programmed - anything that has random numbers.  The microsd card will will contain frame based effects. 

I started with a tlc5947 led driver chip as that is the first thing I came across in my research.  The first video in that post is me making sure I can control the chip.  Those LEDs are once I had around and they are a pain to work with.  I found a led strip on ebay that takes 12v (perfect for a car or bike) that could be cut and used like individual LEDs with the tlc chip.  I got that all working fine.

Then I saw the Bliptronic pixel LEDs.  I really liked that idea over the tlc5947 because it would be a lot less wiring.  In a car, you can hide wires in door panels and such.  On a motorcycle, not so much.  So I picked up some of those.  They work great but I ran into a problem.  Since you have to manually control the PWM cycle that takes up processing power.  Some of my more complex animations affected that causing the LEDs to flicker. 

Luckily, the next week Sparkfun came out with their addressable LED strip.  The chip they use has it's own PWM cycle.  That is a super easy LED strip to work with.

Right now I am in the process of converting the code to a Netduino Plus.  The Netduino Plus has built in ethernet and microsd.  This gives me more I/O pins for future expansion.  Plus the fact that I can do line by line debugging makes it easy to code. I am going to use a small wifi router connected to the ethernet port and control it with my ipod touch instead of the remote.

I am still going to finish the project with the Arduino as my sister wants the basic setup on her bike.  One idea for future expansion is to use xbee or some other wireless communication between my bike and my sister's bike to have in sync animations when our bikes are next ot each other.

When I ordered the Bliptronic LEDs I also grabbed the audio analyzer shield.  I will add some modes where the LEDs are controlled by music.

Finally, FYI, the US government definition of amber warning lights is actually orange.  100% red, 50% green.  I was going to use my LEDs as running lights (anything to make a motorcycle more visible) but running lights are only legal on trucks and emergency vehicles.
21  Using Arduino / Project Guidance / Using a cellular module on: February 10, 2011, 03:21:04 pm
I am working on a HUD speedo for my motorcycle.  It should be easy enough, just and arduino, gps shield, and 4 digit 7 segment led.  I got that part working (other than a defective gps module).  This got me thinking, I will always have a gps on my bike then maybe I can track my bike.  After some research it seems the best way to do this is to get a cellular shield and send SMS somewhere.

i have a couple questions about this.  First, does anyone have experience with this in the US?  If so what cell plan do you have? 

I only need a text plan and I found one from a company called Qwert that offers 400 messages a month for $11 or unlimited for $20.  After reading their terms agreement I could do the 400 per month if I am careful.  I wonder if this is enough.  I would have to keep track of how many are sent and find a rate that keeps me within that limit.  Maybe base in on once every 5 minutes or every 2 miles or something.  I would have a switch so I can manually keep the device from sending messages if I need to.  Then to create balance have a button to force a message to be sent.  If the message count is high, say 370 or greater, I can indicate that by turning on one of the decimal points.  If at limit I could turn on all decimal points.

The other issue is to get the SMS messages to google maps.  I think I have a solution for this.  Send the SMS to a twitter account.  The SMS will be in the format of RideID, TimeStamp, Long, Lat.  Then I could make a php script on my website to use the twitter api that gets the last 20 status messages and put them on a google map.  This seems kind of like a hack though.  Anyone know a more elegant way?
22  Development / Suggestions for the Arduino Project / SD card suggestion on: January 26, 2011, 02:07:35 pm
Some type of mechanism for traversing through the files of a directory.

In sdfatlib you did something like this:
dir_t dir;
char name[13];
while(folder.readDir(&dir) != sizeof(dir))
{
SdFile::dirName(dir, name);
//Then do whatever with the file or file name
}
23  Community / Website and Forum / Add a data storage forum? on: January 26, 2011, 11:34:28 am
Add a data storage forum to talk about SD card, eeproms, etc...  The SD card thread in the old forums was one of the largest.
24  Forum 2005-2010 (read only) / Troubleshooting / Re: Possible bug with % operator: can you repeat it? on: February 12, 2010, 01:13:05 pm
ind is an int.  MAX_NUM is 10.  When ind is 0 it will end up at -1 without that if.

Edit: ok, so signed behaves differently.  Will switch to unsigned.
25  Forum 2005-2010 (read only) / Troubleshooting / Possible bug with % operator: can you repeat it? on: February 12, 2010, 12:43:39 pm
I have to try this with 0018, I just realized I am on 0016.  This is why I am not posting it in the bugs forum.  I am not going to have access to my project for a couple of days.  Does this problem occur with someone else?

I have to do this
Code:
ind = ((ind-1) % MAX_NUM);
if(ind < 0) { ind = MAX_NUM-1; }

It seems like mod isn't working when I subtract values.
26  Forum 2005-2010 (read only) / Syntax & Programs / Re: Counting Elements in an array passed to a function on: October 04, 2010, 07:04:41 pm
Quote
I can't figure out how to get the size of the array the pointer points to inside the function.
Not possible.  You send in a pointer to an array, which just points to where in memory the array is at.  No way to get size off a memory pointer.  That is why functions that allow you to send in an array also ask for size of array.
27  Forum 2005-2010 (read only) / Syntax & Programs / Re: determining if enough to memory to dynamic alloc on: February 11, 2010, 08:20:07 pm
Is there any other way than reading a file into memory?  Most fat libraries I see only do writing for gps logging.  I haven't seen much for reading sd cards.  

The file format will be:
first byte is the number of commands available
second byte is type of command
Then for however many commands there are a byte containing a delay in millisecond to run next command.
The rest of the file will be the commands - individual command size will depend on command type.
28  Forum 2005-2010 (read only) / Syntax & Programs / determining if enough to memory to dynamic alloc on: February 11, 2010, 04:37:28 pm
I am trying to figure out how to determine how much memory there is, either eeprom or progmem, and if there is enough memory to allocate an object.

What I plan on doing is have a microSD card with files on it.  The files will have commands.  This way I can add more commands just by dropping files onto the card.  Obviously then the number of commands in a file is dependent on the amount of memory available to load the file.  so I will need to determine if a file can be loaded.

any ideas?
29  Forum 2005-2010 (read only) / Syntax & Programs / Re: division on: October 07, 2009, 01:15:59 am
Do you have to do the 5.0f thing with the arduino code?
30  Forum 2005-2010 (read only) / Syntax & Programs / Re: Boolean Vs. Bitwise on: October 07, 2009, 02:51:55 am
Why would you use bitwise operators?  It can save memory and it is fast.


Let's say you have 8 LEDs, each connected to a pin on the arduino.  This means one the first pass the first LED is on and the rest are off.  On the next pass the second LED is one and the rest are off.  On the third pass the third LED is on and the rest are off.  And so forth, repeating over and over.

To do this you will need to keep track of the state of each LED so you know if you need to turn it on or off.  Many new programmers would make an array of integers like int led_states[8];  Then set each array value to HIGH or LOW.  There's a lot of wasted space there since we just need to know 1 or 0.  We can store the information in a single uint8_t value where each bit is the state of the corresponding LED.


To make a chase animation you could do something like this (assuming the LEDs are pin 5-13):
Note: this is still some sloppy code, I know some are saying it can be written better.  I wrote it this way so it is obvious what is going on.
Code:
uint8_t led_state = 0;   //start state of 00000000 in binary

void loop()
{
      //shift value to the left one space
      //For example 00000001 becomes 00000010
      led_state <<= 1;

      //check if we shifted the 1 too far
      if(led_state == 0)
            led_state = 1;  //reset to 00000001
      
      //update the LEDs
      for(int i = 0; i < 8; i++)
      {
            //First shift 1 to the left to the LED we are checking
            //then AND that result with the the led_state to filter that bit
            //then shift back to the right so we have either 1 or 0 (HIGH or LOW)
            digitalWrite(5+i; ((led_state & (1 << 1)) >> i));
      }
}
Pages: 1 [2] 3 4 ... 9