Need some advice in writing a interface in VB Express for the Propeller.
Anubisbot
Posts: 112
Hi,
I have played a lot with my prop now,
And have build a controller card for Light with a prop on.
Now i want to make a litle windows programm, that i want to write in VB Express.
I stardet and played around a bit and got some data transferd over USB-Serial conection , just one byte on the press of a button, but it works.
I want to be able to have a terminal like the Propterminal + a up load of a binary file into the prop epprom.
Does some body have some sample code or know some how tos , what i can read.
Best regards
Anubisbot
I have played a lot with my prop now,
And have build a controller card for Light with a prop on.
Now i want to make a litle windows programm, that i want to write in VB Express.
I stardet and played around a bit and got some data transferd over USB-Serial conection , just one byte on the press of a button, but it works.
I want to be able to have a terminal like the Propterminal + a up load of a binary file into the prop epprom.
Does some body have some sample code or know some how tos , what i can read.
Best regards
Anubisbot
Comments
Then to display received text you can use the .Text & .AppendText methods for adding to the text box.
For something more advanced, look into running the textbox updating code on a seperate thread. That way the terminal can receive without locking the main application thread.
it is discussed here ...
http://forums.parallax.com/showthread.php?p=671804
Regards,
Quattro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
http://forums.parallax.com/showthread.php?p=611536 (on page 3)
In this Thread you can also find informations about the protocol.
(BTW: PropTerminal 0.3+ can also upload to eeprom).
Andy
'Unsoundcode' has broken this down into easy steps - at this link
http://forums.parallax.com/showthread.php?p=671804
Regards,
John Twomey
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 10/23/2007 8:22:52 PM GMT
I haven't gotten around to using delegates yet, but I do like the .NET serial object.
If you have a Serial Port object named "SerialPort1" and a combobox named "cbSerialPorts", this one line of code will populate the combo box with the list of available com ports.
Cool....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My goal is to live forever...Or die trying.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
First, thanks for the help, i am every time impressed, how good the help in this forum is.
Ok now to my problem, i got the VB to reset my prop, and i learned about timer, since i got nuts to find a delay or wait function...
To open the port and close it , works like a charm, and since the good idea of Bean the select of the com port works to.
I still try to figure out how to read a binary prop file to an array and then send it over the serial port.
I want to post the hole project files later here , so other new commer like me can take it and modify it fast and easy.
Since i find the VB Express is a good and cheap solution for begiinners.
But its hard to find some usefull examples to learn off.
AnubisBot
byte[noparse]/noparse Incoming = new byte[noparse][[/noparse]26];
serialPort1.Read(Incoming, 0, 26);
This sets up to read 26 bytes that are received over the serial port, now, I do remember that in the help file it did discuss reading files. I did notice that even for C# there·are very few examples in the serial port area. You might also want to try google 'serial com VB express'. Hope this helps.
Ray
·
For VB.NET the "stream" object is the easiest to use for file reading and writing.
bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My goal is to live forever...Or die trying.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
Delegates were first pointed out out to me by QuattroRS4 ( I appreciate that John ).· The Data_Recieved event has advantages over using a timer in the fact it is faster and easier to synch. To use the Data_Received event delegates become a neccessity. This link explains·delegates nicely in varying degrees of complexity http://www.developerfusion.co.uk/show/5251/
Jeff T.