Shop OBEX P1 Docs P2 Docs Learn Events
vb and prop question using eb500 — Parallax Forums

vb and prop question using eb500

russ christensenruss christensen Posts: 84
edited 2009-03-01 00:44 in Propeller 1
Hi everybody, yet again. Since today is the day I'm devoting solely to working on my robot, i have another question. I'm having issues passing data from the prop to my vb program. Just testing i'm sending a string through the bluetooth every 100 milliseconds. the first one shows up in my text box immediately, a moment later about 15 more show up, then i don't get anymore for a while. however they do keep coming. I need the data to show up right when i get it, does anybody know how to print the buffer immediately?

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-28 23:35
    Hi Russ, it depends on your version of Visual Basic. I know that if you are using Visual Studio·2005/2008 you would capture data coming to the PC with the Data Received event handler and then pass it on to the text box using a delegate.

    Jeff T.
  • russ christensenruss christensen Posts: 84
    edited 2009-02-28 23:41
    Thats exactly what i'm doing, but there's still a delay. Here's some code if anybody cares to take a gander. it is using vb2008 and steve norris's eb500.spin which is also attached

    edit: most of the code i adapted from this tutorial.
    http://www.devx.com/dotnet/Article/31001/0/page/2

    Post Edited (russ christensen) : 2/28/2009 11:53:15 PM GMT
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-03-01 00:29
    Hi, DevX is a good resource. I don't have the time right now to look at your source perhaps someone else can help with that. I did have time to jot an example down onto Notepad , insert it into your existing code and see if it makes any difference.

    Note it uses a RichTextBox not a TextBox , alter that if you need to.

    Jeff T.



    EDIT: error, switch the two lines that receive byte values or ASCII I labelled them wrongly.

    Post Edited (Unsoundcode) : 3/1/2009 12:38:45 AM GMT
  • russ christensenruss christensen Posts: 84
    edited 2009-03-01 00:41
    omg unsoundcode i love you. your code worked great. not sure what was wrong with my code, thank you very much!
  • russ christensenruss christensen Posts: 84
    edited 2009-03-01 00:44
    One more question. since the send line and receive line are different, can i have one cog listening and one cog sending at the same time, without conflict?
Sign In or Register to comment.