Small suggestion how to use GPIO of Mikrobus

Hi Team,

I am very much new into the linux embedded firmware. Mostly I worked on microcontroller programming.
Can you give me idea how can I use all GPIO of Mikrobus in beaglePlay. Actually in my circuit we have connected Buzzer into the PWM pin to the buzzer.
So how can I use it that GPIO.

Currently I am using below code but it is not working.
Can you give me example code How can I use GPIO. Or can you give me the link for refer.
import Adafruit_BBIO.PWM as PWM

buzzer_pin = “PWM_MB1” # Replace with the correct Mikrobus PWM pin P1_11, GPIO0_1 tried but not worked
duty_cycle = 50 # Set the desired duty cycle (0-100)

PWM.start(buzzer_pin, duty_cycle, 2000) # Start PWM on pin with duty cycle and>
PWM.set_duty_cycle(buzzer_pin, duty_cycle) # Set the initial duty cycle

PWM.stop(buzzer_pin) # Stop PWM
PWM.cleanup() # Clean up any resources used by PWM

Above code is not working.


It appears that you will have to create a custom device tree for that. The mikrobus only shows “comm” protocol markings on the connector. I have a play board however we are not developing for it, and that is just an observation and not a for fact statement. Might be much more with that too, you will just have to go into this a bit deeper.