Show Posts
Pages: 1 ... 139 140 [141] 142 143 ... 318
2101  Using Arduino / Networking, Protocols, and Devices / Re: TCP loop problem on: March 19, 2013, 04:39:20 am
Code:
while(Serial.available()==0 || Serial.read()!='K');

What if the module is not sending "OK" back to you? At least include a timeout, better do an error handling.
2102  Using Arduino / Sensors / Re: Leonardo and LM60 on: March 19, 2013, 04:32:34 am
Can you take a picture of your hardware setup? Maybe we find something there, although the probability is not so high.
And please try reading the values the other way around (A2 first, then A1), just an idea.
2103  Using Arduino / Sensors / Re: ADC LTC2433-1 on Leonardo on: March 18, 2013, 02:40:43 pm
Yes, but then you must monitor the DSO line for the EOC (End Of Conversion) state and you don't do that. I would even turn off SPI after each transfer, set PB3 to GPIO input, pull CS low and wait until PB3 gets low. Then activate SPI and read the bytes. Maybe it's easier to do that without the hardware SPI and use just the shiftIn() functions.
2104  Using Arduino / Programming Questions / Re: how to read an optical rotary encoder on: March 18, 2013, 02:27:56 pm
You only check for a falling edge of pin A, check both edges to get a higher resolution and better accuracy because a vibration on the encoder won't affect your results.
2105  Using Arduino / Project Guidance / Re: Accessing Arduino USB remotely on: March 18, 2013, 02:17:07 pm
Do you know that Arduino TFTP bootloader?

http://playground.arduino.cc/Code/TFTPBootloader1

The only drawback: you cannot use the IDE directly, although, at least on a *nix-like OS like Linux or Mac OS X, you can use a script instead of avrdude to do that.
2106  International / Deutsch / Re: Attiny84 und Ultraschall Sensor will nicht on: March 18, 2013, 01:43:30 pm
Nach Datenblatt verbraucht der Sensor 15mA, beim Aussenden des Tones evtl. kurzfristig noch mehr. Ich würde ihn nicht direkt mit dem GPIO speisen, sondern diesen über einen Transistor an die Versorgungsspannung hängen.
2107  Using Arduino / Sensors / Re: ADC LTC2433-1 on Leonardo on: March 18, 2013, 01:35:10 pm
I just saw you connected CS to GND. That way the chip does not know when to do a conversion and when to start a transmission. Take a look at the timing diagram on page 13 of the datasheet. The CS pin is needed in my reading of the datasheet.
2108  Using Arduino / Programming Questions / Re: Sketch compiles to Mega1280 but not to Mega2560 on: March 18, 2013, 01:27:23 pm
Where have you installed your libraries? I have mine in ~/sketchbook/libraries/ and your sketch compiles without problems (for any board selected).
2109  Using Arduino / Sensors / Re: Leonardo and LM60 on: March 18, 2013, 12:59:20 pm
Quote
So I am not sure I understand, where does -40'C relate to a reading of about 28?

According to the datasheet -40°C produces an output voltage of 174mV which translated to a reading of 28 on a 5V Arduino.

I have no explanation for the higher second reading. It's even the same ADC (Analog Digital Converter) in the Arduino doing the conversion, the six analog ins are just multiplexed. How do you power your setup?
You noticed that in your posted sketch you don't print the average value but the last reading?
2110  Using Arduino / Sensors / Re: ADC LTC2433-1 on Leonardo on: March 18, 2013, 12:42:43 pm
Code:
SPI.setDataMode(SPI_MODE3);

According to the datasheet the LTC is using SPI mode 0 (rising edge, active high) and not 3.
2111  Using Arduino / Sensors / Re: piezo on cd74hc4067 problem on: March 18, 2013, 12:06:59 pm
Please post the code you use. And use code tags to avoid the forum systems manipulates it.

I would never connect a piezo directly to a TTL input. To my knowledge piezos can generate quite high voltages for a short time. As far as I know you need an OpAmp to get a strong enough signal for an MCU to detect. But I'm not the piezo specialist.
2112  Using Arduino / Sensors / Re: piezo on cd74hc4067 problem on: March 18, 2013, 10:29:07 am
Where are the links to your components and where is the picture of your circuit (schematics is OK)?
2113  Using Arduino / Sensors / Re: Leonardo and LM60 on: March 18, 2013, 10:27:40 am
Quote
Am I correct in assuming that the 125 on pin A1 is actually a 10bit value (int).  So for the LM60 sensor a value of 0 would equate to -40 'C and a value of 1023 would equate to +125 'C?

A quote from the datasheet (http://www.ti.com/lit/ds/symlink/lm60.pdf):
Quote
The nominal output voltage of the LM60/LM60-Q1 ranges from +174 mV to +1205 mV for a −40 °C to +125 °C temperature range
So, no, -40°C is probably a value of 28 and +125°C is about 246 if your sensor perfectly calibrated and your power supply delivers perfect 5V. Both conditions are probably not set.

Quote
When I use my multimeter to measure the mV between Gnd and the middle pin I get a pretty constant 620 (which looking at the LM60 datasheet would be the value I expect to correlate to the temperature in my office) - however, here's the thing with my multimeter I get a reading of 620 from both sensors, so how come the inputValue on the second sensor is around the 164 mark ... I would expect it to be 125 the same as the first sensor ... they are on the same breadboard after all.

Are these values already the averages you calculate or single readings?
2114  International / Deutsch / Re: Aduino Ethernet Netzwerküberwachung on: March 18, 2013, 10:07:57 am
Quote
Gibts für ARP auch eine Lib?

ARP wird nicht im Arduino gemacht, sondern direkt im WizNet-Chip, also: nein, es gibt keine Bibliothek und wird auch keine geben.

Übrigens: In Deinem Netz gibt's bestimmt einen DHCP-Server (der vergibt die IP-Adressen), meist ist der im Router eingebaut. Die meisten Router haben eine Administrationsseite, auf welcher die vergegebenen Leases (also die benutzten IP-Adressen) aufgelistet werden. Wenn Du Dir diese greifst, kommst Du ohne das Pingen an die gewünschte Information und es funktioniert auch, wenn auf einem Rechner der sog. Echo-Reply (also die Ping-Antwort) per Firewall unterbunden wird.
2115  Using Arduino / Networking, Protocols, and Devices / Re: WiFi for Arduino on: March 18, 2013, 09:57:19 am
Quote
Yes that's the idea.

Bad idea. It's very expensive, slow and inflexible. Get a cheap access point/router and put something like OpenWRT on it, you'll get a much more flexible and factors faster solution.
Pages: 1 ... 139 140 [141] 142 143 ... 318