Go Down

Topic: Arduino uno upload forever and forever... (Read 88 times) previous topic - next topic

TIBERIO_SILVA

Hi,

My Arduino uno have installed a sketch that work well. The problem is to upload a new sketch. Doesn't shows erros messages or any thing else, just apear in the status bar: "carregando..." (loading...) I'm brazilam. The older sketch is active in the Arduino board. No conective problems port com, or board choices. The serial port can read report from the older sketch in arduino board, so no have comunication problems.

thanks!

pert

Please do this:
  • File > Preferences > Show verbose output during: > upload(check) > OK
  • Sketch > Upload
  • After the upload stalls out copy ALL the text from the black console window at the bottom of the Arduino IDE window(you will probably need to scroll up to see all of it) and paste it in a message here USING CODE TAGS(</> button on the toolbar).
  • Which version of the Arduino IDE you are using?

TIBERIO_SILVA

O sketch usa 3.956 bytes (12%) de espaço de armazenamento para programas. O máximo são 32.256 bytes.
Variáveis globais usam 243 bytes (11%) de memória dinâmica, deixando 1.805 bytes para variáveis locais. O máximo são 2.048 bytes.
C:\Users\Usuario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/bin/avrdude -CC:\Users\Usuario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/etc/avrdude.conf -v true -patmega328p -carduino -PCOM1 -b115200 -D -Uflash:w:C:\Users\Usuario\AppData\Local\Temp\buildeab3d4390accdac62c2c663428d716f5.tmp/dht11_temperatura.ino.hex:i




Arduino IDE 1.6.8


pert

Please do this:
  • Tools > Board > Boards Manager > Arduino AVR Boards(click on it) > Update
  • Wait for the update to complete and then click "Close"
  • try uploading again


If that doesn't work I recommend you to update your IDE version to 1.6.9 or 1.6.11 as Arduino IDE 1.6.8 had a bug that might cause your issue.

TIBERIO_SILVA

#4
Aug 23, 2016, 10:20 pm Last Edit: Aug 23, 2016, 10:29 pm by TIBERIO_SILVA
Thanks so much!

Your solution was so easy and fast!
I'm just a beginner on Arduino and eletronic. I am agronomist and I intend to do a meteorogical station to mesure weather variables in order to assessment their efects on the crops. The hardest thing is to understanding the program language (c++). If you would give me some clues I'd be even more grateful.
I bought:
1) Arduino uno board;
2) temperature and relative umidity (dht11_sensor);
3) sd card module;
4) lacking buy a real time clock;
5) jumpers

Once more thanks!

pert

The Arduino reference is focused on Arduino specific functions. It does give some basic information on general c++ programming but doesn't attempt to duplicate a full reference. Arduino doesn't do a good job at explaining that you are programming in c++, many people assume they are using a special "Arduino language". It was a big breakthrough for me when I realized there are many other useful functions available, you just need look outside the Arduino website. They do have a link to avr-libc on the reference page but I haven't found this to be a useful general c++ reference, I only use it for the AVR specific stuff.

My favorite reference is cplusplus.com. They have an excellent general tutorial at http://www.cplusplus.com/doc/tutorial. I recommend working your way through it. There is some stuff in there that doesn't apply to Arduino that you're going to need to filter out. Arduino uses setup() and loop() instead of main(). There is actually a main() but it's hidden away in the core but essentially all it does is:
Code: [Select]

void main() {
  setup();

  for (;;) {
    loop();
  }
}

I've simplified it down a little but as you can see it calls setup() once at the start and then keeps repeating loop() over and over.

Another difference in Arduino is function prototypes. The Arduino IDE automatically generates these for you but if you want to write them yourself you can do that too.

cplusplus.com also has an excellent function reference but it's not very easy to browse through. I will usually just search for cplusplus and the function name in google to find what I'm looking for. Then check out the related functions shown. For example: https://www.google.com/search?q=cplusplus+itoa when you go to the cplusplus.com page shown http://www.cplusplus.com/reference/cstdlib/itoa/ you will see on the left side of the screen some other useful functions such as atof, atol, strtof, strtol, strtoul.

There are some other tutorials, articles, and forum posts on cplusplus.com. Some of them are ok but it's a mixed bag, I really haven't found any of that useful. There is of course much other information available to fill in the gaps but it's nice to have a primary reference.

Other than that, you just need to start from the basics. Start with File > Examples > 01.Basics > Blink. It might seem too simple but after years working with Arduino I still use it several times a week as a basic test sketch/sanity check.

Work your way through the examples that are relevant to your project. Make sure you understand what every line does before you move on to the next one. Make some modifications to the code and then check that it did what you expected.

Once you're ready to start on your project, don't just throw it all together at one time. You need to write a simple test sketch for each component and get that component working before moving to the next one. Often you can use the example sketches(the general Arduino examples and the examples for any libraries you are using) for this purpose. Keep these sketches, they can be used later to test each component if something goes wrong. Once you know all the parts work correctly individually you can start combining them, one piece at a time. This is a very important thing because it's inevitable that you will run into problems and you need to be able to identify exactly where the problem began and what you did that caused it. This makes it much easier to troubleshoot. In the end it's a lot of trial and error, if you're persistent and methodical you will always find the solution eventually.

TIBERIO_SILVA

Thanks by the new explanations!

I tested each pieces of my project, as you advised me, exception of the real time device which I have not bought it. So the next step is join these parts in a project that collect and storage weather data.

valeu! (thanks!)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy