We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Questions about pins in Omega-2 +



    1. Is the pinout diagram from Оmega-2 suitable for Omega-2 +?
      0_1529158027861_qjreazhewsua2npf7mshus-ibdk.png

    2. Can I use pins 6, 7, 8, 9 as GPIO?

    3. Is there an Onion Gpio library for Python 3?

    Thanks in advance for answers



  • @CAP-33

    1. Yes - but the active LOW hardware RST pin is not working well on Omega2+.
      Note: Omega2(+) '3.3V VOUT' is N.C. correctly.

    2. Official Onion Omega2 Documentation Using the Omega’s GPIOs
      Important & Special GPIOs
      0_1529172589002_O2_SPI Pins.png
      Note: 'omega2-ctl' is a typo - correctly: omega2-ctrl



    1. For Python2.7: https://docs.onion.io/omega2-docs/gpio-python-module.html#gpio-python-module

    Uses the python module https://github.com/OnionIoT/onion-gpio-sysfs/blob/master/python/onionGpio.py. This python code basically only opens special files on the filesystem to controll GPIOs -- I see no reason why this code shouldn't work on Python3 (except for minor things like print ".." to print( ".."))





  • I think this is a good question, and the documentation is quite confusing to me.

    GPIOs 7, 8, and 9 cannot be used as regular GPIOs - So what kind of GPIO's can they be used for? Are they General Purpose I/O or not?

    Documentation also starts with stating that "The Omega2 has twelve General Purpose Input/Output pins", but there are 21 I/O's marked with green on the pinout diagram, and the legend states that green in GPIO.

    If I want to maximize number of Output pins, how many can i get? (I would need 14 to avoid using Shift Registers...)
    If I want to maximize number of Input pins, how many can i get?



  • @Andreas-Lundgren said in Questions about pins in Omega-2 +:

    GPIOs 7, 8, and 9 cannot be used as regular GPIOs - So what kind of GPIO's can they be used for?

    This is a 'four-wire' SPI bus (CLK, MOSI, MISO) and GPIO 6 (CS1) could select an external SPI device.

    Documentation also starts with stating that "The Omega2 has twelve General Purpose Input/Output pins", but there are 21 I/O's marked with green on the pinout diagram, and the legend states that green in GPIO.

    0_1530003206710_Omega2_v1.2.png

    Please notice the '(v1.2) March, 2018' text at the lower right corner.

    I think they are talking about these 12 (twelve) pins:
    GPIO 11, 3, 2, 17, 16, 15, 46, 45, 1, 0, 19, 18
    although gpiomux set uart1 gpio command is needed for GPIO46 (RX1) and GPIO45 (TX1)

    If I want to maximize number of Output pins, how many can i get? (I would need 14 to avoid using Shift Registers...)

    You have got the above 12 pins.
    If you want more output pins:
    GPIO 6 (SPI_CS1) gpiomux set spi_cs1 gpio >> no external SPI device
    GPIO 5, 4 (I2C_SDA, I2C_SCL) gpiomux set i2c gpio >> no I2C bus

    Theoretically you could also set as GPIO
    the GPIO38 (FW_RST) pin >> no RESET
    and the GPIO12 (TX0), GPIO13 (RX0) pins >> no Serial Console

    Evidently you must configure each pin as output - for example on CLI with
    gpioctl dirout <gpio> or fast-gpio set-output <gpio>

    If I want to maximize number of Input pins, how many can i get?

    Theoretically all the above GPIO pins can be Input too - but:

    0_1530008291946_Important_Pins_for_Booting.png



  • Probably should markup the diagram showing it's an incorrect/evolving diagram.



  • @György-Farkas

    Thanks for your explanation! In the table of Pins that needs to be floating, GPIO7 anf GPIO8 are mentioned, although those pins are not marked as GPIO pins in the pinout diagram. Is this just a phrasing error, or are the wrong numbers stated?

    Also about the floating input pins during boot mode, and please excuse my me for still being early at the learning curve, this only applies to input pins right? How do I set these pins as output pre, or during, the boot sequence?

    A more specific question for my specific case, and don't hesitate to ask me to move this to a separate question if you think I should: If I connect an (intended) output pin to a NPN transistor gate over some 1k resistance, and connects the emitter to ground, is the pin considered floating or not? Can I hard wire this setup to GPIO1 and still boot up the omega?


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.