I am looking for a small snippit of code to show me how I could send a byte or two from Virtual Basic out to my picaxe. I am planning on using my Picaxe sync cable as the serial port and I can find the com port number. Would anyone be so kind as to give me a hand?
If using VB is not a firm requirement, I’ve been having good success using RobotBASIC to communicate back and forth with a PICAXE 20X2 project. RobotBASIC is a free download from http://www.robotbasic.org/. There is a whole section of the help file dedicated to serial comms and there are examples at the website showing code for Basic Stamps and Propeller.
Here is a simple program I use to send strings back and forth over COM 4. The first few lines are to configure the port and setup a handshake, and then the code just toggles between receive and send: