Show Posts
Pages: 1 [2] 3 4 ... 17
16  Forum 2005-2010 (read only) / Syntax & Programs / 'Hard' Serial Interrupts? on: June 15, 2009, 08:04:25 am
Hey guys,

I'm looking for a way of recieving interrupting when a 'hard' Serial message has been recieved and handle processing accordingly.

I believe the best example is with the 'Wire' Library which has two methods, onReceive and onRequest.

Does anyone have any tips?
17  Forum 2005-2010 (read only) / Syntax & Programs / Re: Problem putting funct in ext c file and pointers on: May 04, 2009, 04:38:44 pm
Zip it all up my good man...
18  Forum 2005-2010 (read only) / Syntax & Programs / Re: Problem putting funct in ext c file and pointers on: May 04, 2009, 07:09:37 am
1000 Lines long! Wont you start struggling to find eeprom for a program that size!

Skynet here we come.

Try zipping it up if the problem persists, we can try and figure it out
19  Forum 2005-2010 (read only) / Syntax & Programs / Re: Problem putting funct in ext c file and pointers on: May 03, 2009, 06:02:14 am
First up.. Post *all* your code. It'll make it easier to identify the problem..


Secondly. What's the purpose of "POWERCELL2_ON;" .... You can't do that.

If it's an enumeration or defined int then you need to assign it to something.

varx = POWERCELL2_ON;

or POWERCELL2_ON();

Post your compiler error...
20  Forum 2005-2010 (read only) / Syntax & Programs / Re: continuous servo limitations on: April 27, 2009, 06:03:18 pm
A couple of high level limitations:

Speed: Servos arn't fast...

Control: It's hard to control the servos. You dont actually know where the servo is. It'll be a case of gestimating travel.
21  Forum 2005-2010 (read only) / Syntax & Programs / Arduino movement tracker (with Servos) on: April 26, 2009, 03:33:41 pm
Hey guys,

At the moment I'm working on an aspect of a larger project and I'm trying to construct a tracker - something which can essentually follow a moving object. "The fish following the finger" trick you tried as a kid would be the closest idea.

So far my test setup is pretty basic. Couple of servos hooked up to a TLC5940 and a URM37 providing the distance measurement.

Over 180 degrees it takes a reading and simply chooses the closest measurement.

You can check out the concept here (mp4 video or .rar)

[edit] with laser (everyone loves lasers right?)


Anywho, I've been searching around and I've not actually seen any examples. I know people have done something similar for nerf guns and various other turrets. Does anyone have any handy links?
22  Forum 2005-2010 (read only) / Syntax & Programs / Re: Hmm, a library I'm writing wont link. Any thoughts on: April 26, 2009, 09:04:00 am
Hey Follower, without the original code the post wouldn't have made sense anyway.

I thought it better to highlight the problem I had rather than leave some confusing post up smiley.


For the complete and correct code see here
23  Forum 2005-2010 (read only) / Syntax & Programs / Re: Hmm, a library I'm writing wont link. Any thoughts on: April 25, 2009, 07:03:44 am
Fixed
24  Forum 2005-2010 (read only) / Syntax & Programs / Re: Hmm, a library I'm writing wont link. Any thoughts on: April 25, 2009, 06:40:56 am
Quote
I think you need to show us your demo sketch that's failing to compile as well.

--Phil.

Hey Phil, The code is *seriously* simple. Nothing more than firing the constructor and requesting begin
Quote
#include <URMSerial.h>

URMSerial urm

void setup() {
  Serial.begin(9600);                  // Sets the baud rate to 9600
  urm.begin(2,3,9600);
//urm.requestMeasurement();
  Serial.print("Hey");
  delay(200); //Give sensor some time to start up --Added By crystal  from Singapo, Thanks Crystal.
}

void loop()
{
  /*urm.requestMeaurement();
  bool flag = true;
  while(flag)
  {
    if(urm.hasReading())
    {
      Serial.println(urm.getDistance());
    }
  }
*/
}



@mikalhart

Ah thanks a lot, I forgot to de-reference serial (my C++ is VERY rusty, .NET and Java have spoiled me!

I haddent thought of deriving from SS, that may be a good idea considering the URM has a bunch of additional functions you may want to manually request.

At the moment, I want to brush up on my C++ and then I'll focus on the elegance and performance.


How would you suggest initalising that command, seems odd considering you can't initalise in the header.

Oh final node: what library is "delay" in. stdlib?
25  Forum 2005-2010 (read only) / Syntax & Programs / Hmm, a library I'm writing wont link. Any thoughts on: April 24, 2009, 09:58:11 pm
All sorted...

Will be releaseing the library soon[ish]

For others:
The AVR C++ libraries dont actually support new or delete operators implicitly. If you want to do

Foo bar = new Foo();

You actually have to write the object so it includes an associated function which mallocs or deletes the required memory.

<< Learnt that the hard way
26  Forum 2005-2010 (read only) / Interfacing / Re: Upload data to One.com domain with Ethernet Shield on: May 05, 2009, 12:02:07 pm
In addition to "Coding Badly"'s comment... It's down to the way web-servers can host multiple sites on a single web-server. They use a technique called "Virtual hosts", as he pointed out if you pass a hostname to the server it'll serve the associated site you're after.

A web browser will do something like this:
Find IP address for www.arduino.cc. Resolves to: 216.38.50.214
Request 216.38.50.214 including header www.arduino.cc
Server recieves request. Notices header, returns associated site.

Hope that clears up the "why"
27  Forum 2005-2010 (read only) / Development / Re: NewSoftSerial Library: An AFSoftSerial update on: May 02, 2009, 12:09:11 pm
Hey guys, great work!

Can I make a simple suggestion. For my library I had to create a branch of your library to support dynamic instancing (AVR-GCC doesn't support the new operator implicity?!). This support can be added in about 4 lines (download the library to see).

Throwing that in would be really useful for devs like myself. Cheers
28  Forum 2005-2010 (read only) / Development / Re: Arduino Sine wave Generator on: December 02, 2009, 08:17:21 am
That's very interesting!

That could be useful for testing circuits when you need to generate a sinewave...

I wonder if I could use this for a DC-AC inverter? I'm using a 555 timer at the moment but I'm struggling finding the perfect frequency
29  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: December 20, 2009, 02:52:47 pm
Hmm, Unless someone took it off it should still be there. A little hidden maybe smiley-wink
30  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: December 20, 2009, 07:50:30 am
Hmm, you shouldn't see a crash at 85F, there could be a fault. I'll take a look when I get a chance.

You shouldn't need to use begin more than once
Pages: 1 [2] 3 4 ... 17