0

how can i get a local event (example: a physical button pressed) to trigger events on a remote django website.

without using a keyboard or mouse click.

Steve Robillard
35k18 gold badges106 silver badges110 bronze badges
asked Jul 30, 2014 at 23:45

2 Answers 2

1

@lenik is right.

Another way is just use Python: write a Python script (or even better, a Django project) to send a HTTP request (I would use JSON or REST API) to the Django remote application. Sounds too much work, and it is if the purpose is just for fun. But it's way more elegant.

answered Jul 31, 2014 at 14:21
0

you're trying to do things the other way around.

the correct way would be to write a python script to use GPIO library to access the current state of your pins and then if something interesting happens, use urllib to access the remote URL, thus telling your web server about the remote events.

answered Jul 31, 2014 at 0:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.