Show Posts
Pages: [1] 2 3 ... 14
1  Using Arduino / Programming Questions / Re: Ethernet library (http://user:password@host, port) support on: February 11, 2014, 09:23:25 am
Anyone?
2  Using Arduino / Programming Questions / Ethernet library (http://user:password@host, port) support on: February 07, 2014, 10:46:24 am
Hi,

I would like to make quick question does anyone know if the ethernet library gives direct support to the following notation:
(http://user:password@host, port) to connection requests?

Regards

LPS
3  Using Arduino / General Electronics / Strange behaviour of arduino based board on: January 28, 2014, 03:33:00 pm
Hi,

I have been developing for quite a while a arduino based board that as 2 ATmega 2560 and 1 ATmega328.

The system designed has been stripped of its FTDI programming component. I use an external FTDI breakout board to do the programming of the 3 processors. Each has a 4 pin plug  (i modified the FTDI, shunted the 3V3, CTS and GND terminals, so i can save space and use only 4 pin programming).

Until now i had no special issues to register in terms of programming or program running but my latest versions are giving me problems. Now when the program runs, it´s like... getting delayed or even freeze. From what i have been able to test the problem is related with the serial programming interface.

The behaviour is the following:
If i have the FTDI plugged in to listen to whats happening everything runs smoothley;
If i start the board without it, i get the problems mentioned above.
Strangely from my hardware debug i have been able to understand that if i shunt either the TXD0 or the RXD0 or both with the GROUND when i start everything (without the FTDI plugged) goes OK.

This setup as been working for sometime, but since the last batch of orders i made this issue appeared and it seems a little bit random. The behavior doesn´t appear in all boards, but from the testing it is always solved by either plugging in the FTDI or shunting the TXD/RXD to the GND pin.

I have the feeling that it could be some issue with the TXD/RXD lines and the bootloader. Maybe the bootloader gets delayed or hangs because they are on the air, when  i take out the FTDI or do not shunt these pins.

Does anyone have any suggestions. Or further testing ideas. Or did i do something wrong in the electronic design?
I´m really on a dead end here to understand whats happening...
Seems like that book about electronics called, "Black Magic"...

You can see the detail of the schematics i use for the programming of the MCUs: https://dl.dropboxusercontent.com/u/7216207/Schema%20Serial.png

The details of the FTDI connector modifications can be seen in the image:
https://dl.dropboxusercontent.com/u/7216207/FTDIJPG.JPG

The details of the PCB Board setup can be seen here:
https://dl.dropboxusercontent.com/u/7216207/Board.JPG
4  Using Arduino / Programming Questions / Re: Ethernet client.print on: September 27, 2013, 08:25:11 am
Sorry

I have detected the problem, when trying to post all the code...
The usual, forgotten comment...
5  Using Arduino / Programming Questions / Ethernet client.print on: September 27, 2013, 05:47:31 am
Hi,

I have been trying to optimize my ethernet code.

But, for some reason when i try to know how many bytes i have sent to the W5100 i always get zero with the following code
Code:
while(TempFile.available()){
c = TempFile.read();
do{
                       sentbytes = client.print(FTTString);
                       Serial.println(sentbytes);
                 }while(sentbytes == 0);
}

I know that i´m  able to write because if i use the following code instead, i have no problem in writting

Code:
while(TempFile.available()){
c = TempFile.read();
              client.print(c);
      delay(10);
}

Any ideas why sentbytes is always 0?
6  Using Arduino / Programming Questions / Re: POSTS to a server, new Connect needed on: September 26, 2013, 11:53:49 am
Quote
HTTP 1.0
Under HTTP 1.0, there is no official specification for how keepalive operates. It was, in essence, added to an existing protocol. If the client supports keep-alive, it adds an additional header to the request:
Connection: Keep-Alive
Then, when the server receives this request and generates a response, it also adds a header to the response:
Connection: Keep-Alive
Following this, the connection is not dropped, but is instead kept open. When the client sends another request, it uses the same connection. This will continue until either the client or the server decides that the conversation is over, and one of them drops the connection.

HTTP 1.1
In HTTP 1.1, all connections are considered persistent unless declared otherwise.[1] The HTTP persistent connections do not use separate keepalive messages, they just allow multiple requests to use a single connection. However, the default connection timeout of Apache 2.0 httpd[2] is as little as 15 seconds[3] and for Apache 2.2 only 5 seconds.[4] The advantage of a short timeout is the ability to deliver multiple components of a web page quickly while not consuming resources to run multiple server processes or threads for too long.[5]
7  Using Arduino / Programming Questions / POSTS to a server, new Connect needed on: September 25, 2013, 10:15:41 am
Hi,

I´m trying to make several POSTS to a server, like this one:

Quote
POST /acquisitions HTTP/1.1
Host: blablablabla.com
Authorization: Basic aGFydmfsdDpnNzZGJmg4
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 420

acquisitions[f212a2f0-5229-0130-5125-7672e03e9ad0][1379698200]=NAN&acquisitions[dc29d9e0-5229-0130-5123-7672e03e9ad0][1379698200]=39.884&acquisitions[5c2e83a0-522a-0130-512d-7672e03e9ad0][1379698200]=47.147&acquisitions[487e39f0-522a-0130-512b-7672e03e9ad0][1379698200]=46.484&&&&acquisitions[28dff7a0-522a-0130-5129-7672e03e9ad0][1379698200]=44.260&acquisitions[069ca610-522a-0130-5127-7672e03e9ad0][1379698200]=44.855

I´m able to connect make the first POST, receive "201 Created", but when i repeat the process without closing the connection and creating a new one the second POST doesn´t enter.

If i close connection and reopen and after that make the second POST, the process works.

Any one as an idea, is it mandatory to close connection and reopen if you want to do a new POST with the W5100?

8  Using Arduino / Programming Questions / Re: SPI multiples devices- conflict-help Plz on: September 16, 2013, 11:26:52 am
Sorry, i meant the other way arround first HIGH and after LOW.

For now no more sugestions
9  Using Arduino / Programming Questions / Re: SPI multiples devices- conflict-help Plz on: September 16, 2013, 11:04:59 am
Please try the following code:

Code:
....
 digitalWrite(chipSelect_SD,LOW);
 digitalWrite(5,HIGH);
 delay(100);

    for (int wsOut = 0; wsOut < nLEDs; wsOut++){

     SPI.transfer(ledBar[wsOut]);

    }

   delayMicroseconds(500); // 600us needed to reset WS2803s
   digitalWrite(5,LOW);
   digitalWrite(chipSelect_SD,HIGH);
....

The idea is to force the SDCard to drop the comunication lines, hope it helps
10  Using Arduino / Programming Questions / Re: SPI multiples devices- conflict-help Plz on: September 16, 2013, 10:23:10 am
Code:
....
  digitalWrite(5,HIGH);
  for (int wsOut = 0; wsOut < nLEDs; wsOut++){
     SPI.transfer(ledBar[wsOut]);
}
....

try puting a delay right after digitalWrite(5,HIGH)
Are you sure this is the correct line? If you were using the wrong line, it could present the symptoms of "working separately but not together".
11  Using Arduino / Programming Questions / Re: Compiling diference between Eclipse plugin and arduino IDE on: September 16, 2013, 10:14:23 am
To simplify the process of debug and ppl to help me i did the following tests:

I sarted using the UNO with the SD CARD shield for testing.
I used the example sketch "ReadWriteSdFat " available for the SdFat library.

I compiled in the arduino IDE and tested and as expected everything runs smoothly.
After, i compile it in the Eclipse environment and had the same problem in the execution.

I seems that it is crashing in the "sd.begin".

This way the process should be straightforward to test.
Is someone able to reproduce the problem?
12  Using Arduino / Programming Questions / Re: SPI multiples devices- conflict-help Plz on: September 16, 2013, 09:31:35 am
Hi,

Sugestion, have you though of using a TXB0104, this will allow you to completely isolate the SD CARD comunication lines and have voltage conversion.
I have successfully done this to allow multiple masters to talk with multiple slaves.
13  Using Arduino / Programming Questions / Re: Compiling diference between Eclipse plugin and arduino IDE on: September 16, 2013, 08:39:55 am
I started using this code:
Code:
if (!fp.begin (MAINSDCS, SPI_HALF_SPEED)){
Serial.println("ERRO SD");
    fp.initErrorHalt();
 }
Serial.println("ERRO SD FORA");

instead of "fp.begin(MAINSDCS,SPI_HALF_SPEED);"

And the problem persists, it doesn´t make any print, is like it just snaps inside the fp.begin funtion and restarts.

I can´t understand the behaviour... any more suggestions
14  Using Arduino / Programming Questions / Re: Compiling diference between Eclipse plugin and arduino IDE on: September 16, 2013, 08:11:30 am
Answering to the part of the reset, i´m almost sure the unit is resetting because the answer Ola0 0.

Ola0
0
Is being repeated because the counter tt is being reseted, which poins to an unit reset, i think.
15  Using Arduino / Programming Questions / Compiling diference between Eclipse plugin and arduino IDE on: September 13, 2013, 01:41:30 pm
Hi,

I am having a problem with my code/IDE:

I have the following code:
Code:
#include <SdFat.h>
#include <MCU3.h>


#define MAINSDCS 10
#define MCU3FILENAME "system/mcu3.txt"
#define RESTARTMCU2 "system/restart2.txt"
#define CONFFILE "system/conf.txt"

#define MCU1TIMEOUT 3600
#define MCU2TIMEOUT 3600

unsigned long timer1 = 0;
unsigned long timer2 = 0;
unsigned long timer3 = 0;

extern void setSDaccess(uint8_t mcu);

SdFat fp;
//SdFile SD;
char str[20];
uint8_t ii = 0;
char ch;
int tt =0;

void setup()
{
  #define PC0 14
  #define PC1 15
  #define PC2 16
  #define PC3 17
  #define PC4 18
  #define PC5 19

  #define PD7 7
  #define PB0 8
  #define PB1 9

  pinMode(PC0,OUTPUT);
  pinMode(PC1,INPUT);
  pinMode(PC3,INPUT);
  pinMode(PC4,OUTPUT);

  pinMode(PD7,OUTPUT);
  pinMode(PB0,OUTPUT);
  pinMode(PB1,OUTPUT);

  pinMode(MAINSDCS,OUTPUT);

  setSDaccess(0);

  Serial.begin(9600);
}

void setSDaccess(uint8_t mcu)
{
  if(mcu == 0)
  {
    digitalWrite(PD7,LOW);
    digitalWrite(PB0,LOW);
    digitalWrite(PB1,LOW);
  }
  else if(mcu == 1)
  {
    digitalWrite(PD7,LOW);
    digitalWrite(PB0,HIGH);
    digitalWrite(PB1,LOW);
  }
  else if(mcu == 2)
  {
    digitalWrite(PD7,HIGH);
    digitalWrite(PB0,LOW);
    digitalWrite(PB1,LOW);
  }
  else if(mcu == 3)
  {
    digitalWrite(PD7,LOW);
    digitalWrite(PB0,LOW);
    digitalWrite(PB1,HIGH);
  }

  delay(2);
}

void loop()
{
  timer3 = millis()/1000;

  Serial.print("ola");
  Serial.println(tt++,DEC);
  Serial.println(timer3);

  delay(1000);

  fp.begin(MAINSDCS,SPI_HALF_SPEED);
}

When i compile and run this in arduino IDE, i get the following result:
Quote
ola0
0
ola1
3
ola2
6
ola3
9
ola4
12
ola5
15

When i compile this same code in my eclipse environment i get the following answer:
Quote
ola0
0
ola0
0
ola0
0
ola0
0

It seems to me like the "fp.begin(MAINSDCS,SPI_HALF_SPEED);" is restarting the MCU and i don´t understand why.
Any ideas?
Pages: [1] 2 3 ... 14