Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4872

Automation, sensing and robotics • Re: How to Properly Initialize and Use PWM on GPIO 18 in Python?

$
0
0
If you're going to post python code on the forum (and want to preserve left hand whitespace) you need to enclose it in [code]... your code here ...[/code] tags.

That makes the difference between

if code-tags == "used":
print ("code is formatted")
else:
print ("code is scrambled")

And

Code:

if code-tags == "used":  print ("code is formatted")else:  print ("code is scrambled")
I did Thx!

Best,
N

Statistics: Posted by dgy411852 — Mon Jan 06, 2025 8:16 pm



Viewing all articles
Browse latest Browse all 4872

Trending Articles