I am trying to control the enable pin on my L293D motor controller with pwm signal from the pigpio library. I have got to the point where when I execute this code:
import Tkinter as tk import pigpio from Tkinter import Tk, Frame, Menu, Label from PIL import Image, ImageTk import os import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(32, GPIO.OUT) GPIO.setup(35, GPIO.OUT) GPIO.setup(36, GPIO.OUT) pigpio.set_mode(16, pigpio.OUTPUT) pigpio.set_PWM_dutycycle(16, 256)
Whenever I try and run this code it give me this error:
AttributeError: 'module' object has no attribute 'set_mode'
I don't know if I am importing this wrong but any help would be greatly appreciated!