How to do analogWrite(pinnumber, dutycycle) in drag and drop mode?


#1

I am teaching kids programming and need to use the analogWrite(x, y) function from Arduino C. I don’t see that in the mblock IDE. Am I missing it somewhere?


#2

Please give more info, like the device you are using, are extensions added, etc.


#3

The device is ‘Arduino Uno’. No extensions.
Anything else I can provide?


#4

Here is a code that may work… You can see it’s equivalent to the right.
image


#5

Yes, this works. Thank you very much.


#6

No problem!


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.