I've made a programm to send a table to processing but i'have this error message "list does not support the buffers interfaces"
How can i correct this ?
this is my programm
Code: Select all
import socket
import time
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(5,GPIO.OUT)
GPIO.setup(6,GPIO.IN)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(19,GPIO.IN)
UDP_IP = "192.168.43.154"
UDP_PORT= 8080
listled= ["a","b","c"]
etat1=0
etat2=0
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
sock.sendto(str(listled),(UDP_IP,UDP_PORT))
while True:
if(GPIO.input(6)==etat1+1 ): #clignotant
etat1=a
GPIO.output(5,True)
time.sleep(0.5)
GPIO.output(5,False)
time.sleep(0.5)
else:
GPIO.output(5,False)
if(GPIO.input(19)==etat2+1): #clignotant
etat2=b
GPIO.output(13,True)
time.sleep(0.5)
GPIO.output(13,False)
time.sleep(0.5)
else:
GPIO.output(13,False)