Show Posts
Pages: 1 ... 141 142 [143] 144 145 ... 344
2131  Using Arduino / Networking, Protocols, and Devices / Re: connecting to a switch network on: April 16, 2013, 02:06:47 pm
It seems to me that you want to use your Arduino as a server and you want to access it from a PC in your local network. If this is correct, use:

Code:
Ethernet.begin(mac, ip);

Otherwise: describe your network setup.

Try to eliminate the String class (it's buggy), replace it with character arrays (C strings).
2132  International / Deutsch / Re: DS18B20 Fehler on: April 16, 2013, 01:57:38 pm
Ich hoffe, Du hast kOhm gemeint...

Ich habe alle meine OneWire-Sensoren mit 4.7kΩ angeschlossen und die funktionieren super. Hast Du den Pull-Up auf der Arduino-Seite oder auf der Sensor-Seite eingebaut? Wie lang ist das Kabel zwischen dem Sensor und dem Arduino?
2133  Using Arduino / Networking, Protocols, and Devices / Re: Sending negative numbers from i2c slave via TinyWire on: April 16, 2013, 01:53:39 pm
You set t to zero after sending the first byte (lower bits), so when sending the higher bits (second byte) the byte is already set to zero.

You split the transfer to two separate transfers. This shouldn't be necessary.
2134  Using Arduino / Networking, Protocols, and Devices / Re: connecting to a switch network on: April 16, 2013, 01:47:26 pm
Your problem starts at this line:

Code:
  Ethernet.begin(mac, ip, subnet, gateway);

The current versions of the IDE define the begin() method of the Ethernet class this way:

Code:
  void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);

Note the dns_server parameter between local_ip and gateway.
2135  Using Arduino / Networking, Protocols, and Devices / Re: Problem with SPI communication AD7856 on: April 16, 2013, 01:43:42 pm
In your software version you write the value of writeAdcChannel to the chip during the read operation, in the hardware version you don't. Why?

Is that code really for an AD7856? That chip doesn't have different channels. Is that just a fatal misnomer?

Insert more comments into your code so we get a chance to understand why you're doing that stuff this or the other way.
2136  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Ethernet Freezes on: April 16, 2013, 01:19:01 pm
You don't read the whole answer from the server just one byte and then you send many bytes to it which may lead to new bytes being received. Have you checked the network traffic between the Arduino and the server with a tool like WireShark?
2137  Using Arduino / Networking, Protocols, and Devices / Re: Sending negative numbers from i2c slave via TinyWire on: April 16, 2013, 12:53:27 pm
What's the resistance of the pull-ups? What's the total length of your I2C bus? It's possible that the problem is now in the hardware and not in the software.
2138  Using Arduino / Networking, Protocols, and Devices / Re: Uno not receiving data from Rx port on: April 16, 2013, 12:01:41 pm
Quote
I'm new to this forum. What is the advantage of code tags over copy and paste for a simple sketch like this?

Readability and the assurance that the forum system will not modify your code. In most cases I don't even look at code not in code tags because of this.
2139  Using Arduino / Networking, Protocols, and Devices / Re: SIM 900: Error 604 Stack Busy on: April 16, 2013, 11:56:35 am
Quote

This is a know problem with most bootloaders of the Arduino. You can use the watchdog but you cannot use watchdog times below 4s.

Quote
no, i don't mean pin 9, but the reset pin of arduino UNO, I have used part ot this code:

Resetting the Arduino doesn't change anything because the SIM 900 shield won't even notice.

Quote
however turning off and turning on the GPRS Shield via software I solved:

Does that solve your problem?
2140  International / Deutsch / Re: DS18B20 Fehler on: April 16, 2013, 11:45:40 am
Nein, der von fluuux.de nicht. Derjenige von bildr.org zeigt einfach den Wert des ersten gefundenen Sensors an, oder -1000, wenn kein Sensor gefunden wurde, er beinhaltet allerdings auch einen Fehler, ist also nicht zu empfehlen.

Hast Du die Beispiele der DallasTemperature-Bibliothek (http://milesburton.com/index.php?title=Dallas_Temperature_Control_Library) schon ausprobiert? Der Simple-Sketch sollte die Temperaturen aller angeschlossenen Sensoren ausgeben.

Kannst Du ein Foto von Deiner Verdrahtung machen?
2141  International / Deutsch / Re: Arduino-Oszilloskop - [Nano Version] on: April 16, 2013, 11:34:36 am
Wenn Du den folgenden Sketch auf dem Arduino einsetzt, wird die ADC-Geschwindigkeit praktisch nochmals verdoppelt und Du erreichst theoretisch 75kSps. Mit einem Leonardo oder Micro kriegst Du das vielleicht sogar über USB auf den PC.

Code:
// Definiert die Bitnamen (sbi -> SetBit = 1, cbi -> ClearBit = 0)
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif


void setup() {

    // setzt den ADC-Divisor von 128 Bit auf 16 Bit
    // die Genauigkeit sinkt etwas, aber die Geschwindigkeit steigt um das 6,5-fache
    sbi(ADCSRA,ADPS2);
    cbi(ADCSRA,ADPS1);
    cbi(ADCSRA,ADPS0);
    sbi(ADCSRA,ADATE); // Auto Trigger Enable

    int dummy = analogRead(A0); // setzt die Analog-Register korrekt
    sbi(ADMUX, ADLAR); // damit kriegen wir die oberen 8 Bit direkt in ADCH
    sbi(ADCSRA, ADSC); // starte Konvertierung
    Serial.begin(250000);
}

void loop() {
  loop_until_bit_is_set(ADCSRA, ADIF); // warte bis Konvertierung abgeschlossen.
  sbi(ADCSRA,ADIF); // Lösche Interrupt Flag
  Serial.write(ADCH);
}
2142  International / Deutsch / Re: DS18B20 Fehler on: April 16, 2013, 09:57:31 am
Quote

Hast Du die Adressen im Sketch angepasst? Die sind jeweils spezifisch für den einzelnen Sensor und keine zwei sind gleich.
2143  Using Arduino / Networking, Protocols, and Devices / Re: Uno not receiving data from Rx port on: April 16, 2013, 09:52:28 am
Please use code tags next time you post any code!

I would expect the LED to stay on (not flash) if you send a 'H' to the Arduino. It will turn off again, when you send the next character.

Why don't you echo the character you received?

Can you post a picture of your wiring?
2144  Using Arduino / Networking, Protocols, and Devices / Re: Hardware Serial causes hang-up on: April 16, 2013, 09:43:35 am
Quote
Have you tried moving the digitalWrite() for the LED into the ISR? Does that change anything?

Have you done that too? If the LED still blinks then but the Arduino stops responding we at least know that the program is still running and it gives us hints where to look for the endless loop.

Quote
Other question: You are from Switzerland. Do you speak german too?

Yes, I do, but you posted your question in the English part of the forum.
2145  Using Arduino / Networking, Protocols, and Devices / Re: uploading sketch using ethernet on mega and ethernet shield on: April 16, 2013, 09:39:04 am
The compiled bootloader is for an ATmega328 and not for an ATmega2560. You have to compile the package yourself and install it in the appropriate folder. Have you done that? Post the modified Makefile.
Pages: 1 ... 141 142 [143] 144 145 ... 344