
Move towards minimum distance detected by sonar
Hi, Newbie to NXT |(5 months) and Robot C (10days). Despite being able to write half decent VBA code I am struggling. Found NXT-G too "foreign" despite doing all tutorials etc, some am trialling (and will buy) Robot C. Have worked thru tutorials and spent a lot of time correcting typo's
So 2 questions both based on Brian D's JenToo nesting program (in NXT-G)
I would like to code first part in Robot C, ie rotate through 360 degrees, so have used nSnychMotor and tried to use the encoder to rotate for given number of "ticks", I want to scan with US (sonar) and determine closest detected object, store as variable? and then move towards it.
Secondly I can't find an idiots guide to datalogging, as I'd also like to be able to record US value for every motor encoder increment. So in this case say ca 540 data points and send to PC.
What I have found that for me some coding in Robot C has allowed me to progress with NXT-G and vica versa.
I really like the debugging and variable watch etc rather than having to guess what has gone wrong.
Any help welcomed.