From: J. L. <vwy...@gm...> - 2010-08-27 07:18:17
|
On Thu, Aug 26, 2010 at 10:01 AM, J. L. <vwy...@gm...> wrote: > On Thu, Aug 26, 2010 at 8:47 AM, Dave Hylands <dhy...@gm...> wrote: >> Hi JL, >> >> On Thu, Aug 26, 2010 at 12:45 AM, J. L. <vwy...@gm...> wrote: >>> Baud rate is 57600 of the incoming serial print. Would be there be a >>> better way to hook up the arduino to the gumstix to be able read the >>> serial stream? Or should I do more reading on timings? If so does that >>> mean I should look at the timings for the arduino side or gumstix >>> side? Thanks again for your help so far though. >> >> Perhaps you can describe exactly what you're trying to do. >> >> I'm confused about how the serial stream and the i2c are related. >> >> -- >> Dave Hylands >> Shuswap, BC, Canada >> http://www.DaveHylands.com/ >> >> ------------------------------------------------------------------------------ >> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program >> Be part of this innovative community and reach millions of netbook users >> worldwide. Take advantage of special opportunities to increase revenue and >> speed time-to-market. Join now, and jumpstart your future. >> http://p.sf.net/sfu/intel-atom-d2d >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> > > Sorry I am probably mixing up terms as I am going and trying to learn all this. > > OK here is a better break down on what I want to do. Minus the > connection method. > > 1. The most important thing I need to do is get a serial stream coming > from an Arduino based device. This serial stream is just GPS > coordinates pitch roll, information like that. Which is normally sent > over an XBee. But I would like the gumstix to be able to read this > serial stream as well and log this all into a file, so I can pull info > from that file for other scripts I have written for the gumstix. > Basically the gumstix should read this stream display it, log it, I > then can manipulate the log files as I need. This one I would prefer > not to have to alter the code much if any on the arduino, I would > rather all the code by on the gumstix to read this one if that is even > possible. > > > 2. I have another arduino, but this is a standard arduino that have > measuring the balance port of a battery. This I would also like to > read but have have not figured out how to send the information as of > yet. There is nothing special here just need to display what this > arduino says and log it and nothing more. > > > I initially went with the i2c choice honestly cause I have no clue how > to go about this and I saw most have done an arduino by i2c. Would > posting the full arduino program of the board I want to attach the > most to the gumstix help any? Is there a better way to just read a > serial stream only? I do not need to write to either device(arduino) > only read from it. > Well I hope this helped you understand more of what I am doing. If you > need any other info Dave feel free to ask and I will post as detailed > of everything as you need, but hope this helps you get what I want to > do. Thanks again > Well with further playing around with this I tried running a program on my overo just a basic python read example. I always get port closed from it. Though I have noticed the i2c-3 is still at 400. I tried changing it in the uboot variables setenv i2c_bus=3,100 This does not seem to hold during boot I guess or I am doing it wrong. I am using the sparkfun logic level converter and I have read most change it to the above setting but there must be something else I am missing or set that part up correctly. I know I am calling it at the correct baud rate. Can anyone help me with the correct uboot command please, and any further hints on how to read this serial stream from the arduino on the overo by i2c or at this point I am open to any other hook up method that just allows me to read the stream that is being sent. Thanks as always I am posting the python program I am trying to just get any kind of read from the arduino in case that could be part of the issue other than my uboot misunderstanding. import serial import sys import struct if len(sys.argv) != 3: print "Usage: serial-dump.py <serial port> <baud rate>" sys.exit(-1) print "Dumping data on %s" % (sys.argv[1]) ser = serial.Serial(sys.argv[1], sys.argv[2], timeout=0.3) while(1): buf = ser.read(500) if len(buf) > 0: print "Read %i bytes:" % (len(buf)), for i in buf: value = struct.unpack('B', i)[0] print "%02x" % (value), print "" This program was copied off the bec site they have it up as an example. Was just looking for the easiest example I could find that would just do a read only .. I used serial-dump.py /dev/ttyS3 57600 and I also tried this way serial-dump.py /dev/i2c-3 57600. Both ways say port is closed, When I do a i2cdetect -y -r 3 while the arduino is plugged in it shows 4-7 devices in the little graph and none when nothing is plugged in as expected so its seeing something I would think. I tried an i2cdump -y 3 with each of the devices listed such as 0x35 0x37 0x3a and so on but all would freeze the overo in less than a min and none seemed to display the stream as "I would expect it to" though never used i2cdetect before today. |