Greetings,
I have noticed that the
I have noticed that the
Code:
boxes often change what I place in them! Not desirable!
For example, I can not correctly display this particular line of python code - neither in body text nor in a code box:
GPIO.setup("P9_11", GPIO.OUT)
It looks correct until I post, and then when I read the post it has changed and if I copy/paste, it remains incorrect.
The above GPIO.setup line should have the syntax:
GPIO.setup-leftparen-doublequote-P9_11-doublequote-comma-space-GPIO.OUT-rightparen
Do you receive it correctly?
I am using the most recent Safari in OS X 10.10.5, if that matters.
Thanks for your work...
Frank
Last edited:
PHP:GPIO.setup("P9_11", GPIO.OUT)
Thanks for looking at this Allen. The the line in the above box is correct. What is the font?
Showing this font without using the code tags.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import Adafruit_BBIO.GPIO as GPIO
import time
import smbus # needed if you later want to add i2c functions
# GPIO setup needed to address pins
GPIO.setup("P9_11", GPIO.OUT)
GPIutput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIutput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIutput("P9_13", GPIO.LOW)
rate = 0
rawrate = 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import Adafruit_BBIO.GPIO as GPIO
import time
import smbus # needed if you later want to add i2c functions
# GPIO setup needed to address pins
GPIO.setup("P9_11", GPIO.OUT)
GPIutput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIutput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIutput("P9_13", GPIO.LOW)
rate = 0
rawrate = 0
Last edited:
OK, I checked that twice before I left and it was OK, now I come back and it is parsed wrongly. I'm going to try it now with the -left bracket-noparse-right bracket- tags.
GPIO.setup("P9_11", GPIO.OUT)
GPIO.output("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIO.output("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIO.output("P9_13", GPIO.LOW)
GPIO.setup("P9_11", GPIO.OUT)
GPIO.output("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIO.output("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIO.output("P9_13", GPIO.LOW)
Attachments
Last edited:
OK, I took out the spaces and it changes, taking out the parentheses on the right (first and third lines). The fifth is OK if I take out the first few characters.
GPIO.setup("P9_11",GPIO.OUT)
GPIutput("P9_11",GPIO.LOW)
GPIO.setup("P9_12",GPIO.OUT)
GPIutput("P9_12",GPIO.LOW)
O.setup("P9_13", GPIO.OUT)
GPIutput("P9_13",GPIO.LOW)
GPIO.setup("P9_11",GPIO.OUT)
GPIutput("P9_11",GPIO.LOW)
GPIO.setup("P9_12",GPIO.OUT)
GPIutput("P9_12",GPIO.LOW)
O.setup("P9_13", GPIO.OUT)
GPIutput("P9_13",GPIO.LOW)
Last edited:
It seems to get left alone using the special tags, I've seen this done before and until now didn't realise why
[special=GPIO.setup("P9_11", GPIO.OUT)
GPIutput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIutput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIutput("P9_13", GPIO.LOW)]%[/special]
[special=GPIO.setup("P9_11", GPIO.OUT)
GPIutput("P9_11", GPIO.LOW)
GPIO.setup("P9_12", GPIO.OUT)
GPIutput("P9_12", GPIO.LOW)
GPIO.setup("P9_13", GPIO.OUT)
GPIutput("P9_13", GPIO.LOW)]%[/special]
- Status
- This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
- Home
- Site
- Forum Problems & Feedback
- Code boxes seem to modify syntax