Hello Udooers, I tried running the fade example from the Arduino IDE, but it is not working. The blink example works fine, also from the web interface (192.168.7.2) if I click Arduino/Fade/run, it works, but not if I upload the the code from Arduino IDE. I observed, that indeed the during the FIRST iteration of the loop function the brightness value is correctly set by the analogWrite function, but all other iterations cause the LED to turn off instead of changing the light intensity. For example I set brightness to 255 and delay(1000), the LED shines 1 second and then turns out. If I leave brightness at 0, it won't shine at all. The M4 without working PWM is not very usefull at all... Thanks for suggestions!
Did you follow the advice of this document? http://www.udoo.org/docs-neo/Debugging_&_Troubleshooting/Arduino_PWM_Issue.html
Hi Walter, thx for the information. I tried it and just uncommented the line pinMode(9, OUTPUT) in the fade sketch. Unfortunately the result is the same....still no fading diode. Are there any other known issues with the PWM? Thanks, Matt
Well, you don't have to test. It does not work The servo sweep example is working though so it seems that the analogwrite does not compile correctly. The examples on the web-conf seems to be precompiled binaries that are pushed to the M4
Hi, thx for your help! I did update via apg-get, so I should have the newest release. So it seems like PWM on M4 doesn't work at all with the current libraries? Not being able to use the analogWrite command looks like a serious issue to me....
I already made an issue on github repository. I saw they made a lot of changes on the Arduino environment so 1 of them messed up the PWM I guess. Technically it is working (see the precompiled web example) only the current compiler does something wrong.
Fixed in https://github.com/UDOOboard/arduino-board-package/commit/69a8c57 Upgrade your system via apt on NEO (for internal compiling) and the board manager via Arduino IDE (for external compiling). Thanks for feedback! Ek5