Chat freely about anything...

User avatar
By rudy
#69491 :(


That is all you get. But if you provide more details then maybe you will get some help.

What framework are you using? What code have you tried. How is the 74HC595 connected? Give us a starting point for a discussion. What exactly is it doing.
User avatar
By zszen
#69505
rudy wrote::(


That is all you get. But if you provide more details then maybe you will get some help.

What framework are you using? What code have you tried. How is the 74HC595 connected? Give us a starting point for a discussion. What exactly is it doing.


sorry about that. Here it the full infomation:

I want the 4 leds control correct. here the table. I follow the video diy:
https://www.youtube.com/watch?v=MimllhWR0so

chip: esp8266, recently bin build.

Image

code:
Code: Select alllatch_pin = 2
     
gpio.mode(3,gpio.INPUT)
gpio.mode(latch_pin, gpio.OUTPUT)
gpio.write(latch_pin,gpio.LOW)

result = spi.setup(1,spi.MASTER,spi.CPOL_HIGH,spi.CPHA_LOW,spi.DATABITS_8,0)
print(result)

index = 0

function next()
    print(index, string.format("0x%02X", index))
    spi.send(1,index)
    gpio.write(latch_pin,gpio.HIGH)
    gpio.write(latch_pin,gpio.LOW)
   
    index = index+1
    if(index>15) then
        index = 0
    end
end

next()
gpio.trig(3,"up",next)
User avatar
By zszen
#69536
rudy wrote::(


That is all you get. But if you provide more details then maybe you will get some help.

What framework are you using? What code have you tried. How is the 74HC595 connected? Give us a starting point for a discussion. What exactly is it doing.




Now I understand the problem. 8266 can't support 12 pin led digital and txd together the same time.