Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Some confusion on the Pin_out layout.

    Scheduled Pinned Locked Moved LoPy
    lopy4pinoutspinoutfirmware
    4 Posts 4 Posters 525 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      researcher
      last edited by

      Hello fellows.

      I have a lopy4 which I have upgraded to the firmware version 1.20.0

      import os
      os.uname()
      (sysname='LoPy4', nodename='LoPy4', release='1.20.0.rc3', version='v1.9.4-c5b0b1d on 2018-12-17', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1')

      I want to implement the following example code on ATOM:

      from machine import Pin
      led = Pin('G16', mode=Pin.OUT, value=1)
      led(0)
      led(1)

      According to https://docs.pycom.io/.gitbook/assets/lopy4-pinout.pdf, the physical PIN 16 is the eighth from top to bottom on the left side (considering that the LED is on top), BUT!!! it only works when I connect PIN 18 (the forth from bottom to top).

      What could be the problem? I will try to downgrade the firmware. Any suggestions will be appreciated
      Thanks

      PS: PIN 13 on ATOM reflects on PIN 16 on Lopy4.

      J robert-hhR 2 Replies Last reply Reply Quote 0
      • J Offline
        jcaron @researcher
        last edited by

        @researcher there are different names for the pins, the pin numbering on the LoPy match P* names, not G*.

        G* names match the numbering on the expansion board, I think.

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @researcher
          last edited by robert-hh

          @researcher There are four different numbering schemes used for the Pins, and so it is totally confusing

          • The Pxx numbers of the modules. These can be used in the code as 'P1', 'P2', ... or Pin.module.P1, Pin.module.P2, .... These numbers are shown in the Pinout of the development modules
          • The Gxx numbers of the expansion board (and of the WiPy1 board). These can be used in the code as 'G1', 'G2', .. or Pin.exp_board.G1, Pin.exp_board.G2 .. These numbers are shown in the Pinout of the expansion board
          • The GPIO numbers of the ESP32, like GPIO1, GPIO3, ... This is useful for reference to the technical manuals of the ESP32 and should therefore be kept, but you cannot use these in your python code.
          • The physical pin number of the ESP32 package. These numbers are shown in the Pin-out of the module closest to the module picture. That is the one you picked, but this information is not useful at all, unless you make your own PCB with an ESP32 chip. So it should better not be shown in the Pin-Out of the module. Who ever is interested in that, would anyhow refer to the ESP32 vendor's documentation (which is espressif).

          When using development modules, most people use the 'Pxx' numbering, even if Pin.module.Pxx is a little bit more effective. But 'Pxx' is shorter to read and type.

          1 Reply Last reply Reply Quote 1
          • M Offline
            Martinnn
            last edited by

            See also my post here https://forum.pycom.io/topic/4130/pinout-pysense-etc

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom