Arduino no ouput

Hi, I have an Arduino Duemilanove ATMega328 with a Grove luminance sensor connect to A1 on a Grove Base shield running the demo sketch. I had this program working on an UNO but I'm having problems with the DUE.

From the IDE the Verify/Compile is OK.

Upload is OK.

The program is supposed to print sensor output to the serial monitor at 9600 baud but I get an 'Serial port COM 1 (port busy) error when I run the Serial monitor to view the sensor output.

I've heard that a PC restart solves this program. If I reboot the PC (cold or warm) and go back into the IDE the serial monitor starts OK but theres no output from the previously programmed DUE.

Note there are two lit LEDs on the DUE board, one lit green and the other flashing continuously yellow.

I vaugley recall when I ran this same configuration with the UNO board I had to send something to the board via the serial monitors 'send' box but I can't recall what exactly that was.

IDE shows in Tools/Programmer AVRISP mkII

Base shield is set to 3.3v, which this sensor operates at.

In the IDE Tools/get board information there is no entry, which is odd.

Hopefully these notes above will allow someone to give me a hint at what I'm doing wrong here, as the programs supposed to print sensor readings to the serial monitor and that's not happening. Any ideas appreciated.

I have an Arduino Duemilanove ATMega328 with a Grove luminance sensor connect to A1 on a Grove Base shield running the demo sketch. I had this program working on an UNO but I'm having problems with the DUE.

Which device do you have - a Due, or a Duemilanove?

The box it came in says 'Arduino DUE', sorry I thought they were the same thing.

They're not even the same form-factor or processor family.

Can you post a picture?

No I can't post a picture. This is the's RB-Ard-40 part number. Its says Arduino Due 32bit ARM Microcontroller and they do have a picture of it here:

As far as the base shield fit it seems its pins line up OK if I check the specs of both boards (and their printed pin outs on the boards themselves).

You have a Due, not a Duemilanove. The names are sort of similar but these are two very different boards.

You need to do this:

  • Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • Click on "Arduino SAM Boards (32-bits ARM Cortex-M3)"
  • Click "Install"
  • Wait for installation to finish. If you are prompted to install a driver, confirm.
  • Click "Close".
  • Tools > Board > Arduino Due (Programming Port)

Make sure you have the USB connected to the Programming Port on the Due: |500x238

ardxx1: I get an 'Serial port COM 1 (port busy) error when I run the Serial monitor to view the sensor output.

It's unlikely (though possible) that your Due is on COM1. Please make sure you have the port of the Due selected from the Tools > Port menu. The correct port should be labeled as "Arduino Due" in the menu.

Thanks to Pert for the mention of the IDE feature that updates it to handle the Due board. Due software seemed to install OK.

Right now my situation with the Due-Grove base shield-luminance sensor demo sketch is as follows:

IDE shows for Port: COM4 (Arduino Due Programming port).

IDE 'Board Info' shows Arduino Due programming port.

IDE shows programmer as 'AVRISP mkII'.

Due board yellow LED is on and no longer blinking. Green LED is on.

Verify-Compile of the demo sketch is OK.

Upload gives 'No device found on COM4, an error occurred while uploading the sketch.

Please note my USB cable goes from the PC to the Due boards programming port right next to the power connector.

So it looks like I have the Due software installed OK but I'm still missing something. Any comments appreciated.

Upload gives 'No device found on COM4, an error occurred while uploading the sketch.

Please do this:

  • File > Preferences
  • Uncheck the checkbox next to “Show verbose output during: compilation”
  • Check the checkbox next to "Show verbose output during: upload
  • Click “OK”
  • Sketch > Upload
  • After the upload fails you’ll see a button on the right side of the orange bar “Copy error messages” (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the forum toolbar).

Did find the check boxs in File > Preferences and unchecked 'show verbose output during complilation' and checked 'show verbose output during: upload'. Clicked OK.

On Sketch > Upload I see orange text scrolling in the black console under the source code window on top, but I do not see any orange bar 'copy error messages', probably because there are no longer any error messages appearing. What I see is:

Sketch uses 15732 bytes (3% of program space. maximum is 524288 bytes.

Atmel Smart device 0x285e0a60 found.

erase flash.

done in 0.031 seconds.

write 16992 bytes to flash (67 pages).

Looks like a text bar graph with percentages of data written to flash.

done in 3.287 seconds.

Don't see anything that looks like two pieces of paper at the top right corner of the black console, probably again as there were no error messages in the black console orange text this try at uploading.

It looks like for some reason the error messages are gone and its writing the source code to flash, but again nothing shows up on the serial monitor. Again I recall when I had the UNO with this same setup I had to send or enable something in the serial monitor to get the serial output text from the sensor going but I can't recall what that was.

If I copy the orange text that appears in the black console window during upload (again with no error messages appearing there this time) and paste it into Windows notepad all I get there is the source code.

Kind of looks like the upload worked for some reason but no output text on the serial monitor still.

I’m very glad to hear that the upload is now working!

Kind of looks like the upload worked for some reason but no output text on the serial monitor still.

Please post your full sketch. If possible, you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it’s OK to add it as an attachment. After clicking the “Reply” button, you will see an “Attachments and other settings” link.

Please always do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

So it looks like I'm back to where I started, with no serial output. The Grove Luminance sensor demo code is found here:

Not much too it.

I'm going to try a couple of different tests and see what happens:

Run the demo code on the Uno board with the base shield and luminance sensor as I had it set up before. this should verify the Ide 1.8.8 install, as well as the synch-data USB cable.

Run the demo code on the Due setup again, but with a different Due and Grove shield but with the same luminance sensor, then a temperature sensor. Perhaps a piece of hardware is a problem.

Run the Due setup mentioned above on a different PC with a different install of the IDE 1.8.8 and the Due update.

Will see if I have any luck and will post the results here shortly.

I noticed that at one point the IDE gave me a "Non-Native Port" warning. So I decided to start from scratch with the Uno with the Grove shield and luminance sensor on what was probably USB 1 on the motherboard rather than some of the higher USB ports, just in case these other higher ports were 'non-native'.

Test configuration for the Uno on what was probably USB 1 or 2 was:

IDE 1.6.12

Checked in Windows Device manager and it showed 'Arduino Uno (Com 3)'. Also showing Com 1.

In the IDE I selected Com3 (Arduino Uno).

IDE 'Get board info' gives 'Arduino Uno'.

IDE 'Board' shows Arduino Uno.

IDE 'Programmer' shows 'AVRISP mkII'.

Verify/Compile OK.

Upload looks OK.

Serial Monitor shows the Luminance sensor scrolling output OK.

So, it looks like that setup with the Uno-Base Shield, and luminance sensor worked OK.

Next I disconnected the Uno and replaced it with the Due in the same configuration and got:

Win 7 Device Manager shows Communication port Com 1 and Arduino Due programming port (Com 4).

In the IDE I have a choice of Com 1, or Com 4 Arduino (Programming port) and chose Com4.

IDE 'Board Info' shows 'Arduino Due'.

IDE board selected is Arduino Due (Programming port)

IDE programmer shows AVRISP mkII

Verify/Compile OK.

Upload shows an error message 'No device found on Com 4.

Heres the verbose error message from upload:

Arduino: 1.6.12 (Windows 7), Board: "Arduino Due (Programming Port)"

Sketch uses 15,732 bytes (3%) of program storage space. Maximum is 524,288 bytes. Forcing reset using 1200bps open/close on port COM4 C:\Users\PCs R US\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino/bossac.exe -i -d --port=COM4 -U false -e -w -v -b C:\Users\PCSRUS~1\AppData\Local\Temp\arduino_build_337373/GroveLuminance1.ino.bin -R Send auto-baud Set binary mode No device found on COM4 An error occurred while uploading the sketch

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Kind of looks like a Com port assignment problem of some kind. Any comments appreciated.

Sometimes when a sketch does not upload, this sequence might help:

After cheking that the USB cable is not faulty (and of course not a simple power cable...), push the erase button for 3 seconds then the reset button for 3 seconds, re-select the correct COM port.

If the sketch still does not upload using the programming port, this may be an issue with the Atmel 16U2 program (I have seen this issue on this forum with a recently purchased board). If you search on the net, you will find how you can upload a new program for the DUE 16U2, or ask a refund to your board reseller.

Did some more tests with the DUE and the Grove Base Shield and luminance sensor.

First I used a serial port testing program that sends the users text from the IDE's serial monitor to the DUE and bounces it back to the monitor. If the Base Shield is in place on the DUE this does not work. But if I remove the Shield it does work. This verifies that the PC, the USB-Serial cable, the Arduino IDE, and the DUE itself are probably OK.

Secondly I took the Base Shield off from the DUE, restarted the PC then verified/compiled and uploaded the Luminance sensors demo sketch without errors to the DUE. I then shut off the PC, added the Base Shield to the DUE, and started the PC up again, and the sensor output was printed to the serial monitor OK.

So I may not have a convenient solution, but I definitely have a workaround.

It looks like the problem was the Base Shield. I noted some odd things in the IDE when I was trying to upload to the DUE with the Base Shield. Parts of the IDE menus would blank out like the IDE was confused. Also the IDE would often give an error during uploading attempts that no board was found on the COM port it was listed on in the IDE as well as Windows Device manager.

Any comments on why a Base Shield might cause problems on a DUE appreciated.