Show Posts
Pages: 1 ... 114 115 [116] 117 118 ... 343
1726  Using Arduino / Programming Questions / Re: AltSoftSerial - flushing and/or waiting for completion on: June 12, 2013, 12:19:35 pm
Have you tried what I proposed in my post there? Just opening a new thread won't help you much.

You haven't described what's going wrong yet. Did you attach a scope to see what's happening?
1727  Using Arduino / Networking, Protocols, and Devices / Re: how to send data from arduino to computer via wifi on: June 12, 2013, 12:12:16 pm
I would try using some kind of WiFi hardware.

Generic question -> generic answer.
1728  Using Arduino / Networking, Protocols, and Devices / Re: Odd behavior with Ethercard library on: June 12, 2013, 12:10:20 pm
Quote
I don't understand things at that low of a level so my question is, will this have implications on a broader scope for future projects?

No, it shouldn't Setting pin 10 as an output is necessary for the hardware (it may go to slave mode otherwise) but also setting it HIGH is not necessary and just a precaution if other equipment is connected to the SPI bus and wired to the SS pin. But in this case the educated user is controlling all the slave select pins anyway so in my opinion is completely unnecessary.
1729  International / Deutsch / Re: Ein paar allgemeine Programmierfragen on: June 12, 2013, 12:05:23 pm
Quote
Wirklich aufhören lassen, aber dann noch was anderes mach kann man loop und return also nicht?

Das macht keinen Sinn, denn dann kannst Du ja aus dem Loop eine andere Funktion aufrufen und dort mittels return wieder in den Loop zurückkehren, worauf Du dann das "Andere" machen kannst.
Aber vielleicht verstehen wir Dich nur falsch und Du willst etwas ganz anderes. In diesem Fall solltest Du aber beschreiben, was Du erreichen willst und nicht, wie Du es ausgeführt hättest.
1730  Using Arduino / Programming Questions / Re: AltSoftSerial - flushing and/or waiting for completion on: June 12, 2013, 10:58:21 am
Quote
altSoft.flush() should wait to completion so I can reliably turn off the RS485 driver, but it doesn't seem to be happening.

If you're using an IDE version greater equal 1.0 it does, otherwise it empties the input buffer.

Why do you think that it doesn't happening?
1731  Using Arduino / Programming Questions / Re: Using interrupts for a rotary encoder on: June 12, 2013, 10:55:08 am
With a wheel controlled by hand I don't see a problem to go without interrupts and still use a rotary encoder, given your Arduino don't have to do anything else needing a lot of CPU power (doesn't have to be actively calculating, waiting like the SoftwareSerial is doing kills such an application too, even with interrupts).

Show us the code you have, maybe we find some mistakes that are easily fixed. Even if we don't we may be able to help you integrate the interrupt handlers.
1732  Using Arduino / Project Guidance / Re: Arduino uno with GSM sheild...SOAP web services on: June 12, 2013, 10:32:35 am
I don't know your setup and server programming skills but a REST API is easier and doesn't waste too many resources. In your case where a simple boolean information has to be transmitted a simple action on the server getting some GET parameters is the best solution from an Arduino perspective.
1733  Using Arduino / Project Guidance / Re: EasyVR + motor shield on Leonardo/Romeo on: June 12, 2013, 09:16:43 am
It would be very nice if you post links to the hardware you're using. I don't want to google around just to find some other hardware named similarily. And there are dozens of motor shields out in the wild...
1734  Using Arduino / Project Guidance / Re: Arduino uno with GSM sheild...SOAP web services on: June 12, 2013, 09:13:48 am
Change the programming on the server to use something simpler than SOAP. SOAP is quite blown up with stuff not needed in most situations and not suited for implementation on a microcontroller. Although you can program the Arduino to send some simple SOAP calls, it just wastes flash memory to store all the crap surrounding the essential information. Use SOAP on the bigger irons with GBs of memory but not on a processor with 2kB or RAM (many SOAP calls I see are bigger than this).
1735  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Serial to Raspberry Pi on: June 12, 2013, 09:06:13 am
Quote
You could use any two pins on the Arduino, and SoftwareSerial, to send data to two pins on the PI.

Not really a good idea because the Raspberry Pi is running on 3V3 and the Arduino on 5V. The probability to damage the Pi is quite high.
1736  International / Deutsch / Re: Usb Port bricht ab, bei Arduino Mega 2560 on: June 12, 2013, 08:56:55 am
Sobald das externe Netzteil mehr als 6.6V liefert, wird es für die Stromversorgung des Arduinos verwendet. Wenn Du also den Rat von Uwe befolgst und ein Netzteil mit mindestens 7V nimmst, sollte es kein Problem sein.
1737  Using Arduino / Networking, Protocols, and Devices / Re: Algorithm for converting encoded octets into septets on: June 12, 2013, 08:14:28 am
This code should work on a 8-bit AVR platform (little-endian), but it's just a quick hack and untested.

Code:
int convert8to7(byte *input, byte *output, int inlength) {
  union {
    byte b[2];
    uint16_t u;
  };
  int outlength = inlength * 8 / 7;
  for (int i = 0; i < outlength; i++) {
    int index = i * 7;
    int m = index % 8;
    index /= 8;
    b[0] = input[index];
    b[1] = index > 0 ? input[index - 1] : 0;
    output[i] = (u >> (8-m)) & 0x7F;
  }
  return outlength;
}
1738  Using Arduino / Networking, Protocols, and Devices / Re: PMBus with Arduino on: June 12, 2013, 07:44:09 am
Try to change this line

Code:
byte n = Wire.requestFrom(addr, 8);

to

Code:
byte n = Wire.requestFrom(addr, 8, (uint8_t) false);

to keep the Wire library from sending the stop condition but to send a repeated start condition.
1739  Using Arduino / Networking, Protocols, and Devices / Re: Issues communicating with Parallax OFN over I2C on: June 12, 2013, 05:11:16 am
According to the sample code in the datasheet (top of page 4), the I2C device address is 0x33. Try with this address and report if you have success.
1740  Using Arduino / Networking, Protocols, and Devices / Re: Hlaf-duplex - what am I doing wrong? on: June 12, 2013, 05:02:35 am
Try inserting the line

Code:
delay(1);

before this line:

Code:
      digitalWrite(rs485XmitPin, HIGH);

It's in the example code of Nick Gammon too and gives the master time to prepare for receiving.

But I don't see the reason for the delayMicroseconds(500) in your code.
Pages: 1 ... 114 115 [116] 117 118 ... 343