Go Down

Topic: starting up Arduino (Read 3648 times) previous topic - next topic

blairgbh

Just purchased the starter program.  I've followed all the instructions, but can't get past the 'blink' program.  All efforts to change the program so the blink rate changes, have failed.  I'm using a Mac, and everything seems to be okay, but changing the blink rate will not work.  Message says 'uploading', then 'done uploading', but obviously my program changes are not taking effect.  I don't know what else to try.  Would appreciate your help!

Greg Harter

OldSteve

Just purchased the starter program.  I've followed all the instructions, but can't get past the 'blink' program.  All efforts to change the program so the blink rate changes, have failed.  I'm using a Mac, and everything seems to be okay, but changing the blink rate will not work.  Message says 'uploading', then 'done uploading', but obviously my program changes are not taking effect.  I don't know what else to try.  Would appreciate your help!

Greg Harter
There is absolutely nothing anyone can do to help if you don't post your code. Please post it within [code]code tags[/code] too, not inline.

If the IDE compiles your code, then shows "Uploading" ... "Done Uploading", it should be working fine.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

CrossRoads

Select File:Prefences and select Verbose outputs.
Then grab the stuff that shows up in the bottom and paste it here using the code tags button </>
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

pert

Which Arduino IDE version are you using?

Which Arduino board are you using?

Please post your modified blink program using code tags(</> button on the toolbar).

blairgbh

Here's the program; all I did was change the milliseconds from 1000 to 100. 

Under file, there is no preferences choice at the Arduino website.


// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(100);              // wait for a second
}

Thanks in advance for your help!

blairgbh

BTW, I don't know how to use the </>, so I just copied the program so all could see. 


CrossRoads

You click it, then paste your code in the box that appears:
Code: [Select]
your code here


Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

sterretje

Please answer pert's questions in reply #3

Under file, there is no preferences choice at the Arduino website.
No, you should look in the IDE under file -> preferences ;)
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

blairgbh

I'm using an Arduino Genuino Uno, purchased from Arduino and received three days ago.  My Mac is using 10.11.1, El Capitan, which is a very current version.  I don't know why the board and the computer aren't communicating.

I appreciate everybody's offer to help, you need to be more specific with a guy (me) who doesn't understand programming/language very well.

Thanks!

blairgbh

Also, here's the info requested earlier:

BN: Arduino/Genuino Uno
VID: 2341
PID: 0043
SN: 9543731343435110E031

blairgbh

blairgbh

And the software is version 1.6.10.


OldSteve

#11
Aug 06, 2016, 06:52 am Last Edit: Aug 06, 2016, 07:01 am by OldSteve
You need to show all of the code, including 'setup()', rather than just the 'loop()' function.

Also, please do what CrossRoads suggested - in the IDE's ">File >Preferences", check the boxes to enable verbose output during compiling and uploading. Then, if there are any errors, (they'll be in orange text), select the error text, press Ctrl-C to copy, then paste the errors into a post.

When you post your code and/or the error messages, first paste each into a reply, then select it ans press the </> button, which will wrap the code/error message in code tags.

Otherwise, you can type code tags manually. Type
[code] immediately before the code that you pasted, then [/code]
 immediately after it. Include the square brackets.

From what you've shown of the code, the LED should be blinking rapidly - on for 0.1 seconds, off for 0.1 seconds, repeating.

Are you still seeing "Uploading", then "Done uploading" during the upload process?

There have been some problems with uploading using IDE V1.6.10 when a sketch is opened by clicking directly on the *.ino file. You could try closing the IDE, re-opening it then loading the sketch by clicking on it in ">File >Open Recent", then uploading it.
IDE V1.6.9 is much more stable, with less problems than V1.6.10.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

blairgbh

Just tried it again.  Still seeing 'uploading' and 'done uploading', but the blinking cursor remains at 1 sec on, 1 sec off, etc.

I enabled verbose output, and the only lines that showed up orange were the last three:

Using Port                    : /dev/cu.usbmodem1A21
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200

The USB port seems to be working okay, I downloaded a .ppt file to a thumb drive last week, and then uploaded the same file through the same port with the thumb drive.

and here is all of the code:

Code: [Select]


*/


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(100);              // wait for a second
}



I'm not knowledgeable enough to know what adding the code in brackets before and after, means.

If this does not reveal a problem, should I try to install 1.6.9?  How would I do that?

Sorry this is such a problem.  Thanks for your patience and help.



OldSteve

#13
Aug 06, 2016, 04:01 pm Last Edit: Aug 06, 2016, 04:02 pm by OldSteve
There's absolutely nothing wrong with the code. I thought that maybe you didn't have the 'pinMode()' statement in 'setup()', but it's fine. (My UNO's on-board LED is happily blinking at the rate shown in your code.)

I forgot that the whole upload process would show in orange, not just errors, but it still shows that something is wrong there. Despite the fact that the IDE says "Done uploading", it's clear that the process didn't complete.

The upload message should be much longer, more like this:-
Code: [Select]
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "C:\Users\Steve\AppData\Local\Temp\buildb2290698c276240de51abeb4cd7c02b9.tmp/sketch_aug06d.ino.hex"
avrdude: writing flash (1066 bytes):

Writing | ################################################## | 100% 0.18s

avrdude: 1066 bytes of flash written
avrdude: verifying flash memory against C:\Users\Steve\AppData\Local\Temp\buildb2290698c276240de51abeb4cd7c02b9.tmp/sketch_aug06d.ino.hex:
avrdude: load data flash data from input file C:\Users\Steve\AppData\Local\Temp\buildb2290698c276240de51abeb4cd7c02b9.tmp/sketch_aug06d.ino.hex:
avrdude: input file C:\Users\Steve\AppData\Local\Temp\buildb2290698c276240de51abeb4cd7c02b9.tmp/sketch_aug06d.ino.hex contains 1066 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.15s

avrdude: verifying ...
avrdude: 1066 bytes of flash verified

avrdude done.  Thank you.


Did you try my suggestion of "closing the IDE, re-opening it then loading the sketch by clicking on it in ">File >Open Recent", then uploading it."?

Anyway, personally, I'd get rid of V1.6.10 and use V1.6.9, since it's proven to be more reliable than V1.6.10.

I can't help much with the process of uninstalling/installing on a Mac, sorry. I'm a Windows user. (But I guess it's just a matter of deleting the installation folder?)

You can get IDE V1.6.9 here:- Previous IDE Releases

And there's basic installation info here:- Getting Started w/ Arduino on Mac OS X

Good luck. :)

Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

blairgbh

First I tried closing the IDE, reopening and reloading the sketch.  Didn't work.

Then I put 1.6.10 in the trash, and loaded 1.6.9, opened, uploaded the sketch, then changed the values to 100 milliseconds, and reloaded.  Still didn't work.

I don't know what else to try.

I did notice that the serial port shows a slightly different message than what's in the Arduino manual.  Manual says it should say /dev/tty.usbmodem, but on my Mac it says /dev/cu.usbmodem.  Also, there is only one choice, not two.

Finally, I don't see the rx and tx LEDs lighting up when I upload. 

If there's nothing else to try, I'll be glad to talk with the Arduino folks........but there's no phone #, and they haven't responded to my request for help yesterday. 

Any other suggestions?  Again, thanks for your patience, I really don't know what's wrong here.

Go Up