Show Posts
Pages: 1 2 [3] 4 5 ... 40
31  Forum 2005-2010 (read only) / Syntax & Programs / Re: simple pin timer on: September 17, 2007, 09:33:01 pm
Tip: Use boolean logic to make the above code far more efficient.

E.g.
Code:
void motorSpin()
{
  motorLeft = motorDirection;
  motorRight = !motorDirection;
}

void directionToggle()
{
  motorDirection = !motorDirection;
}

Note: Completely untested and assuming a few things. (I dont have a Arduino yet)
Tricks like this however are very efficent. smiley
32  Forum 2005-2010 (read only) / Interfacing / Re: using arduino as a joystick on: October 21, 2007, 05:51:43 am
http://www.epanorama.net/documents/joystick/pc_joystick.html
Have fun. smiley

Thats for a standard joystick port. Go buy some digital potentiometer to drive it.
You probably wont be able to make it act like a USB joystick easily.
33  Forum 2005-2010 (read only) / Interfacing / Re: LEDS and 74HC595 shift register on: September 28, 2007, 02:22:31 am
Quote
There's never any more than 1 pin on at a time, so the total amps used is only the sum of 1 pin,
I thought the 595 had all on at the same time. Its not multiplexing afterall.
34  Forum 2005-2010 (read only) / Interfacing / Re: Using Arduino Diecimila as a PC mouse on: September 27, 2007, 02:01:16 am
Quote
If your project is a one-shot thing, you can always disassemble an old mouse you happen to have in your house.
...but I suggest you stay away from the little furry ones, take one with a 5 foot tail :-)
Sorry I need some clarification.

Would this mouse be ok? ;D








On Topic: I'd imagine you could emulate the PS/2 protocol without too many problems.
35  Forum 2005-2010 (read only) / Interfacing / Re: 433mhz wireless problems on: October 03, 2007, 05:55:23 pm
Also it chews cycles doing that which could otherwise be used to do productive things.
36  Forum 2005-2010 (read only) / Interfacing / Re: 433mhz wireless problems on: September 29, 2007, 06:17:41 pm
Quote
Certainly it becomes more complex, but I thought add some control data
Look up how Wifi/Ethernet works.

Basically if data needs to be sent then it listens for a random amount of time and if its clear it asks "Hey I want to talk."
If that transmits fine (e.g. doesnt collide) then it transmits the data.
37  Forum 2005-2010 (read only) / Interfacing / Re: 433mhz wireless problems on: September 29, 2007, 01:28:34 am
Quote
So - two-way isn't possible?
Apparently not with one pair but you could always use two pairs.
Not sure if interference becomes a problem. If you cant change the frequency then you'd need to make a protocol to stop collisions.
38  Forum 2005-2010 (read only) / Interfacing / Re: 433mhz wireless problems on: September 29, 2007, 01:04:03 am
Wow nice.

What kind of corruption? The same type as above or 'noise' corruption from the distance?
39  Forum 2005-2010 (read only) / Interfacing / Re: 433mhz wireless problems on: September 28, 2007, 06:26:29 pm
Quote
Regarding sorting out a basic packet, do I literally send a bunch of zeros, the a start sequence, then the data, the stop sequence ?
I think I will need to identify a the sender and recipient (might just be 8 bits).
Do I need a checksum too ?
I'd do something like send '0123456789HDRMydatahereEND'
On the receiving side I'd just sort through the data until I saw HDR (header) and cut when I saw END.

Should do the trick. smiley
40  Forum 2005-2010 (read only) / Interfacing / Re: Engraving Software on: February 10, 2008, 10:35:49 pm
Yes its possible but you'll want to know the file format your targeting fairly well.
Lines wouldnt be difficult.
41  Forum 2005-2010 (read only) / Interfacing / Re: Multiple byte serial input on: February 10, 2008, 10:46:03 pm
What program will be doing the sending?

Its easiest to convert the numbers to binary and put a 'marker' between numbers.
For between 1 to 1,000 I'd use a short (two bytes) followed by a null (0x00).

That way its easy for the Arduino to use (one bitshift will combine the two bytes back in to a short in the Arduino) and the protocol is simple.
42  Forum 2005-2010 (read only) / Interfacing / Re: Trouble recieving data on: November 15, 2007, 12:45:49 am
I'm using Linux so interfacing PHP to the serial port is relatively easy.
Apparently its next to impossible on Windows. smiley-razz

And I am using a daemon. PHP isnt just a web language. smiley

My problem is receiving the ACK packet the Arduino is sending.
I'm either getting nonsense or nothing with multiple different methods.
43  Forum 2005-2010 (read only) / Interfacing / Trouble recieving data on: November 08, 2007, 10:44:00 pm
I'm trying to send data to my Arduino as fast as possible with PHP.
The actual speed doesnt matter. Faster is just better.

My problem is unless I have a 50 - 100ms sleep, the serial buffer overflows.
Instead of having a fixed delay I decided to add a ACK packet so it delays as little as possible.
I cannot seem to receive the packet though.

I've tried using both serproxy and a serial class (on phpclasses.org) for talking to serial.
Neither will give me the ACK byte though. I've tried sending 0x01 and 0xFF.

I need the bidirectional data because I've got some sensors in the mail which need to send data back to the PHP script.
44  Forum 2005-2010 (read only) / Interfacing / Re: Wire Library 32 byte limit on: November 05, 2007, 07:54:40 pm
Dont tell me your trying to read all 2k in one go?
The Arduino's RAM is only 1k.

You should be reading in smaller chunks. Preferably only what you need.
45  Forum 2005-2010 (read only) / Interfacing / Re: Serial communication with computer on: October 30, 2007, 06:22:13 am
Quote
Would it be correct to asume that the other parameters are allways fixed at these settings :  8 data bits, 1 stop bit, no parity, no hardware flow control ?
Not sure about that. Looking at the source would reveal that sort of stuff.
On the playground there is a command for Linux which allows you to use the serial port as a standard terminal. It would also have the full parameters.

Quote
Does the Hyperterminal interogate the FTDI driver and ask for it's capabilities or are these values just generic valus used for any COM port ?[/quotes]
They are standard baud rates. Serial ports are 'dumb' and cant be interrogated.

Quote
Can the Arduino board communicate at speeds over 115200 baud ?
Damn. Its a 16mhz chip. What are you trying to do to the poor thing? ;D
I dont think the FTDI can handle faster though.
Pages: 1 2 [3] 4 5 ... 40