Start: 10:00
- Before I tried sending a buffer over the wire, I checked to make sure the loadBuffer method was working as I had made changes since the last time testing.
- Loaded the test data into 2 test buffers using for loops. I completely forgot that you can initialize and increment multiple variables within the for statement. That could save some typing in the future.
- Between yesterday and today’s problems with printing chars which have numeric values stored in them, I decided to change all chars to unsigned 8-bit integers. When I moused over the windows and arduino send methods, I found this was the default type.
- I did not know that c had a special data type for size(size_t). It seems compatible with the most common int types.
- The array was not printing out the proper results. It was kind of dumb in retrospect, but I had a variable involved with the initialization of the counter and loop condition, incrementing with the loop. I took this out of the loop and added it to the size and the problem was resolved.
- After a lot of work I got the states to change properly when receiving data. The data on the other hand is messed up.
- Tried sending the data from the arduino to the pc this time. The data is transfering up but the first two bytes seem to be extra communication data. This is also knocking the message to the wrong place in the buffer. Found the culprits and took them out. This works now 🙂
- Echo test is now working. I needed to reduce the buffer to find out that there was a message being sent while the other side was trying to process. Fixed this, I should be able to set the buffer back to 128.
- Both directions are working without corruption. Currently this only works for 1 packet of data.
End: 5:30
