setting the pwm duty cycle to 65535 does not make it 100% on only 95% on
and there is a spike in the middle of the 0 cycle.
http://pastebin.com/ALdaqLBs
import socket
__author__ = 'dubbear'
import sys
import telnetlib
from random import randint
from time import sleep
from colors import ColorWheel
from colors import ColorWheel
wheel = ColorWheel()
HOST = "192.168.1.87"
def get_gpio( gpio ):
"get's status of a gpio"
Esp01.send("gm " + str(gpio) + "\r\n")
return_string = Esp01.recv(4096)
return return_string
def set_gpio( gpio , duty ):
"set status of a gpio only pwm for now"
Esp01.send("gs " + str(gpio) + " " + str(duty) + "\r\n")
return_string = Esp01.recv(4096)
return return_string
Esp01 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Esp01.connect((HOST ,24))
print get_gpio(12)
count = 0
while (count < 65535):
set_gpio( 12,count )
set_gpio( 13,count )
set_gpio( 14,count ),
count = count + 10
print count
# sleep(0.1)
# while (count < 65535):
# red,green,blue = wheel.next().rgb
# set_gpio( 12,red*255 )
# set_gpio( 13,green*255 )
# set_gpio( 14,blue*255 ),
# count = count + 100
# sleep(0.2)
Esp01.close()