Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: serial data logging on: March 18, 2013, 12:59:47 pm
I am using the PString library to generate the strings that I send to the PC. Here's what I do:

//PString library
#include <PString.h>
char serbuff[20];
PString Serialbuff(serbuff, sizeof(serbuff));

//Then somewhere in your code, generate the string that contains the data.
// GOT INQUIRY FOR EVERYTHING, Z
        Serialbuff.begin();
        Serialbuff.print(intTemp);  //data
        Serialbuff.print(',');
        Serialbuff.print(intVolts);  //data
        Serialbuff.print(',');
        Serialbuff.print(intCurrent);  //data
        Serialbuff.print(',');
        Serialbuff.print(intAmpHrs);  //data
       
        //SEND OUT SERIAL PORT
        Serial.println(Serialbuff);

I hope this helps. Note I am using commas (,) to separate the data integers. You can use almost anything you like.

2  Using Arduino / Project Guidance / Re: serial data logging on: March 15, 2013, 04:26:59 pm
FYI I was able to find a fix for the Arduino RESET problem. It is here

http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection

On my PCB, I was planning on using a "real" reset/brownout chip. That also might mitigate this problem.

Funny, it's always the basic things that screw me up.
3  Using Arduino / General Electronics / Re: Serial communication failure when using power supply on: March 15, 2013, 03:16:24 pm
Hello. I am seeing a very similar problem. I'm running an Arduino Duemilanove that is talking to a "Processing" app on my Windows 7 machine. I have run the combined application for DAYS without any comm problems. However, if I STOP the Processing app, the Arduino resets itself (over and over). If I restart the Processing app, all is well again. This happens regardless of where the power comes from.

With the app running normally, if I simply disconnect the USB cable, the Arduino is happy and does not scram. This tells me the problem is coming from the PC, but I don't know how to prevent the resets on the Arduino side.

I see this as a big problem in my particular application. I hope a solution comes soon.
4  Using Arduino / Project Guidance / Re: serial data logging on: March 15, 2013, 02:49:53 pm
Yo @trvslamm. Here's the Processing application I'm working on. It loops forever sending out a command to the Arduino, Z, which asks for a bunch of data. This then formats the returning data onto the window. My laptop uses COM8, which is actually a USB port. You will have to comment out a lot of this, and just try to send 1 piece of data. You should put this file wherever you have your Processing app, and put it in a folder called "TrySerial".

Let me know if this helps.
Mike
5  Using Arduino / Project Guidance / Re: serial data logging on: March 14, 2013, 03:20:43 pm
Hi. I am doing a similar project. I started with the Serial Monitor, but have moved to the "Processing" application. It is discussed in the Arduino web pages. It's open source and FREE! Try doing the simple examples with the two applications talking to each other.

I used to use VB6 for things like this. Processing looks NOTHING like Microsoft.

I must caution you that I am having a problem when I turn off the PC side - it looks like the Arduino is resetting itself. I'm looking on this forum for some ideas.

Good luck.
Pages: [1]