10DOF on Leonardo on Win7 COM6 trouble

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jdoorly
 
Posts: 16
Joined: Fri Dec 13, 2013 9:08 pm

10DOF on Leonardo on Win7 COM6 trouble

Post by jdoorly »

I was exstatic: Plugged it all in and it worked first time!!! Yeah! All the sensors output data to the Serial Monitor using the "tester" sketch that came with the 10DOF master software. But, if I hit the reset pb on the arduino, the sketch appeared to reset but didn't complete and Windows lost the COM6 connection, requiring me to reboot my laptop to get COM6 back up. I changed USB ports and the problem just became a COM9 problem. Tried some other sketches like lsm303-mag but always the same problem.

The reason I even found this problem was that the 10DOF Tester sketch was supposed to output sensor id data followed by sensor readings. The readings worked great but no id data output!

Anybody see either of these problems before or have a guess at a solution?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 10DOF on Leonardo on Win7 COM6 trouble

Post by adafruit_support_mike »

The Leonardo uses an ATmega32u4 microcontroller, which handles USB communication in the chip. That means every time you reset the Leonardo, the USB connection goes away. When it restarts, you get a new USB connection. It's just a basic property of how the Leonardo is made.

User avatar
jdoorly
 
Posts: 16
Joined: Fri Dec 13, 2013 9:08 pm

Re: 10DOF on Leonardo on Win7 COM6 trouble

Post by jdoorly »

Thanks for the help Mike. So, if I can't reset my Leonardo without loosing comms then I guess I could use the UPLOAD function as a reset. But like I said I was trying to use RESET to see if the 10DOF Master "Tester" program printed out to the Serial Monitor the sensor ID info before it started spiting out all the sensor data, and it did not! Any thoughts on why it can print one thing but not the other?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 10DOF on Leonardo on Win7 COM6 trouble

Post by adafruit_support_mike »

What code were you using? Since the Leonardo handles its USB connection on-chip, the Serial library works differently.

User avatar
jdoorly
 
Posts: 16
Joined: Fri Dec 13, 2013 9:08 pm

Re: 10DOF on Leonardo on Win7 COM6 trouble

Post by jdoorly »

I got the code from here:
https://github.com/adafruit/Adafruit_10 ... ter/tester

I tried to paste the sketch here but it is too big and a direct past as well as a paste into Code brackets is filled with syntax color statements making it very confusing to look at (it looks ok in arduino ide).

The Setup() routine should be printing the sensor id info to the serial moniter (but doesn't) while the Loop() routine does print the sensor data over and over...

Another sketch, one just for the lsm303, worked just the same.

Thanks again, you doing this after hours?

User avatar
jdoorly
 
Posts: 16
Joined: Fri Dec 13, 2013 9:08 pm

Re: 10DOF on Leonardo on Win7 COM6 trouble

Post by jdoorly »

Just found it on Arduino site, gotta wait till new serial port opens so setup() stuff prints.
Thanks

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”