32U4 based board? Problems

Hi all,
Not sure if this is a software Windows!! problem. But last year I got a Sparki robot this was based on the 32U4 controller and it worked fine for a few days, then I just couldn’t upload any code to it. I had installed all the right drivers, boards, etc.

Now I have my NEW Zumo 3204Oled robot and the same has happened again!! The code compiles OK but then I try to upload the code I get a message saying I don’t have access to the com port (USB/COM) Access denided!!! or programmer not found. I am the only user of this PC, Again think I’ve got the drivers right, etc.

Any help would be very useful…

Mel.


Have you tried to push the reset button before uploading?

The upload procedure of a ATmega32U4 based Arduino board is much more complicated than on other boards. First the serial port is opened using a special configuration and immediately closed again. The board then resets itself to start in programming mode (bootloader). That reset lets the PC unload the driver just to be loaded again. If the PC doesn't do that in the time the Arduino IDE gives it for that, it might present the port in a wrong state.
Often the upload succeeds after a few tries but that isn't guaranteed. But it's usually a problem of the connected PC and not the Arduino board.

If that is from Pololu, consult the product user manual for detailed instructions.

Hi to you both,
Many thanks for your replies, yes a download reset did the job.
The Pololu site suggested hitting the reset a couple of time when "Compile" becomes "Uploading" to took a few tries but worked OK and I am back on track to writing some code to get this doing something..

Regards

Mel.

Hi,
Well it wasn't the Zumo or the PC but my coding, there was a for/next loop with an ERROR so it never ended!!

If I have a variable float like bv, how can I format the result to only have 3 decimal places like 5.583 Volts?
Any help most welcome.
Regards

Use the dtostrf() function. It takes 4 arguments:

char res[20];
float f = 4.375;
uint8_t min_width = 4;
uint8_t decimals = 2;
dtostrf(f, min_width, decimals, res);

Take care the result buffer has enough space for the string (including the terminating null character!).

Hi pylon,
thanks for your reply and soltion! Never heard of dtostrf what a mouthful?
someone somewhere else suggested this one, a lot easier to work with and remember.

float x = long(bv * 1000)/1000.0; //truncate the floating point value after 3 decimal points;

Thanks again.

Mel.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.