Show Posts
Pages: [1] 2 3
1  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 23, 2011, 03:35:13 pm
ah right, I had modified some aspects that I thought would make it work, however uploaded the wrong version to the arduino, doh!.
Anyway, I'll try what you said for yours tomorrow when im back at it, I got Wildbill's working for now anyway
2  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 23, 2011, 09:05:05 am
Right, ive changed something to it, not immediatly sure what and its working perfect. always the way  smiley

Thanks for your help with this. hopefully ill be able to spread my knowledge on these board eventually
3  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 23, 2011, 08:55:08 am
Nothing is printing when I put in these values if thats what you mean
4  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 23, 2011, 08:38:24 am
OK I have done both, I checked to ensure that the razor produces data in the form !ANG:365,254,458 and it does. then I tried typing that into the serial monitor while running the code on my mega, still nothing at all in the serial monitor.

Really confused why it is working fine on your system but not mine.
5  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 23, 2011, 08:19:43 am
Still confused as to why this is not working for me.

I have modifies jraskalls code to create a buffer instead of using the sample. The parsing works it is reporting the numbers but it just isnt obtaining them from the Razor IMU.

Any help would be welcome
6  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 07:09:42 pm
@Wildbill, I tried running your but had nothing at all in the serial monitor, I am using an Arduino Mega so have a few serial ports. I have plugged the Razor into the Serial1 ports and changed the code accordingly, however the serial monitor is empty.

@jraskell, I ran your but only got repeats of the sample form of the Razor output that was there i.e 324,24,122 cant remember exactly what it was.

Any suggestions
7  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 09:49:54 am
Ok, Ill actually go and connect it to our Razor/Arduino setup and see what happens.
You have been excellent cheers.
8  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 09:41:41 am
ah ok. the other thing is your ReadAxisValues() at the end. will the arduino recognise that as a function?
9  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 09:25:56 am
Code:
bool ReadingString=false;   // Are we building a string?

should that bool be boolean
10  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 08:40:50 am
Thats excellent, thanks for your help. Always find it easier to understand it if I have an example to work from.

11  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 22, 2011, 07:53:08 am
Trying to go forward with the method you highlighted. Do you have an example code or anything that you have done in the past you could upload, just to get a feel for using the strchr(0 and atoi() functions
12  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 16, 2011, 04:46:16 pm
Yes what I have done is add 360 onto each value so that they will never go below a three digit number and never be negative etc as that changed the amount if characters.

So in the method you have described it will find the three digit int value without having to read each character then combine them by multiplying by 100 and 10 etc.

It seems a much more elegant way of getting the values.
13  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 16, 2011, 10:10:24 am
Right, thanks. As I say I am a complete novice to these systems and with the short amount of time we have am trying to learn alot.

So with that I already know that the input to the serial is always in the form of 9 numbers per line, nothing else. My only concern if it is possible is that when doing a serial.read() it starts reading halfway through the line.
As i mentioned before that I need is the three numbers.

e.g 325421544 so from this I need to recognise the numbers 325, 421 and 544 if you get me
14  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 16, 2011, 08:33:40 am
Ahhhhhhh, it finally clicked. That makes a lot of sense actually.

For my application I would set the if statement for the serial.available to = 9 so ensuring that the buffer has 9 characters.

The thing is, is there anyway to know what is actually in the buffer? how much actually gets stored in it or for how long?
15  Using Arduino / Programming Questions / Re: Serial.read() command e explanation on: March 16, 2011, 05:14:19 am
I understand the command and how to use it, although i dont understand what conditions are being placed on it. Does the 3 relate to a single digit or a number of digits. i.e how does the command interpret this number.
Pages: [1] 2 3