Show Posts
Pages: 1 ... 43 44 [45] 46 47 ... 67
661  Using Arduino / Networking, Protocols, and Devices / Re: Problem reading serial data on: December 06, 2012, 08:37:49 am
Sounds similar to this post:,135973.msg1022262.html#msg1022262

662  Using Arduino / Networking, Protocols, and Devices / Re: Problem reading serial data on: December 06, 2012, 08:32:24 am
Looks like it should work.  Might help to know a little more about the hardware setup.   What kind of electrical output does the GPS have (RS-232, 5V TTL serial, or 3.3V TTL serial), and how do you have it connected?

663  Using Arduino / Networking, Protocols, and Devices / Re: Problem reading serial data on: December 06, 2012, 08:15:18 am
Try Serial.begin(4800) in the arduino program.  The baud rates have to match or you get garbage like that.

664  Using Arduino / Storage / Re: SD writer code ultra light on: December 05, 2012, 08:47:16 am
That is great.  I will try it with Bitlash and celebrate the extra free RAM.  Thank you.

Are there any differences in the API compared with its bigger cousin that one should be aware of?


665  Using Arduino / Project Guidance / Re: Sync multiple arduino-based clocks on: December 05, 2012, 08:36:30 am
One low-cost wireless approach would be to use the 433MHz  send/receive modules and the VirtualWire library to send an occasional sync signal.

Available many places, including Sparkfun:

666  Community / Bar Sport / Re: Do these people get paid by the LOC? on: December 05, 2012, 08:14:24 am
Some mistakes were built to last:

667  Using Arduino / Project Guidance / Re: Telescope control indiserver - Firmata - real time commands on: December 03, 2012, 05:46:58 pm
Sounds like you have all the pieces already; you don't need Bitlash in your setup, but you may need to modify the Firmata on the arduino to accept the pointing commands.  That's where I'd start to dig.

668  Using Arduino / LEDs and Multiplexing / Re: Arduino Serial Monitor on: December 03, 2012, 04:50:05 pm
Spot on.  time.sleep(2) after you open the serial port usually does the trick.

669  Using Arduino / Project Guidance / Re: Wind Visualiser Project on: December 03, 2012, 04:39:21 pm
Interesting project.

I don't know if it's your bug, but this line jumped out at me:

int x, iSpeed;

Shouldn't they be unsigned long, since speed is?


Edit: never mind, I see they are the scaled output.

670  Using Arduino / Programming Questions / Re: Dynamic DNS only working locally on: December 03, 2012, 01:17:35 pm
The Arduino needs the IP address of a "gateway" to forward packets to the outside internet.  Without a gateway, the symptoms are just what you're seeing: works okay locally, can't hit it from outside.

Normally the gateway IP is the IP address of your router, which for your network it looks like might be  Also, a network mask is required.

I don't see a gateway or network mask being initialized in the code you posted.  If you look at the Ethernet Chat Server example that comes with the Arduino ethernet library you'll see an example of how it's done.


671  Using Arduino / Programming Questions / Re: Struggling with switching Arduino and Random numbers on: December 03, 2012, 07:58:21 am
Mazza: A certain amount of discouragement and fruatration is normal.  There is a lot to learn, and as you say it is not always set out in the easiest way.  Don't give up.

I took the time to go through your code and produce something closer to what you want.  Let me offer some feedback about what I found while editing.

1. The construct 'if (x=HIGH)' should be 'if (x==HIGH)'.  Note carefully the difference.  The first one assigns HIGH to X.  The second one tests whether x is equal to HIGH.  If you use the first where you think you are using the second one you get an interesting debugging experience.

2. The construct 'if (x==HIGH');' should not have the semicolon after it.  Semicolon is a statement.  This construct says "if X is HIGH do nothing", and the following statement is executed without regard for the if.  Another interesting debugging experience.  Use if(x==HIGH) {stmt;stmt;stmt;} instead.

3. The code wasn't consistently indented to reflect the nesting structure.  This will trip up your eyes when you try to find bugs.  Adopt a consistent style, preferably by reading and imitating code from people you like.  Fortune favors those who keep their code neat as a pin.

4. Thinking carefully about the algorithm pays off.  Look how much simpler the loop() is below.

byte whichpin = 3; // set to 3 so turning it off is harmless

void setup() {
    pinMode(3, OUTPUT);
    pinMode(4, OUTPUT);
    pinMode(5, OUTPUT);
    pinMode(6, OUTPUT);
    pinMode(7, OUTPUT);
    pinMode(8, OUTPUT);
    pinMode(9, OUTPUT);
    pinMode(10, OUTPUT);

void loop() {
if (digitalRead(2)) {
digitalWrite(whichpin, LOW);
whichpin = random(3,10);
digitalWrite(whichpin, HIGH);

There is a lot of fun to be had here when things are working correctly, but a certain amount of frustration is part of the bargain.  Stick with it, you'll figure it out.


672  Using Arduino / Installation & Troubleshooting / Re: Basic question on: December 03, 2012, 07:18:50 am
If you can load Blink, the uploading process is fine.

It's more likely you have a bug, or a software/hardware issue.

It may help to blink an LED in your bigger code, too, as a heartbeat indicator.  And it's probably time for some Serial.println() debugging.

673  Using Arduino / Project Guidance / Re: Telescope control indiserver - Firmata - real time commands on: December 02, 2012, 08:43:50 pm
What a great project.

The way you've described the system, I'd look at modifying the firmata GUI program to accept inputs from your server.  Can't say how hard that would be without seeing the source, presuming it is open.

If you're not wedded to a firmata solution, I've published a web front-end toolkit for Bitlash named Bitlash Commander that allows control of an Arduino from a web interface using Bitlash script.  It's a similar architure with Bitlash substituted for firmata.

You could build your control interface as a Commander page and extend Commander to accept input from the indiserver, same as you're looking at for the firmata path.

Bitlash Commander:

674  Using Arduino / Interfacing w/ Software on the Computer / Re: Two way serial communication with raspberry Pi (radio project) on: December 02, 2012, 07:54:58 am
I wonder if the bootloader is eating your data.

Immediately after the serial port is opened, the Arduino spends about 1500ms in the bootloader waiting to see if you are about to upload a new sketch.

During this time, any serial output sent from the PC side is interpreted by the bootloader, not your program.  Mostly, it is ignored.  Just like what you are seeing.

The unix 'echo' command opens the port and writes to it right away.  This works fine on the serial monitor, but because of the bootloader problem it won't work on arduino.

If this reasoning is sound, you need a little program to open the serial port and wait a couple seconds before sending the playlist length, rather than using 'echo'.


Edit: Another way, besides waiting a fixed time, is to wait for a character string from the arduino to signal 'ready'.  Bitlash, for example, sends '\n> ' as a prompt when it's ready.  You can see this at work in the bloader.js program, which uploads files to Arduino over the serial port:

675  Community / Website and Forum / Re: New Arduino code site GitHub attaching files on: December 02, 2012, 07:49:23 am
It is a process.  The good news is that it makes it much easier for the developers to accept a patch, which you can see them doing regularly if you follow the issues tracker.

The issue tracker does accept file attachments, so you could give that a try, but I would not be too surprised if they ask for a pull request.

Issue tracker here:

Best regards,

Pages: 1 ... 43 44 [45] 46 47 ... 67