Show Posts
|
|
Pages: 1 2 [3] 4 5 ... 439
|
|
36
|
Using Arduino / Project Guidance / Re: Measurig model bridge stress
|
on: May 23, 2013, 06:15:48 pm
|
Spar4k fun has a number of sensors that might be of use. Model bridge competitions have been around for a long time, so searching for previous competitions might produce successful load measuring setups. Also, how the bridges will be force loaded will be important (sometimes they are sand bag loaded along the span). Perhaps placing the bridge on a large a large scale would be a practical option. https://www.sparkfun.com/categories/23?page=all
|
|
|
|
|
42
|
Using Arduino / Programming Questions / Re: Confusing echo in serial window using sabertooth controller
|
on: May 22, 2013, 11:12:42 pm
|
the OP hasn't said that as far as I see.
If you read the original post you would find the poster is reporting the spurious output on the serial monitor as a problem. So in this case, the use of the same serial pins for two connections is the direct cause of the problem. You seem to be quibbling about whether a given serial connection can be connected to more than two devices. Each Rx pin must be connected to no more than one Tx pin, or the two Tx devices will end up fighting with each other, which will typically not work and may even cause hardware damage. In this case Arduino pin 0 (Rx) was connected both to the USB serial device Tx pin and the sabertooth controller Tx pin. That's a bad idea. I agree it's possible to connect one sender to multiple receivers (as long as you don't also connect up the other half of the serial connection in the same way), but that is not what the OP has done here. Not sure why you don't understand the OP's setup is appropriately working the way it is wired. The OP appears to have his arduino attached to the sabertooth as recommended by dimension engineering (arduino tx connected to the sabertooth rx, and grounds connected between the two). Per the OP, this works as expected. Bytes sent by the code running on the arduino are being sent to the arduino serial out (tx), which is connected to both the arduino serial/USB interface and to the sabertooth motor controller. The serial monitor is displaying the byte being sent by the arduino code, which may or may not appear as an ascii printable character in the serial monitor. Bottom line, what is diaplayed in the serial monitor is expected behavior. Simple stuff.
|
|
|
|
|
43
|
Using Arduino / Programming Questions / Re: Confusing echo in serial window using sabertooth controller
|
on: May 21, 2013, 09:55:46 pm
|
I get a repeat of @@@@ - one character for every command the sabertooth is sent. Just looking into the sabertooth stuff, the @ probably is the byte being sent to the sabertooth indicating that the command is for motor 1. edit: more info, the single byte commands apparently are what is being seen in the serial monitor. Simplified Serial Beginner-friendly Fast single byte commands Baud rate settable with DIP switches 7-bit on Sabertooth No checksumming Requires one pin per SyRen or Sabertooth
|
|
|
|
|
44
|
Using Arduino / Programming Questions / Re: Confusing echo in serial window using sabertooth controller
|
on: May 21, 2013, 09:37:25 pm
|
And why would that be? the arduino sends serial data out its tx pin and doesn't really care how many rx pins are connected. I used a similar setup to monitor what is being received by my Ethernet shield and being sent to my ssc-32.
I don't know whether you read the original post, but the spurious output in the serial monitor caused by using the same serial port for two jobs is the precise problem we're being asked to resolve. So what is the basis of your claim "In that case the Serial port is not available for use to communicate with your Sabertooth controller" when the arduino *is* communicating with both the serial monitor and the sabertooth as indicated by the unknown characters in the serial monitor and the sabertooth operating as desired? If the OP wants to use another application on his pc for control, then the serial monitor will not be available, but the OP hasn't said that as far as I see. The OP needs to post the code he is running on the arduino as that probably holds the key to the unknown characters.
|
|
|
|
|
45
|
Using Arduino / Programming Questions / Re: Need larger "String buffer", and, How to delete 1st 65 chars of a string
|
on: May 21, 2013, 09:11:40 pm
|
I don't know why PeterH doesn't simply fix your code his way and see if it works. Maybe it won't? Anyhow I looked at your code and the below may have some interesting points. I put in the 2ms delay where a delay is needed in your serial byte capture loop. Why do you basically erase the String you have captured when a - is encountered? void initMessageRead(){ String newMsg = ""; String str = ""; GPRS.begin(9600); GPRS.println("AT+CMGR=1\r"); delay(100);
if( GPRS.available() ){ // if new data is coming from the GPRS UART while( GPRS.available() ){ // while there's still data in serial .. delay(2); //delay to allow bytes to arrive in input buffer during capture loop char wholeMsg = (char)GPRS.read(); newMsg += wholeMsg; if (wholeMsg == '-') { newMsg = ""; // !!!!!!!what is this?
} }
} }
|
|
|
|
|