Tuesday, December 10, 2013

Oh the code..........

Since we are waiting on parts from the 3D printer, its time to finally get the code in order. We made some strides today with a new library utilizing the RF transmitter along with some help from Professor Sullivan, but there are still some serious issues. The code below takes the L/R and U/D joystick inputs and mashes them together using one number (xPos*10000+yPos). The problem here is that when xPos goes to 0, we are left with a string just containing the yPos. We would like to find a way to use 0's as place holders for the unused x values, but we still have to figure out how to split the number into two variables on the receiving end.
This is what the receiving data looks like:

Received 5070504 / 24bit Protocol: 1
Received 5070504 / 24bit Protocol: 1
Received 504 / 24bit Protocol: 1
Received 504 / 24bit Protocol: 1
Received 504 / 24bit Protocol: 1
Received 504 / 24bit Protocol: 1
Received 10537 / 24bit Protocol: 1
Received 10537 / 24bit Protocol: 1
Received 10537 / 24bit Protocol: 1
Received 10537 / 24bit Protocol: 1
Received 5070976 / 24bit Protocol: 1
Received 5070976 / 24bit Protocol: 1

Until next time......




No comments:

Post a Comment