Show Posts
Pages: 1 ... 121 122 [123] 124 125 ... 350
1831  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.
1832  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


before this line:

      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.
1833  Using Arduino / Networking, Protocols, and Devices / Re: Odd behavior with Ethercard library on: June 12, 2013, 04:45:27 am
Do you use a bootloader and if yes, which one?

Were you able to measure how long D10 stays high before your code in setup sets it to low (this may give us a hint where to look for in the code)?

Probably the offending code is here:

void ENC28J60::initSPI () {
    pinMode(SS, OUTPUT);
    digitalWrite(SS, HIGH);
    pinMode(MOSI, OUTPUT);
    pinMode(SCK, OUTPUT);  
    pinMode(MISO, INPUT);
    digitalWrite(MOSI, HIGH);
    digitalWrite(MOSI, LOW);
    digitalWrite(SCK, LOW);

    SPCR = bit(SPE) | bit(MSTR); // 8 MHz @ 16
    bitSet(SPSR, SPI2X);

You can comment out the digitalWrite(SS, HIGH), without any problems and you may have solved your issue.
1834  Using Arduino / Networking, Protocols, and Devices / Re: Transmitting an integer over I2C on: June 12, 2013, 03:26:29 am
You made several errors in your sketch. The first is that a variable of type "int" is 15 bits in size plus one sign bit. I recommend that you use the explicit types (int16_t, uint32_t, etc.) so you always get the correct size.

In your case you don't need 32 bit because the result of an analogRead() call is a 10 bit integer.

The next error is in your main loop():

  Wire.requestFrom(1, 1);   // the first byte
    char received =;
    output = received;
  for (int i = 0 ; i < 3 ; i++) // next 3 bytes
     Wire.requestFrom(1, 1);   
        char received =;
        output |= (received << 8);

The code "received << 8" always produces a result of zero because received is of type char and a char has only 8 bits. You move all 8 bits out of the variable so only 0 is left. If you're very lucky, the compiler noticed your mistake and switched to a 16 bit value for the result but even then you're or'ing 3 bytes to the same result byte probably producing very unexpected outputs.

So switch to unsigned 16 bit integers for your sketch and use unions like this:

union {
  uint16_t    intval;
  uint8_t     bytes[2];

This way you can fill in the bytes and read out the unsigned integer value.
1835  Using Arduino / Networking, Protocols, and Devices / Re: 2 telnet Clients on one Arduino Ethernet on: June 12, 2013, 03:12:24 am
Yes, what's the output of the serial interface while you're running the sketch?
1836  International / Deutsch / Re: Cocktailmixer on: June 11, 2013, 12:43:44 pm
Beim UNO hast Du 20 digitale Ein-/Ausgänge, wovon Du 6 auch als analoge Eingänge nutzen kannst.
1837  Using Arduino / Project Guidance / Re: Battery Backup Question. on: June 11, 2013, 11:49:10 am
isn't there is delay when the main power supply is transferred to the ups(the fluctuation of voltage).

I don't hope so because if it is, the power to the Arduino would  be interrupted and the microcontroller reset.

can i connect 5v directly to the interrupt pin of arduino uno?

Yes you can but you probably won't see any edge there.
1838  Using Arduino / Programming Questions / Re: how to access a phone number record in the SIM memory by means of ARDUINO? on: June 11, 2013, 11:32:40 am
According to the manual for the used GSM device (Telit GE865: the necessary commands include AT+CPBS (for selecting the SIM phonebook), AT+CPBF (for finding the named entry) and maybe AT+CPBR (to get an indexed entry in the phonebook).
1839  Using Arduino / Networking, Protocols, and Devices / Re: ethernet + sd + login HELP! on: June 11, 2013, 11:16:28 am
how can i connect arduino to the site on

I don't know anything about your network setup. If you don't want to or are not able to change the network parameters (changing the NAT router to forward a port to the Arduino), you have to program the Arduino as a client which sends it's data as often as necessary for your application (you still didn't provide a description of what you want to achieve) to the web server and gets commands back as the response (polling). The WebClientRepeating example of the Ethernet library gives you hints then about how you're able to program that.
Otherwise the WebServer example of the Ethernet library is the point to start.
1840  Using Arduino / Sensors / Re: Temperature sensor advice / recommendation, please on: June 11, 2013, 11:06:38 am
I'd recommend DS18B20 OneWire temperature sensors. They have a measuring range up to 125°C, are quite accurate and easy to wire and program.
1841  Using Arduino / Project Guidance / Re: mq 7 sensor on: June 11, 2013, 10:57:49 am

Then you don't need to use PWM for the 1.4V but you just toggle between the two provided voltages on the board with the TOGG pin.

How to convert analog reading into parts per million ?

Have you seen the graph on the page linked above? You don't even get a linear value at a given concentration, so you have to average the reading over the 60s you're heating at 5V and without calibration you just get relative values not absolute ones.
1842  Using Arduino / Project Guidance / Re: arduino micro as HID without driver installation on new computers on: June 11, 2013, 10:41:02 am
Although you don't describe your problem in detail I guess it has to do with the serial device emulation on the USB that gets installed to enable sketch uploading. So you have to ensure that the serial device information (CDC) don't get included and that you upload your sketch with a programmer to overwrite the bootloader.

Post your current sketch.
1843  Using Arduino / Project Guidance / Re: Battery Backup Question. on: June 11, 2013, 10:20:11 am
Take a look at Seeeduino Stalker, there you have the necessary electronics and an Arduino on one board:
1844  Using Arduino / Project Guidance / Re: Help required in washing machine project on: June 11, 2013, 10:16:11 am
Buy a commercial washing machine (you get them cheap on ebay) and replace just the electronics with your Arduino if you want more features. If you do the mechanics yourself the slightest unbalance may injure you seriously.

BTW: this is not a beginners project. Start with some easy sketches and drive LEDs and such stuff. You should have an education or experience with electric stuff before using high voltage applications.
1845  Using Arduino / Networking, Protocols, and Devices / Re: ethernet + sd + login HELP! on: June 11, 2013, 10:11:32 am
I'd suggest that you do your login stuff on the hosted web server and let the PHP scripts there access the Arduino if necessary. Do a minimal webserver sketch on the Arduino (without SD card usage) that just returns the status of whatever pin you like and accepts commands for the outputs you have to do. Then make a simple check in the sketch if the requesting IP is the IP of your webserver. This way the security is up to the scripts on the hosted server (although PHP and security excludes each other IMHO) and you can keep the sketch on the Arduino simple and reliable.
Pages: 1 ... 121 122 [123] 124 125 ... 350