gaetan 22
Posts: 17
Joined: Tue Mar 24, 2015 6:55 pm
Location: France

protocol udp

Tue Apr 21, 2015 4:13 pm

hi everyone

i make a code with an interruptor and a led and I would like to see the state of my LED in my android application make with processing .
I don't know if the UDP protocol is the best idea and I don't know what to put in my programme.

thanks for your answer

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: protocol udp

Tue Apr 21, 2015 4:40 pm

You could use joan's pigpiod (http://abyz.co.uk/rpi/pigpio/pigpiod.html) on the Pi and then query the status from the Android app.

gaetan 22
Posts: 17
Joined: Tue Mar 24, 2015 6:55 pm
Location: France

Re: protocol udp

Tue Apr 21, 2015 6:03 pm

Okay but i don't really understand how it works . How can see the state of my LED connect to my raspberry pi into my android app.
i seen this site also https://wiki.python.org/moin/UdpCommunication

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: protocol udp

Tue Apr 21, 2015 6:32 pm

Extremely simplified: you run pigpiod as a daemon on the Pi. You can then use another program (for example your Android app) to set / read GPIOs using sockets.

Return to “Python”