In a previous post, the one below,
The idea of storing variables was mentioned. I understand programming in C, but I do not quite know how to approach this problem. I am trying to store variables from an ultrasonic sensor. I am having problems understanding the transferring of variables from the microcontroller to the PC. Can you tell me how I should approach the C coding? Since I only have Easy C, can I input the code uding the C source code block?
Use print to screen then it will show up in the terminal window.
Sorry, I should have worded the question better.
How can I get variables from the ultrasonic sensor after
- unplugging the robot from my computer
- letting the robot drive around
- and observe the information the ultrasonic sensor gathered from its run
You could load them in an array, an unsigned char array will let you save 250 slots. So have it record a sample every X milliseconds.