Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Exiting a series of for loops upon receiving an IR signal on: April 13, 2013, 02:11:13 am
Thanks,

but in this case i have to push the butten in this microsecond the butten gets queried??
The for loop will block all other functions in the same way delay does so  i think we need a way
without loop?! Maybe with if statements??
2  Using Arduino / Project Guidance / Re: Exiting a series of for loops upon receiving an IR signal on: April 12, 2013, 02:29:02 pm
Hey,

any news for that topic? I have nearly the same question...

Code:
void fadeRGB(){
      int r, g, b;
        // fade from blue to violet
        for (r = 0; r < 256; r++) {
          analogWrite(redPin, r);
          delay(FADESPEED);
        }
        // fade from violet to red
        for (b = 255; b > 0; b--) {
          analogWrite(bluePin, b);
          delay(FADESPEED);
        }
        // fade from red to yellow
        for (g = 0; g < 256; g++) {
          analogWrite(greenPin, g);
          delay(FADESPEED);
        }
        // fade from yellow to green
        for (r = 255; r > 0; r--) {
          analogWrite(redPin, r);
          delay(FADESPEED);
        }
        // fade from green to teal
        for (b = 0; b < 256; b++) {
          analogWrite(bluePin, b);
          delay(FADESPEED);
        }
        // fade from teal to blue
          for (g = 255; g > 0; g--) {
          analogWrite(greenPin, g);
          delay(FADESPEED);
        } 
}

This kind of fade blocks all other input to change f.e. to solid color... I´ve tried to use the blink without delay example but i think we
still need the for loop!?

best regards
3  Using Arduino / Networking, Protocols, and Devices / Re: Official Arduino WiFi Shield - Issues - Improvements - Call to action on: October 28, 2012, 12:40:36 pm
Hey,

for me the disconnect issue is still there with firmware update.
I currently just use the client part and get disconnects after a few seconds so f.e. a file transfer is
disconnected before file is completed. (tested with serialprint).


4  Using Arduino / Networking, Protocols, and Devices / WiFi Shield (official) issue... on: October 25, 2012, 08:38:55 am
Hey,

i´m sorry to 'cross-post' the following topic, but i feel like there is no active mod in storage section who can
move my post...

http://arduino.cc/forum/index.php/topic,127386.0.html

In short - i try to receive an file > 20kb with the WiFi Shield but always got corrupt data (even with serial output).
Further Details are in the url above.

I hope anyone from network part of this forum can help me out of this issue.

Thanks a lot!

-andreas
5  Using Arduino / Storage / Re: Downloading larger files doesnt work (WiFi Shield & SD slot) on: October 17, 2012, 12:00:41 pm
... can some mod pls move my topic to Networking??

Thanks
6  Using Arduino / Storage / Re: Downloading larger files doesnt work (WiFi Shield & SD slot) on: October 16, 2012, 05:08:50 am
Back again...

i tried the following with 3 different Boards:

Arduino UNO R3 w/WiFi Shield (official)
Code:
#include <SPI.h>
#include <WiFi.h>

#define debug(a) Serial.print(millis()); Serial.print(": "); Serial.println(a);
#define debug2(a, b) Serial.print(millis()); Serial.print(": "); Serial.print(a); Serial.println(b);

void setup(){
  Serial.begin(9600);

char ssid[] = "ssid";     //  your network SSID (name)
char pass[] = "pass";    // your network password

//pinMode(4, OUTPUT);
//digitalWrite(4, HIGH);

// -- Initialize WiFi connection
  int status = WL_IDLE_STATUS;
  status = WiFi.begin(ssid, pass);
  if (status != WL_CONNECTED) {
    Serial.println("No WiFi Connection!");
  }

  // print your local IP address:
  debug2("IP address: ", WiFi.localIP());
}
WiFiClient client;
char* host = "192.168.2.222";
int port = 80;

int totalRequestSize = 0;
int failures = 0;
int requests = 0;

void loop() {
  if (client.connect(host, port)) {
    debug("Connected.");
    client.println("GET /test.file HTTP/1.0");
    client.println("Host: 192.168.2.222");
    client.println();
    int length = 0;
    while(client.connected()) {
      debug("Still connected");
      // the server will close the connection when it is finished sending packets
      while(client.available()) {
        // ...but not until this buffer is empty
        Serial.write(client.read());
        length++;
      }
      debug("Done reading for now...");
    }
    // close your end after the server closes its end
    client.stop();
    
    requests++;
    if (length != totalRequestSize) {
      failures++;
    }
    debug2("Total read: ", length);
    Serial.print("Total failures: "); Serial.print(failures); Serial.print("/"); Serial.println(requests);
  } else {
    debug("Couldn't connect.");
  }
  delay(10000);
}


Arduino UNO R3 w/Ethernet Shield (official)
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x4C, 0x75 }; //physical mac address UNO R3 EthernetShield
EthernetClient client;

#define debug(a) Serial.print(millis()); Serial.print(": "); Serial.println(a);
#define debug2(a, b) Serial.print(millis()); Serial.print(": "); Serial.print(a); Serial.println(b);

void setup(){
  Serial.begin(9600);

  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    debug("DHCP Failed");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }
  // print your local IP address:
  debug2("IP address: ", Ethernet.localIP());
}

char* host = "192.168.2.222";
int port = 80;

int totalRequestSize = 0;
int failures = 0;
int requests = 0;

void loop() {
  if (client.connect(host, port)) {
    debug("Connected.");
    client.println("GET /test.file HTTP/1.0");
    client.println("Host: 192.168.2.222.net");
    client.println();
    int length = 0;

    while(client.connected()) {
      debug("Still connected");
      // the server will close the connection when it is finished sending packets
      while(client.available()) {
        // ...but not until this buffer is empty
        Serial.write(client.read());
        length++;
      }
      debug("Done reading for now...");
    }
    // close your end after the server closes its end
    client.stop();
    
    requests++;
    if (length != totalRequestSize) {
      failures++;
    }
    debug2("Total read: ", length);
    Serial.print("Total failures: "); Serial.print(failures); Serial.print("/"); Serial.println(requests);
  } else {
    debug("Couldn't connect.");
  }
  delay(1000);
}

Arduino Ethernet(official)
Code:
same as above with different MAC

Testfile
Code:
[url]http://pastebin.com/DKbStKG8[/url]


Results:

UNO R3 w/WiFi Shield
Code:
Total read: 14467 - missing bytes (any loop)

Last two lines from Serial Output:
3AAAAAABBBBBBBCCCCCCDDDDDDDDEEEEEEFFFFFFGGGGGHHHHHHIIIIIIJJJJJJJKKKKKKKLLLLLLLMMMMMMNNNNNOOOOOPPPPPPQQQQQQRRRRSSSSSTTTTTUUUUUVVVVVWWWWWXXXXXYYYYYYZZZZZ
EOF EOF

The last line is available but between some lines gets lost....

[b][u]With [/u][/b]
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

7AAAAAABBBBBBBCCCCCCDDDDDDDDEEEEEEEFFFFFFGGGGGHHHHHHIIIIIIJJJJJJJKKKKKKKLLLLLLLMMMMMMNNNNNOOOOOPPPPPPQQQQQQRRRRSSSSSTTTTTUUUUUVVVVVWWWWWXXXXXYYYYYYZZZZZ
8AAAAAABBBBBBBCCCCCCDDDDDDDDEEEEEEEFFFFFFGGGGGHHHHHHIIIIIIJJJJJJJKKKKKKKLLLLLLLMMMMMMNNNNNOOOOOPPPPPPQQQQQQRRRRSSSSSTTTTTUUUUUVVEEEEEEFFFFFFGGGGGHHHHHHIIIIIIJJJJJJJKKKKKKKLLLLLLLMMMMMMNNNNNOOOOOPPPPPPQQQQQQRRRRSSSSSTTTTTUUUUUVVVVVWWWWWXXXXXYYYYYYZZZZZ
EOF EOF
Total read: 13955



UNO R3 w/Etnerhet Shield
Code:
Total read: 27779 - complete expected length (any loop)

Arduino Ethernet
Code:
Total read: 27779 - complete expected length (any loop)


Summary:

What i can exclude:

-WiFi Network ( I tried different router an different networks (Netgear, AVM, Cisco))
-UNO R3 (as it works with the Ethernet Shield without any problem)
-SD Card (as i disabled it and doesnt include any SD libraray)
-Content Server (as it works with the Arduino Ethernet and UNO R3 w/Ethernet Shield)

Conclusion:

There must be something wrong with the WiFi Connection / WiFi Library,
so i hope my debugging can lead someone to an solution?
Maybe i do something wrong or missed something else?!

Hopefully someone can lead me to the right direction!

Thanks a lot!

-andreas

7  Using Arduino / Storage / Re: Downloading larger files doesnt work (WiFi Shield & SD slot) on: October 15, 2012, 05:15:04 pm
Little update - i tried to output the file to serial.write, same here :/
Perhaps its not an SD Card issue rather than a WiFi one?
I also disabled SPI for SD slot with

Code:
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

Tomorrow i will try the same sketch with an ethernet Shield UNO R3 and an Arduino Ethernet and come
back with some new information!

So far -thanks.

-andreas
8  Using Arduino / Storage / Re: Downloading larger files doesnt work (WiFi Shield & SD slot) on: October 15, 2012, 04:10:04 pm
Do you check for client.available() before reading a byte?  If not, you may be reading faster than the server can send.

The read is within a while client.available loop.
9  Using Arduino / Storage / Downloading files > 20kb doesn't work UPDATE: it must be WiFi issue... on: October 15, 2012, 02:29:38 pm
Hey,

i try to dowload a file > 16kb from a webserver - connected with the wifi shield (UNO Rev3) but i always got a download abort before the file download finished.
If i read the length of the file and make client.read() while i < the content length the file gets filled to the original file size but the content
is not correct (just some of the first bytes are the same).
Maybe its too much for SPI to download and write the same time files larger than 15kb??
Smaller files ~4kb work fine - writing large files to the sdcard without wifi connection work fine too (thanks to fat16lib and his tools).
Dowloading the file with an arduino ethernet work without problems too.


So is anybody out there with the same problem? Would it be a solution to stop download at a specific size and resume it at this point? Is this possible with web hosted files?


I use the current WiFi and SdFat lib.

Thanks in advance!!
-andreas
10  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Official Wifi shield on Arduino 328 - Multibyte write and close issues on: October 15, 2012, 05:11:41 am
Hey,

+1 for me - same here with an UNO R3.
Small files are fine - bigger files are a problem... No chance to get the write to SD Card.

Any news about that?

For the firmware update on the wifi shield this should help you: https://github.com/arduino/wifishield/blob/master/firmware/scripts/ArduinoWifiShield_upgrade.sh

best regards
-andreas
11  Forum 2005-2010 (read only) / Interfacing / Doppler Radar - speed measure on: September 27, 2010, 03:29:43 am
Hey there,

anyone ever tried to connect a doppler-radar like
http://shop.hygrosens.com/Distribution-Conrad-acma/Sensoren/Radarsensoren/Radar-Bewegungsmeldermodul-acma-2.html
to an arduino board?

I´ve found another post - but he doesnt use the sensor i
want to use... http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1279812004/15

So if anyone can help me get started, pls reply to my post!
Thanks a lot in advance!

-andreas
12  Forum 2005-2010 (read only) / Interfacing / Re: Radar-based distance meaurements on: September 28, 2010, 01:37:24 am
At first thank you all for the replys - i havent expect that they will become such usefull smiley

I have received the further documentation for this part.
(sorry its in german only but the important parts are printed
in english i think)
http://www.mediafire.com/download.php?n4jo57nis552q0o
http://www.mediafire.com/download.php?v2tqm2eziwz4teu

As i understand this documents, it is possible to measure speeds up to 250km/h with this module - but as Korman said there has to be a circuit to bring the signal to an useable level?!

For me i will start studying Grumpy_Mikes links and maybe i buy some books about circuits for level up signals... smiley

Thank you for support!

13  Forum 2005-2010 (read only) / Interfacing / Re: Radar-based distance meaurements on: September 27, 2010, 09:58:30 am
Umm, maybe i had a really bad start here in the forum...

The idea i had was to build a speedmeasuresystem for speed between 1-~200km/h.
I´ve searched for doppler-radar modules and found the one posted above - searched the 'interweb' found this topic and hooked me in...
Reading the 'datasheet' of the module lets me expect that it is possible to measure speed -
Quote
44 Hz corresponding to a movement speed
of approx. 1 km/h.
I have no experience with frequency measuring just know to do this offline with an osciloscope...

After all the replys i think i should kick the idea into trash and go to find an easier project to use the arduino board for... But i also like to start over with some further information for speedmeasurement too-if someone will be patient to help me with the start and maybe point me to the right books.

14  Forum 2005-2010 (read only) / Interfacing / Re: Radar-based distance meaurements on: September 27, 2010, 09:38:06 am
Quote
No, they were still chiselling rocks when I started.

That's the answer i've expected smiley

15  Forum 2005-2010 (read only) / Interfacing / Re: Radar-based distance meaurements on: September 27, 2010, 09:26:08 am
Thanks Groove...

as i ordered my first arduino board i bought several Books about arduino.
I´ve done some of the basic circuits and beginner projects and ended up
with the idea of measure the speed...

Sure internet iss not the repository for anything... But its a place where other people can point you to the right offline repository?! Isnt it?
I have no one around me who is interested in arduino or other microcontroller and/or any kind of circuits so the first place to start is for me the magic interweb - and iam sure you and even grumpy mike start here too - maybe not for electric , microcontroller questions or something like this - but if you need some other information like how to cook a turkey or how to troubleshoot something else - maybe the advice is too 'buy you a cook book' f.e.. But sometimes a friendly interweb people will just answer your question and you are happy without get pointed to offline media... I m sure you know what i mean...

I dont want that someone do the work for me, but i want to get
some help getting started, maybe with a tip for the right books.

Cheers
Pages: [1] 2