Sorry, I didn't explain to you what I mean by CRASH
For CRASH I mean that the yellow LED starts flashing intermittently (with a slow sequence, 3 slow and 3 fast blinks)
in that state also the connection with the serial to carry out a new upload is blocked.
In that state also the serial is unreachable and the sketch can no longer be loaded.
For that I put a 10 second delay. that way just reset and reload the new sketch.
No now I only have the Arduino attached to the USB.
The A/Analog ports on an Arduino are Analog inputs on most Arduino's. The name analogWrite() is still pretty confusing but it applies to the PWM capable pins. Really whished they called it pwmWrite().
When analogWite(DPin, 8bitDutyCycle) function is executed, it automatically generates fixed frequency PWM signals at DPins (Digital Pin) indicated in the following diagram. The duty cycle of the signal changes in proportional to the values of the 2nd argument (8bitDutyCycle).
UKHeliBob:
GM - did you take note of the fact that the OP says that he is using an Arduino Nano 33 BLE which does not have a 328 processor ?
I believed that the Platform is the Arduino; so, if ESP can behave like an UNO in some applications why not NANO 33 BLE? Sorry, I don't have that Kit; but, it looks like an ordinary NANO.
GolamMostafa:
I believed that the Platform is the Arduino; so, if ESP can behave like an UNO why not NANO 33 BLE? Sorry, I don't have that Kit; but, it looks like an ordinary NANO.
The code is obviously an example code and what I expect is simple.
Using the analogWrite function on the outputs A0 ... A5 by setting 128 as a value, I expect the relative output to deliver (3.3 / 2) 1.6 volts "ON ALL 6 PINS".
This is what I expect.
What happen? I've already explained it before, I try to repeat myself.
If I only use 4 PINs, then in the code I only put 4 analogWrite, everything works, the code is loaded and from the related PINs I see the volts I expect.
If I use 5 PINs, so in the code put 5 analogWrite, code is in block, the serial communication LED starts to flash abnormally and, above all, it disconnects and it is no longer possible to load sketch.
here's all this behavior NOT and I repeat NOT happen on an arduino one.
I wouldn't want it to be a limitation of the Nano 33 BLA.
GolamMostafa:
This excerpt is from Arduino Document, which says that NANO 33 BLE does support PWM signals at the following DPins:
5, 6, 9, 10, 3
Odd that the pinout shows five PWM pins, but the back of the box shows six.
Looking at the schematic, D12/MISO is shown as a PWM output, so the PWM pins would be 3, 5, 6, 9, 10, and 12.
david_2018:
Odd that the pinout shows five PWM pins, but the back of the box shows six.
Looking at the schematic, D12/MISO is shown as a PWM output, so the PWM pins would be 3, 5, 6, 9, 10, and 12.
I also expected that DPin-11 should be there to remain in line with UNO. However, the product spec shows only 5 DPins for PWMs.