I load simple program and nothing happens. I see that zero is connected to the programming usb port.
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("hello");
}
It seems to be a little different than uno, mega or due.
I load simple program and nothing happens. I see that zero is connected to the programming usb port.
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("hello");
}
It seems to be a little different than uno, mega or due.
Please provide a detailed description of what you mean "nothing happens". Where do you expect to see something happen?
nothing means nothing, when you click on the top right icon to open serial monitor. It opens but nothing there, it should keep displaying "hello" but nothing there
I do have the communication between zero and computer, it loads the program and it says loaded OK
this is the board I have
Do you have the port of the Zero selected from the Tools > Port menu?
Do you have the baud rate menu at the bottom right corner of Serial Monitor set to 9600?
I have selected the port from Tools Port menu and all is 9600 but still nothing there.
I have uno, mega, due I know how to setup all, everything else is working except zero
Hi ED201,
The M0 board in your link (to ebay) only has a native USB port and no programming port.
Try changing "Serial" to "SerialUSB".
I do have the native USB port connected to upload the program and the serial monitor is connected to native USB port
the connection is there, it loads the program but it does not seem to work the same way like uno, mega or due
there is something funny. I have for example the blinking LED loaded and working, so it is not the connection.
MartinL gave you the answer. On the Zero, when you have it connected to your computer via the Programming Port, you can use Serial to communicate with Serial Monitor over the USB cable. When you have it connected to your computer via the Native USB Port, you need to use SerialUSB to communicate with Serial Monitor over the USB cable.
The whole confusion is that in your first post you said:
ED201:
I see that zero is connected to the programming usb port.
it is not like due with two port, it has only one Native USB Port,
I have only one connection which is Native USB Port
I see that I have two options zero with programming port and zero with native usb.
when I choose zero with programming port it does not communicate like different board
ED201:
it is not like due with two port, it has only one Native USB Port,I have only one connection which is Native USB Port
Then you shouldn't be calling it a Zero. Zero has two ports:
Have you even bothered to try SerialUSB yet?
it says zero on ebay and it has the same configuration chip as zero, the same 256 KB Flash etc.
I got the solution I need to add
#define Serial SerialUSB
and the USB is working fine, the serial monitor prints now.
Hi ED201,
Glad to hear you got it working.
On the M0 boards the native USB port works in a different way from the Uno, Mega and Due's programming port. Instead, it works in a similar fashion to other native USB Arduinos, such as the Arduino Leonardo or Micro.
To automatically upload new code over the native USB port, your sketch is monitoring the COM port in the background. If it detects that the baud rate has been set to 1200bps, it initiates an upload, temporarily disconnecting the console's COM port and connecting the bootloader's COM port instead. This automatically places the board into bootloader mode. After an upload it reestablishes the console COM port oncemore, although unlike the programming port this requires the console to be restarted.
If for whatever reason your sketch crashes, and is therefore unable to monitor the COM port, further uploads will fail. In this instance the board can be placed into bootloader mode manually, by a quick double tap of the reset button.
Arduino and Arduino compatible M0 boards usually use "SerialUSB" for their native USB port, while Adafruit boards (which don't have a programming port) continue to use "Serial".
ED201 has bought his M0 clone quite innocently.
If you look at the Ebay listing you see:
The SAMD21 M0 represents a powerful, 32-bit extension of the Arduino UNO platform. The board is powered by SAMD21 MCU, featuring a 32-bit ARM Cortex M0 core.
Compatible with Arduino Zero and Arduino M0.
The SAMD21 M0 board expands the family by providing increased performance, enabling a variety of project opportunities for devices, and acts as a great educational tool for learning about 32-bit application development. The Zero applications span from smart IoT devices, wearable technology, high tech automation, to crazy robotics. The board is powered by SAMD21 MCU, which features a 32-bit ARM Cortex M0+ core. One of its most important features is Atmel’s Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware, significantly increasing the ease-of-use for software debugging. EDBG also supports a virtual COM port that can be used for device and bootloader programming.
However if you look at the pcb you can see only one USB socket and no sign of an EDBG chip.
From memory, the board COM port appears as "Arduino/Genuino Zero (Native USB port)"
Do you know which Board should be selected in the IDE?
Do you know which Bootloader is installed on this Ebay board?
I have the same board but I bought mine with the full knowledge that it was an "Arduino M0" clone.
digital#2 is on PA8. The "Arduino/Genuino Zero" has digital#2 on PA14
I connected an ATMEL-ICE and programmed the board bootloader as an "Arduino M0"
It behaves just fine as an "Arduino M0" for me. Of course most punters do not have an ATMEL-ICE to re-program the bootloader.
If I knew what ED201's board should be, I could adjust my library code to suit.
I suspect that several member have bought these "Ebay boards"
David.
I can burn the "Arduino Zero" bootloader onto the "Arduino M0" clone board.
In Device Manager it appears as "Arduino Zero (COM6)"
And appears as "Arduino Zero bootloader (COM7)" during the Upload sketch phase.
Obviously the COM# will vary with your PC.
I am fairly certain that this is what comes with your Ebay board.
You would select "Arduino/Genuino Zero(native USB Port)" in the IDE.
Sketches should build and Upload but note that digital#2 and digital#4 will be wrong because the M0 clone has swapped D2, D4 relative to the Zero. M0 has D2 on PA08, D4 on PA14
In an ideal world you would burn the M0 bootloader if you possess an ATMEL-ICE or SAM-ICE
Then select "Arduino M0" board in the IDE. D2, D4 will appear correctly.
If you do not have an ATMEL-ICE, you can add a custom board to boards.txt and appropriate files to variants directory.
Use SerialUSB instead of Serial when you print to a Terminal.
David.