-
• #2
This should work just fine. I just tested it out with the exact same pin.
Have you updated to the latest version of the Espruino software? Could you also tell some more on how you wired up the LED? Finally, could you try just typing
analogWrite()
? This should give you a list of all the pins capable of PWM. -
• #3
Have you updated to the latest version of the Espruino software?
I will try to update from 1v43 to 1v46.Could you also tell some more on how you wired up the LED?
Ground -> LED -> 100 Ohm -> C6. It lights up with digitalWrite(C6, 1);Finally, could you try just typing analogWrite()?
analogWrite()
ERROR: Pin UNKNOWN is not capable of PWM Output
Suitable pins are:
A0 A1 A2 A3 A6 A7(AF) A8 A9 A10
A11 B0 B1 B3(AF) B4(AF) B5(AF) B6 B7 B8
B9 B10(AF) B11(AF) B13 B14 B15 C6 C7(AF) C8
C9(AF)
Or pins with DAC output are:
A4 A5I'm pretty sure it is the software version if it works (and is in the documentation!)
-
• #4
I have indeed updated to the latest version. My wiring is exactly the same as yours, so I can't think of any reason why digitalWrite wouldn't work! I think it would indeed be best to first update the software and try again.
-
• #5
just typed analog.Write(A0,0.2) in terminal window and got an error (using .operator on non object....
sending vom Editor window works, at least I don't get an error
1v46 on Espruino board -
• #6
And yes, of course, it was the because of version 1v43, not all of my boards were up to date.
-
• #9
Great - so all sorted now?
-
• #10
Yes Gordon, the new version fixes it all. thanks for the follow up :)
I'm just trying to PWM a LED and noticed that the only 2 output I could use for analogWrite were the DACs, all other PWM pins result in: