jcurl / RJCP.DLL.SerialPortStream

SerialPortStream is an independent implementation of System.IO.Ports.SerialPort and SerialStream for better reliability and maintainability. Default branch is 2.x and now has support for Mono with help of a C library.
Microsoft Public License
639 stars 199 forks source link

Sample code #16

Closed IngemarSkelander closed 7 years ago

IngemarSkelander commented 7 years ago

It would be awesome to have some small example code for this library. Especially for serial-noobs like me. I have looked at the tests to try to figure it out, but some sample code would help alot.

jcurl commented 7 years ago

It would help if you told me what it is you want to achieve. Reading and writing is as you would a FileStream. The only interesting bits are the port settings.

IngemarSkelander commented 7 years ago

Well, just some basic reading and writing samples would be nice. It is always a bit stressful when you're trying new libraries, but having some samples really helps. The tests are great for learning, but I think that sample code enhances the experience some more.

Memhave commented 7 years ago

Sample code would be great - I also agree that its rather confusing. A lot of documentation can be found on the codeplex site https://serialportstream.codeplex.com/

jcurl commented 7 years ago

The documentation on codeplex has been migrated to here to GitHub wiki. Have you looked at the test cases? They are "small" examples of reading and writing in the real world. Many of the APIs are designed to be similar to MSDN, so look at the SerialPort library on MSDN and expect it to be similar for the SerialPortStream.

https://github.com/jcurl/SerialPortStream/wiki

jcurl commented 7 years ago

As MrEngineer02 offered to make updates, I've created an empty link in the main page where he can add example code. Until then, I've got a couple of bugs to squash. Please use the MediaWiki style

jcurl commented 7 years ago

Content from CodePlex now copied to the GitHub wiki.

dalewolver commented 5 years ago

Well, just some basic reading and writing samples would be nice. It is always a bit stressful when you're trying new libraries, but having some samples really helps. The tests are great for learning, but I think that sample code enhances the experience some more.

I agree. Something really basic would pave the way forward for us struggling with how to implement and validate using this potentially wonderful library..

jcurl commented 5 years ago

You are more rhan welcome to provide some sample code and add a pull request. Everything in this repository is a resilt of my own time, no corporate sponsorship.

Please use the test cases as a starting point.