Show Posts
Pages: 1 ... 141 142 [143] 144 145 ... 343
2131  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.
2132  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.
2133  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?
2134  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?
2135  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);
}
2136  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.
2137  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?
2138  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.
2139  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.
2140  Using Arduino / Project Guidance / Re: [Help] biometric module and arduino on: April 16, 2013, 09:21:14 am
The module doesn't react on single byte commands, you have to send packets to the module which consist of at least 7 characters (bytes).

Eliminate the delay()s, you don't need them and they may pose problems later.

Put comments into your code so we at least know what you expect that part of the code to do.

Use code tags not quote tags to enclose code!
2141  Using Arduino / Networking, Protocols, and Devices / Re: Uno not receiving data from Rx port on: April 16, 2013, 09:12:47 am
Quote
When I send a byte to Uno the cable Tx LED flashes but there is no response from Uno.

Post the software you put on the UNO. Without an echoing sketch on the UNO, this is the expected output.
2142  Using Arduino / Networking, Protocols, and Devices / Re: SIM 900: Error 604 Stack Busy on: April 16, 2013, 09:03:07 am
Quote
watchdog feature not work on a Mega2560 because of a bug into the bootloader; newer Mega2560 shouldn't have this bug

I never heard of this bug and I didn't know that the bootloader is able to disable the watchdog feature completely. Do you have any more information about that?

Quote
I reset the module by software using a reset pin of Arduino and a digital output low;

If you mean pin 9, this isn't a reset but a power down of the module. You can power it up and down using this pin, just put a high pulse of 1s length on it. How do you do the reset you mentioned?
2143  Using Arduino / Networking, Protocols, and Devices / Re: XBee interferes with USB serial on: April 16, 2013, 08:32:29 am
Quote
On my first board it works that way. On the second - no.

Except the different board, all other devices (XBee) and wiring are the same (not just identical!)?
2144  Using Arduino / Networking, Protocols, and Devices / Re: Hardware Serial causes hang-up on: April 16, 2013, 07:03:40 am
When running that code and it stops, does the LED stop blinking too? Have you tried moving the digitalWrite() for the LED into the ISR? Does that change anything?

To do stuff in a single digit Hertz frequency you don't need a timer interrupt, just use millis() and divide accordingly.

I would comment out the speed increase to 400kHz for the TWI while this issue persists. You can re-enable it when this is fixed. It's a possible source of problems and therefore I would try to eliminate it.

Code:
  boolean i = HIGH;

You have this global variable and in the subroutine of the GPS reader you use a variable of the same name again for iterate over a serial reading block. Try to avoid such name clashes.

2145  Using Arduino / Sensors / Re: Can We Read Yaw Axis Without Compass? on: April 15, 2013, 11:49:41 am
Quote
the value that i expected is when i tilt the board, the compass heading degree is not change, i have use tilt compensation algorithm for magnetometer, but still not works, the heading degree still change when i tilt the board..

How much does it change if you tilt it? a few degrees or more than 90 degrees? Can you give example output of such a session?

The components used are not placed all in the middle of the board so one must expect some drifting if your calculations are used.
Pages: 1 ... 141 142 [143] 144 145 ... 343