Search

Register

Thanks for signing-up! You will receive an email with further instructions to activate your account!

username already taken
You already have an account? .

Login

Forgot password?
Don't have an account yet? Register now for using the UI-Designer and the forum or creating projects.

Picam

Project Information

Attached UI-Designer Configs
Pi45camera
Python Udp avec piface import socket import pifacedigitalio as pfio from RPIO import PWM servo=PWM.Servo() pfio.init() # A UDP server UDP_IP = "192.168.178.42" UDP_PORT = 7777 UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) listen_addr = ("",7777) UDPSock.bind(listen_addr) while True: data,addr = UDPSock.recvfrom(1024) print(data) print(addr) UDPSock.sendto(data, (UDP_IP, UDP_PORT)) if data.strip()=="s1H": print "Sortie 1 ON" pfio.digital_write(0,1) if data.strip()=="s1L": print "Sortie 1 OFF" pfio.digital_write(0,0) if data.strip()=="s2H": print "Sortie 2 ON" pfio.digital_write(1,1) if data.strip()=="s2L": print "Sortie 2 OFF" pfio.digital_write(1,0) if data.startswith("p")==1: e=(data.lstrip()) p=(data.replace("p","0")) pw= ((int(p)*10)+500) print(pw) servo.set_servo(18,pw)

Description

Please add a project description here!

Attachments