If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
checksum for ComPort
3 posts
• Page 1 of 1
checksum for ComPort
I need to include a Checksum byte in my command line to the ComPort. Any direction in generating the packet checksum would be appreciated.
Thanks, folks!
Thanks, folks!
- clamprod
- Posts: 7
- Joined: Mon Aug 02, 2010 3:33 pm
Re: checksum for ComPort
this is an example in ruby
- Code: Select all
string_data = @ins[0]
# this is line for test only, comment this to use input
string_data = "this is the data string"
####
checksum = 0
string_data.each_byte {|x| checksum ^= x }
output 0, checksum # with test line active this output have, checksum => 96
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: checksum for ComPort
Ah, awesome, Tronic!
Thank you!
clammy
Thank you!
clammy
- clamprod
- Posts: 7
- Joined: Mon Aug 02, 2010 3:33 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 52 guests